@michiel.goetahls/home-automation

0.8.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i @michiel.goetahls/home-automation

Weekly Downloads

8

Version

0.8.0

License

MIT

Unpacked Size

657 kB

Total Files

75

Last publish

Collaborators

  • michiel.goetahls