@lauradebaets/home-automation
v0.8.1
Published
![npm badge](https://img.shields.io/badge/npm-v1.0.0-blue.svg)
Downloads
46
Maintainers
Readme
Home automation
You can set the thermostat to the desired value, with a range and the unit. Then you can provide an update of the temperature, also with the unit. Everything is displayed in json.
Installation
you must have typescript!!! otherwise ->
npm install -g typescript
Installing the home-automation for windows:
npm install @lauradebaets/home-automation
Using examples
This piece of code below is in the App.ts. Here you can set the thermostat to the desired temperature and range. The link is where the update data comes from.(later more about the Azure)
In the HttpThermostat you can choose also a unit. If you give no unit, it will be standard "celsius".
At the unit part you can choose of
- celsius
- fahrenheit
- kelvin
! If you do not provide an unit then this is standard 'celsius'
Rhe current temperature is automatically downloaded from azure sensor.If you surf to that site, you will get something as you can see below
To run the code you have to
ts-node ./index.ts
example 1
As a result, you will get this back in your shell. the first part are the thermostat settings. The second part is an update of the temperature In the third part you will see that the cooling is switched on.
example 2
Here do you see that the heating is switched on.
example 3
Here do you see that the heating and cooling are turned off. This is because the update temperature is in the range.
NPM
Set stuff on NPM
npm version <new version number>
npm publish
link to the npm of the home-automation
Generated documentation
TypeDoc is used to generate the documentation. Tor run it, you must run the following commando
typedoc --out docs src
The documentaion can be downloaded here -> documentation website
Linter
Linter analyzes source code to flag programming errors, bugs, stylistic errors, and suspicious constructs.
npm run lint
Tests
The tests are done with Jest. To run the tests you must run the following commando
npm run test
License
Distributed under the MIT License. See License.txt
for more information.
Author information
De Baets Laura
Student at VIVES Brugge Elektronica -ICT
e-mail: [email protected]