• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

MMM-Netatmo-Thermostat

Scheduled Pinned Locked Moved Utilities
13 Posts 5 Posters 5.9k Views 5 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    overflOw11
    last edited by Nov 7, 2017, 10:33 PM

    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

    1 Reply Last reply Reply Quote 1
    • Z Offline
      zdenek
      last edited by Nov 10, 2017, 4:50 AM

      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

      1 Reply Last reply Reply Quote 0
      • O Offline
        overflOw11
        last edited by Nov 12, 2017, 11:07 PM

        @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

        Z 1 Reply Last reply Nov 14, 2017, 3:25 PM Reply Quote 0
        • Z Offline
          zdenek @overflOw11
          last edited by Nov 14, 2017, 3:25 PM

          @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

          O 1 Reply Last reply Nov 14, 2017, 4:59 PM Reply Quote 0
          • O Offline
            overflOw11 @zdenek
            last edited by Nov 14, 2017, 4:59 PM

            @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

            Z 1 Reply Last reply Nov 14, 2017, 7:35 PM Reply Quote 0
            • Z Offline
              zdenek @overflOw11
              last edited by Nov 14, 2017, 7:35 PM

              @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

              1 Reply Last reply Reply Quote 0
              • O Offline
                overflOw11
                last edited by Dec 1, 2017, 1:50 PM

                I just push an update to change easily the color of the circle.
                I will working on other features soon but for your information, I don’t have Netatmo valves so I don’t plan to develop module for this now.

                Z 1 Reply Last reply Dec 8, 2017, 3:47 PM Reply Quote 0
                • Z Offline
                  zdenek @overflOw11
                  last edited by Dec 8, 2017, 3:47 PM

                  @overflOw11 excelent job. Is is possible to use HEX code of colour or just defined string?
                  one more thing - hot change aligment? 0_1512747996642_c7e5ee5a-6c1f-49b3-9bde-1a54db7ffc4f-image.png
                  as you can see, I’ve itn the right coloumn of screen and would be nice to have it aligned to center, or to right

                  thanks, Zdeněk

                  1 Reply Last reply Reply Quote 0
                  • S Offline
                    Smotx
                    last edited by Sep 22, 2018, 10:37 PM

                    This post is deleted!
                    1 Reply Last reply Reply Quote 0
                    • S Offline
                      Smotx
                      last edited by Sep 25, 2018, 5:01 PM

                      Je ne sais pas pourquoi, mais ce module fait ‘bug’ le module ‘MMM-Pages’

                      Lorsqu’on met en place ce module, ‘MMM-Pages’ ne change plus de page, ou change de page mais ne change pas l’affichage.

                      Dommage.

                      this module does not work with ‘MMM-Pages’.

                      if this module is active ‘MMM-pages’ no longer changes page

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      • First post
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy