0.8.0 • Published 5 years ago

@michiel.goetahls/home-automation v0.8.0

Weekly downloads
7
License
MIT
Repository
github
Last release
5 years ago

Home automation

npm badge ESLint Markdown Linter Tests

Thermostat

This repository is a simple typescript program that includes the basic functionality of a thermostat.

Description

You can set the wanted temperature and range with a JSON Object. You can also use the 'update' function to set the current room temperature. Its also possible to provide a unit to the JSON Object. These temperature are then been send to the JSON Thermostat' class. This class processes the JSON Objects to numbers and passes these values to the 'thermostat' class. Based on the unit, the class 'temperature' processes the values to one unit (celsius) so the 'thermostat' class can calculate a result. The finished result looks like this:

{
 "cooling": true,
 "heating": false
}

Installation instructions

1; Simply clone this repository

2; Run the following command in the folder where you cloned the project

ts-node index.ts

Multiple usage instructions and examples

v0.4

1; You first need to set the themostat to wanted values wich can be set in the settings (wanted temperature and range) in the 'app' class. It could look something like this:

    let settings =  {
        temperature: 22.0,
        range: 1.0,
        unit: "celsius"
    }

2; After that you can set a current room temperature. Wich could look like this:

    let updateSettings =  {
        temperature: 300.0,
        unit: "kelvin"
    }

v0.6

1; You first need to set the themostat to wanted values wich can be set in the settings (wanted temperature and range) in the 'app' class. It could look something like this:

    let settings =  {
        temperature: 22.0,
        range: 1.0,
        unit: "celsius"
    }

2; In this version the current temperature is updated via an api.

License

Licensed under MIT because it does not state changes and you can use any other license.

Author information

Wrote by Michiel Goethals, Student electronics & ict @ Vives Brugge

0.8.0

5 years ago

0.7.1

5 years ago

0.6.0

5 years ago

0.4.1

5 years ago

0.4.3

5 years ago

0.4.0

5 years ago

0.3.0

5 years ago