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.
you must have typescript!!! otherwise ->
npm install -g typescript
Installing the home-automation for windows:
npm install @lauradebaets/home-automation
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
! 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
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.
Here do you see that the heating is switched on.
Here do you see that the heating and cooling are turned off. This is because the update temperature is in the range.
Set stuff on NPM
npm version <new version number>npm publish
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 analyzes source code to flag programming errors, bugs, stylistic errors, and suspicious constructs.
npm run lint
The tests are done with Jest. To run the tests you must run the following commando
npm run test
Distributed under the MIT License. See
License.txt for more information.
De Baets Laura
Student at VIVES Brugge Elektronica -ICT