MMM-Netatmo-Thermostat



  • Hello !

    Based on the MMM-Nest module, I write a new module for my Netatmo thermostat.

    Description

    This module is a very simple one. It only display a circle with the current temperature in it. The color of this circle changes according to the state of the thermostat.

    • thermostat is heating up : the circle is orange,
    • thermostat is not heating up, the circle is blue,
    • thermostat is off, the circle is grey.

    0_1510093561829_Netatmo-heating.png
    0_1510093568455_Netatmo-cooling.png
    0_1510093577274_Netatmo-off.png

    Download

    MMM-Netatmo-Thermostat



  • that’s great idea, thanks. Thank you for your your job. But for some reason, it doesn’t work for me. The error is

    Failed to load resource: the server https://api.netatmo.com/api/getthermostatsdata?access_token=xxxxxxxxxxxxxx|yyyyyyyyyy responded with a status of 403 (Forbidden)

    I’ve run curl --data "grant_type=password&client_id=MY_ID&client_secret=MY_SECRET&username=MY_LOGIN&password=MY_PASS" "https://api.netatmo.com/oauth2/token"

    and get

    {"access_token":"ACCESS_TOKEN","expires_in":10800,"expire_in":10800,"scope":["read_station"],"refresh_token":"REFRESH_TOKEN"}
    

    But the ACCESS_TOKEN from what I’ve get is not the same as the access_token from the error message.

    my config:

    {
         		 module: 'MMM-Netatmo-Thermostat',
            	 position: 'top_right',
         		 config: {
    			   clientId: "CLIENT_ID",
    			   clientSecret: "CLIENT_SECRET",
    			   refreshToken: "REFRESH|TOKEN",
    			   updateInterval: 600000
               		 },
         		},
    

    What I did wrong? I’ve copied/pasted all tokens, so typo-error shouldn’t be the problem

    thanks
    Zdeněk



  • @zdenek said in MMM-Netatmo-Thermostat:

    0000

    Hi @zdenek.

    I can reproduce your issue in my Mirror.
    It’s my fault, I didn’t set the good parameters in my curl command.

    Please retry the curl command and add the scope parameter at the end of the request :

    curl --data "grant_type=password&client_id=MY_ID&client_secret=MY_SECRET&username=MY_LOGIN&password=MY_PASS&scope=read_thermostat" "https://api.netatmo.com/oauth2/token"
    

    Copy the refresh token in your mirror’s configuration file and reload the mirror. You should have your thermostat information.

    Let me know if it’s working.

    overflOw11



  • @overflOw11 cool, thanks. even it seems the refresh token is as the same as previous, it works. Just some questions

    • to change the color I can use CSS?
    • do you plan to add more info from termostat (the time of next change based on the schedule, what is the “setpoint” temperature for actual schedule,…)

    but that’s great, thanks
    Zdeněk



  • @zdenek said in MMM-Netatmo-Thermostat:

    do you plan to add more info from termostat (the time of next change based on the schedule, what is the “setpoint” temperature for actual schedule,…)

    Perfect !

    Yes you can change the color through the CSS file.
    And yes I plan to add more information about the thermostat in this plugin. For now, it’s a very simple module but it will be improved with time.
    When you ask me if you can change colors, I think about put colors of the module in configuration for example.

    Let me know if you think about something else.

    overflOw11



  • @overflOw11 great. For me will be great, easy change color, also easy change of size of the circle, the align (seems to be to left, but I’ve it on the right side of screen) and definitely more infos. For example, I’ve the Thermostat in “away” state. Would be nice to see it on MM. Now I can see actual temp and state of thermostat, but without any idea, what shoudl be … for example-actual is 19 Celsius, Thermostat is off, but it’s ok, cause based on Schedule, temp should be not lower than 17 Celsius.
    I plan to buy and install Netatmo valves - do you plan to develop module also for this?

    but it’s great, thanks
    Zdeněk


Log in to reply
 

Looks like your connection to MagicMirror Forum was lost, please wait while we try to reconnect.