Skip to content

overfl0w11/MMM-Netatmo-Thermostat

Repository files navigation

MMM-Netatmo-Thermostat

The MMM-Netatmo-Thermostat module is a module for the MagicMirror².

This module displays your Netatmo thermostat information. It is a very basic module that displays the current temperature of the room and indicates whether the thermostat is heating up or not (thanks to the color displayed by the module).

Heating Cooling Off
netatmo-heating netatmo-cooling netatmo-off

Installing the module

Run git clone https://github.com/overflOw11/MMM-Netatmo-Thermostat from inside your MagicMirror/modules folder.

Getting the Netatmo developper id

Connect to the Netatmo connect website https://dev.netatmo.com/myaccount/ and create an app. Save the clientId and clientSecret automatically generated by Netatmo.

To get the refreshToken, you have to launch the following command. Don't forget to replace parameters by your account information :

curl --data "grant_type=password&client_id=<YOUR_CLIENT_ID>&client_secret=<YOUR_CLIENT_SECRET>&username=<YOUR_NETATMO_LOGIN>&password=<YOUR_NETATMO_PASSWORD>&scope=read_thermostat" "https://api.netatmo.com/oauth2/token"

In the response, you can find the refresh token. Save it for later.

Using the module

To use this module, add the following configuration block to the modules array in the config/config.js file:

var config = {
    modules: [
        {
            module: 'MMM-Netatmo-Thermostat',
            config: {
		clientId: "<YOUR_CLIENT_ID>",
		clientSecret: "<YOUR_CLIENT_SECRET>",
		refreshToken: "<REFRESH_TOKEN>",
		updateInterval: 600000,
		color: {
			heating: "orange",
			cooling: "blue",
			off: "grey"
		}
            }
        }
    ]
}

Configuration options

Option Description
clientId Required Your client id from https://dec.netatmo.com/myaccount/.

Type: String
This value is REQUIRED.
clientSecret Required Your client secret from https://dev.netatmo.com/myaccount/.

Type: String
This value is REQUIRED.
refreshToken Required Your refresh token from the curl command previously describe.

Type: String
This value is REQUIRED.
updateInterval Optional Update interval of your Netatmo module.

Type: int(milliseconds)
Default 600000 milliseconds (10 minute because Netatmo servers are updated every hours by thermostat).
color Optional Tab which define color for 'heating', 'cooling' and 'off' state.

Type: String[]
Default : heating: orange, cooling: blue, off: grey.
Possible values are 'blue', 'orange', 'red', 'green', 'purple', 'yellow', 'grey'.

About

Netatmo module for Magic Mirror

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published