@lauradebaets/home-automation

    0.8.1 • Public • Published

    Home automation

    npm badge

    ESLint

    Markdown Linter

    Tests

    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.

    example

    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) app

    In the HttpThermostat you can choose also a unit. If you give no unit, it will be standard "celsius".

    setThermostat

    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

    azure sensor

    To run the code you have to

    ts-node ./index.ts

    example 1

    example

    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

    example

    Here do you see that the heating is switched on.

    example 3

    example

    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: laura.debaets@student.vives.be

    Install

    npm i @lauradebaets/home-automation

    DownloadsWeekly Downloads

    1

    Version

    0.8.1

    License

    MIT

    Unpacked Size

    561 kB

    Total Files

    57

    Last publish

    Collaborators

    • lauradebaets