Netatmo module for Magic Mirror
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 1 commit behind overflOw11:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
translations
.eslintrc.json
.stylelintrc
CHANGELOG.md
Gruntfile.js
LICENSE.txt
MMM-Netatmo-Thermostat.css
MMM-Netatmo-Thermostat.js
README.md
String.format.js
jquery-3.2.1.min.js
node_helper.js
package.json
q.min.js

README.md

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 60000 milliseconds (1 minute).
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'.