• 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.

Tado module?

Scheduled Pinned Locked Moved Requests
35 Posts 5 Posters 24.8k 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.
  • C Offline
    charliwest
    last edited by Aug 30, 2016, 7:37 AM

    Don’t really get how to build these modules, although will take a stab at reading through some docs, but was wondering if anyone is already working on a tado module, I found this https://github.com/dVelopment/node-tado which I think might be useful as well?

    D 1 Reply Last reply Aug 31, 2016, 10:47 AM Reply Quote 0
    • D Offline
      dinkybluebug245 @charliwest
      last edited by Aug 31, 2016, 10:47 AM

      This would be awesome!

      1 Reply Last reply Reply Quote 0
      • C Offline
        charliwest
        last edited by Sep 8, 2016, 3:09 PM

        OK, well I have had a play and I can get this working via the API with curl commands…I guess its s start, then I looked at the module docs and woosh, it went right over my head. If it helps anyone here is the process for doing it in bash.

        ##Fill in your email and your password
        USERNAME=you@youremail.com
        PASSWORD=yourPassword
        ####You probably don’t want to edit below here####
        ##Grabs a cookie to stash your session details
        curl --silent “https://my.tado.com/j_spring_security_check?j_password=$PASSWORD&j_username=$USERNAME” --data-binary “{}” --cookie-jar /tmp/tadocookies
        ##Grabs your unique home ID from a bunch of info
        curl --silent “https://my.tado.com/api/v1/me” -H “Referer: https://my.tado.com/” --cookie /tmp/tadocookies > homeId
        HOMEID=$(grep -o “homeId.," homeId| awk -F, ‘{print $1}’|awk -F: ‘{print $2}’)
        ##Now uses your home ID to get the current temp of your home and displays it
        curl --silent “https://my.tado.com/api/v1/home/$HOMEID/hvacState” -H “Referer: https://my.tado.com/” --cookie /tmp/tadocookies > temp
        TEMP=$(grep -o "celsius.
        ,” temp| awk -F, ‘{print $1}’|awk -F: ‘{print $2}’)
        echo “$TEMP”

        If someone can use that to make an MMM pretty please ;)

        1 Reply Last reply Reply Quote 0
        • K Offline
          krisalexroberts
          last edited by Nov 15, 2016, 8:01 PM

          Has anyone been able to look at this yet?

          1 Reply Last reply Reply Quote 0
          • K Offline
            krisalexroberts
            last edited by Nov 16, 2016, 11:00 AM

            There is a tado API, but I don’t know how to use this to display data on the MagicMirror

            https://my.tado.com/mobile/1.9/getCurrentState?username=xxxxxxxxxxxx@xxxxx.xxx&password=yyyyyyyyyyyyyyyyy
            I guess in its simplest form, we just need a module which connects to the above URL and then pulls information based on specific strings. eg: “insideTemp”:20.61

            I can do this in Python… not Javascript though

            Example of output

            {“success”:true,“operation”:“HOME”,“preheating”:false,“preheatingTargetOperation”:null,“autoOperation”:“HOME”,“operationTrigger”:“SYSTEM”,“insideTemp”:20.61,“setPointTemp”:20.8,“controlPhase”:“STEADY”,“currentUserPrivacyEnabled”:false,“currentUserGeoStale”:null,“deviceUpdating”:false,“homeId”:xxx,“heatingOn”:true,“internetGatewayType”:“GW02”,“internetGatewayConnected”:true,“heatingMuscleType”:“BU01”,“heatingMuscleConnected”:true,“insideTemperatureSensorType”:“RU01”,“insideTemperatureSensorConnected”:true,“settingsEnabled”:true,“fallbackOperation”:false,“helpUrl”:“https://support.tado.com/hc/","pendingDeviceInstallation”:false}

            1 Reply Last reply Reply Quote 0
            • D Offline
              dinkybluebug245
              last edited by dinkybluebug245 Nov 16, 2016, 11:42 AM Nov 16, 2016, 11:42 AM

              I think the following variables would be quite useful.

              Insidetemp - displayed as a number
              setPointTemp - displayed as a number
              heatingon - displayed as an flame icon if set to true

              Maybe like this

              21.3° / 15.2° / 0_1479296200918_upload-f38c73ad-e4a6-4519-9068-47ca54312530

              Where the first temp in bold is current temp, the next is the trigger temperature (ie when the heating would come on) Would anyone else add anything different?

              Perhaps mode might be useful as well, as an icon which is held in variable autoOperation. I think the different options here are HOME, AWAY, MANUAL, and the other one for nighttime (not sure what this is called)

              1 Reply Last reply Reply Quote 0
              • C Offline
                charliwest
                last edited by Nov 16, 2016, 12:36 PM

                I tweaked the bash script to the api @krisalexroberts suggested as it takes a lot less to do it, and at @dinkybluebug245’s suggestion added the extra readings…although not sure how the pi will read the hex values? But it works on mac

                USERNAME=you@your.email
                PASSWORD=yourPassword
                curl --silent “https://my.tado.com/mobile/1.9/getCurrentState?username=“$USERNAME”&password=“$PASSWORD”” > temp
                insideTemp=$(grep -o “insideTemp." temp| awk ‘{print substr($1,13,4)}’)
                setPointTemp=$(grep -o "setPointTemp.
                ” temp| awk ‘{print substr($1,15,4)}’)
                heatingOn=$(if grep -q ““heatingOn”:true” temp; then
                echo ‘\xf0\x9f\x94\xa5’
                else
                echo ‘\xf0\x9f\x9a\xab’
                fi)
                echo “$insideTemp” / “$setPointTemp” / “$heatingOn”

                D 2 Replies Last reply Nov 16, 2016, 4:11 PM Reply Quote 0
                • D Offline
                  dinkybluebug245 @charliwest
                  last edited by Nov 16, 2016, 4:11 PM

                  @charliwest - so how does this all get written up as a magic mirror module? do you know?

                  1 Reply Last reply Reply Quote 0
                  • C Offline
                    charliwest
                    last edited by Nov 16, 2016, 4:13 PM

                    Yeah no idea about nodejs stuff, spoke to a friend today who is hoping to build a magicmirror (I still havent had time to set mine up at all). He is keen to have a look at this with me. We will hopefully sit down over a couple of beers next week and see if we can bash something out.
                    Anyone else who already knows more about modules happy for them to take the above and make it work…
                    @dinkybluebug245 did you test the above, even though only a bash script, still pretty cool

                    S 1 Reply Last reply Nov 16, 2016, 4:36 PM Reply Quote 0
                    • S Offline
                      strawberry 3.141 Project Sponsor Module Developer @charliwest
                      last edited by Nov 16, 2016, 4:36 PM

                      @charliwest I would have some sparetime tonight, therefore I could help out if someone with a tado acc would like to join me

                      Please create a github issue if you need help, so I can keep track

                      K 1 Reply Last reply Nov 16, 2016, 5:20 PM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 1 / 4
                      • 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