Decoded - EvoHome API access to control remotely.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • DBMandrake
    Automated Home Legend
    • Sep 2014
    • 2361

    You would need to log into the Honeywell total connect comfort website and create an account for yourself, then assign your Evotouch controller to that account, once you have done this you can access your device settings via the smartphone apps.

    If that works then any of the scripts in this thread should work, using the email address and password you chose, as they basically use the same API as the phone apps. (There is a V1 and V2 API - the phone apps both use the V2 API these days, but the V1 API still works, albeit it is a bit redundant as it is a subset of the functionality of the V2 API)

    Comment

    • freeranger
      Automated Home Jr Member
      • Feb 2016
      • 13

      Originally posted by nieldm View Post
      Now to the dumb question. Do I need to register on the developer.honeywell.com website to get the required authorisations, or is it simply the "http://getconnected.honeywell.com/en/evohome" credentials? I see you pass username and password in most requests, but at the same time I see a Base64 encoded 'Authorization' parameter being passed so wondering where these came from.

      ...and finally, I did try to find all this information here and on the github site but I might well have missed it. If so, please be kind.....it's wasn't due to lack of effort!

      Many thanks again and kind regards
      Marc
      Hi - Your system should be registered here: https://www.mytotalconnectcomfort.com/ - I'd have thought the installer has done this for you? These are the credentials you use in the iOS app
      Have a look at my evohome plugin: https://github.com/freeranger/evolog...lugins/evohome which shows how I use the excellent watchforstock evohomeclient to make the calls.
      You do indeed pass in the username and password and it does...whatever it does. You can look under the hood of course, or just accept it and drive

      I registered at developer.honeywell.com and asked about public docs for the api....and got nothing back at all :/

      Comment

      • nieldm
        Automated Home Jr Member
        • Jun 2016
        • 12

        Originally posted by freeranger View Post
        Hi - Your system should be registered here: https://www.mytotalconnectcomfort.com/ - I'd have thought the installer has done this for you? /
        Maybe I am missing something fundamental here - as far as I can tell that site is North America only. I have registered on the UK version and the iOS app is live and working.

        What I cannot see from the UK site is anything resembling a client ID for authentication. I get one, plus a Secret, when I register on the developer site and have no issue with the concept. Just trying the simple command in a browser :


        https://tccna.honeywell.com/WebAPI/api/Session?"Username":{website userID}&"Password":{website_password}&"Application Id":{copied from this thread}

        ....just returns a "...doesn't support method ...GET" response. Using /emea/V1 or V2 or indeed anything emea related , returns an error.

        I will take another look at your github stuff this evening and see if I can spot the "bleeding obvious" mistake(s) I am making....

        Thanks for responding so quickly!

        Marc

        Comment

        • DBMandrake
          Automated Home Legend
          • Sep 2014
          • 2361

          You don't need a secret. Just use the email address and password with one of the already written binding libraries like watchforstock's Python library. It handles everything for you.

          Comment

          • freeranger
            Automated Home Jr Member
            • Feb 2016
            • 13

            Originally posted by nieldm View Post
            Maybe I am missing something fundamental here - as far as I can tell that site is North America only. I have registered on the UK version and the iOS app is live and working.
            You choose your country and then register, but if you are all ready up and running then don't worry
            Forget the developer site - it's of no use here and they don't support public access to the API

            You can't just navigate to the API endpoint from the browser. You could use postman or similar and pass in the authentication headers but really, you're better off using an existing library to do all that.

            If you want to see what is involved in making a call to the API directly then look at the watchforstock client code here: https://github.com/watchforstock/evo...t2/__init__.py

            If you want to see usage of this library then look at the link to my plugin that I posted earlier.

            Comment

            • DanD
              Automated Home Ninja
              • Feb 2016
              • 250

              https://tccna.honeywell.com/WebAPI/api/Session?"Username":{website userID}&"Password":{website_password}&"Application Id":{copied from this thread}

              ....just returns a "...doesn't support method ...GET" response. Using /emea/V1 or V2 or indeed anything emea related , returns an error.
              I hit the same problem when initially trying to test out access to the Honeywell API using requests entered directly in the browser. As Freeranger has said, this wont work as the browser issues a GET request, but the Honeywell site is expecting a POST request which is best achieved from within some form of client. You can then store the SessionID which is needed for subsequent request and the watchforstock client handles all of this. It's worth spending a little while setting up the Python client and letting it handle all of this for you.

              Good luck!

              Dan

              Comment

              • nieldm
                Automated Home Jr Member
                • Jun 2016
                • 12

                Originally posted by DanD View Post
                It's worth spending a little while setting up the Python client and letting it handle all of this for you.Dan
                I am probably too old and uncool for Python, having tried to set up the client (using IDLE on a Mac) and failed miserably I will resort to my trusted Crestron dev environment which can send POST commands. Via Python I can enter commands one by one by copying them from the script examples or the github zip, and seem to be able to run the odd script like the init...py ones, but when something goes wrong I usually have no clue what to do.....

                No matter, this thread is still massively helpful!

                Thanks again
                Marc

                Comment

                • freeranger
                  Automated Home Jr Member
                  • Feb 2016
                  • 13

                  Macs come with Python installed these days but you can install it by following there instructions


                  Python has been around for a while - nothing hip or cool about it

                  Comment

                  • nieldm
                    Automated Home Jr Member
                    • Jun 2016
                    • 12

                    Installing it is the easy part, making head or tail of what to run, how to pass my credentials into whatever needs to run and so on, is something totally different. Despite having spent the week growing some facial hair, watching reruns of Silicon Valley, tearing my jeans and calling everyone dude, I have decided I agree with you I am not too old, just too stupid for python. Bring back Fortran ...

                    I have, however, worked out how to make things hum via my alternative environment using a lot of the stuff I can see and understand but not make work, inside the python scripts, so thank you very much. My wife is now convinced that the investment in heating and hot water control is going up in smoke!

                    Comment

                    • freeranger
                      Automated Home Jr Member
                      • Feb 2016
                      • 13

                      Originally posted by nieldm View Post
                      Installing it is the easy part, making head or tail of what to run, how to pass my credentials into whatever needs to run and so on, is something totally different. Despite having spent the week growing some facial hair, watching reruns of Silicon Valley, tearing my jeans and calling everyone dude, I have decided I agree with you I am not too old, just too stupid for python. Bring back Fortran ...

                      I have, however, worked out how to make things hum via my alternative environment using a lot of the stuff I can see and understand but not make work, inside the python scripts, so thank you very much. My wife is now convinced that the investment in heating and hot water control is going up in smoke!
                      If you use my evologger then you just install stuff and add settings to the config.ini file - I have provided documentation for it - each plugin has a read me file as well as the overall one in the root of the project.

                      The plugins themselves are fairly simplistic, especially since I use the Evohome client to do the heavy lifting so if you want to use that client then look at the plugin. Ditto for forecast.io and the other ones - there's not much code in them.

                      If you are starting from scratch and don't want to use an existing library then just look at the Evohome client code but be warned - it is relatively complex...

                      Comment

                      • victorp1612
                        Automated Home Jr Member
                        • Jun 2016
                        • 24

                        Hi Freeranger,
                        Thanks for your evologger tool , working fine but I'm having an issue with uploading to Plotly and was hoping you can help .
                        Evologger is picking up data no problem but I then get a 404 error back from Plotly

                        INFO:evohome-logger:::2016-06-20 06:29:05: Attic (20.0 A, 5.0 T) Bathroom (20.5 A, 16.0 T) Caoimhe (19.5 A, 16.0 T) Ensuite (21.0 A, 17.0 T) Hall (19.5 A, 16.0 T) Kitchen (19.0 A, 15.0 T) Living room (20.0 A, 16.0 T) Master Bed (20.5 A, 16.0 T) Saoirse (19.5 A, 17.5 T) Hot Water (55.0 A, 55.0 T)
                        ERRORlotly-plugin::
                        Plot.ly API error - aborting
                        Server responded with status code: 404
                        and message: streamtoken not registered or valid.
                        INFO:evohome-logger:::Going to sleep for 5 minutes

                        I then realized that I hadn't initialized the API streams as per your instructions so ran python plugins/plotly/__init__.py but I get the following :

                        Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 20:40:30) [MSC v.1500 64 bit (AMD64)] on win32
                        Type "copyright", "credits" or "license()" for more information.
                        >>>
                        ========= RESTART: C:\Python27\evologger\plugins\plotly\__init__.py =========

                        Traceback (most recent call last):
                        File "C:\Python27\evologger\plugins\plotly\__init__.py" , line 17, in <module>
                        plotly_username = config.get("Plotly", "username")
                        File "C:\Python27\lib\ConfigParser.py", line 607, in get
                        raise NoSectionError(section)
                        NoSectionError: No section: 'Plotly'
                        >>>

                        Any hints please ?
                        Thanks
                        Vic.

                        Comment

                        • freeranger
                          Automated Home Jr Member
                          • Feb 2016
                          • 13

                          Originally posted by victorp1612 View Post
                          Traceback (most recent call last):
                          File "C:\Python27\evologger\plugins\plotly\__init__.py" , line 17, in <module>
                          plotly_username = config.get("Plotly", "username")
                          File "C:\Python27\lib\ConfigParser.py", line 607, in get
                          raise NoSectionError(section)
                          NoSectionError: No section: 'Plotly'
                          >>>

                          Any hints please ?
                          Thanks
                          Vic.
                          Hi Vic,

                          Glad at least part of it is working for you

                          Did you run "python plugins/plotly/__init__.py" from the evologger folder, not from the plotly plugin folder?
                          Does the config.ini file contain:
                          Code:
                          [Plotly]
                          username=<Your Plot.ly username>
                          apiKey=<You PLot.ly API key
                          If both the above are true, temporarily copy the config.ini file into the plotly plugin folder and see what happens....

                          Comment

                          • victorp1612
                            Automated Home Jr Member
                            • Jun 2016
                            • 24

                            All sorted now Freeranger , thanks for the tip : I was indeed running the script from the plotly plugin folder. Running it from the evologger folder resolved the issue and I now see data flowing in Plotly :-)
                            Thanks again for your help !

                            Comment

                            • freeranger
                              Automated Home Jr Member
                              • Feb 2016
                              • 13

                              Originally posted by victorp1612 View Post
                              All sorted now Freeranger , thanks for the tip : I was indeed running the script from the plotly plugin folder. Running it from the evologger folder resolved the issue and I now see data flowing in Plotly :-)
                              Thanks again for your help !
                              Phew
                              BTW if you can figure out what would be needed to map actual vs expected temp using streams then I can update the plugin accordingly.

                              Comment

                              • Conseils
                                Automated Home Jr Member
                                • Nov 2014
                                • 31

                                Increased data resolution

                                Hi,
                                03 Aug 2016 06:00 (UK) this morning the https://tccna.honeywell.com/WebApi/ seemed off line for two hours.

                                After, at 08:00 03 Aug 2016 06:00 (UK) I seemed to start receiving temperature data from my valves with increased resolution.

                                i.e. from ±0.5 °C
                                to ±0.01°C

                                It's unlikely its accurate to 0.01°C though the 0.1°C gives trending, which is nice.

                                I haven't upgraded the Raspberry PI so think at the moment think it's the Honeywell WebApi change. ( A picture of the impact is shown, though its trivial to rectify )

                                Anyone care to confirm the observation?

                                evohome-00.jpg
                                Last edited by Conseils; 3 August 2016, 11:54 PM.

                                Comment

                                Working...
                                X