Decoded - EvoHome API access to control remotely.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • bruce_miranda
    Automated Home Legend
    • Jul 2014
    • 2307

    #16
    You have a print response.content on the library that needs commenting out.

    Comment

    • fraggel
      Automated Home Lurker
      • Oct 2014
      • 2

      #17
      I found this thread through google. I have done some of these analyses myself for other applications without an API.
      Nice to see that this protocol has been analysed this far already.
      I think about creating a c# implementation and linking it to HomeSeer, the home automation system I use.
      I haven't checked the complete library yet, but I am sure that I will find it helpful.

      Originally posted by eXOBeX View Post
      Interesting to see this work in progress. You shouldn't have to be doing it (there's no reason for Honeywell not to offer API or web access) but there y'go.

      Have you considered decoding the link between gateway and server instead of gateway and app? Communicating with the gateway (via a Pi running a web server on the same network, for example) would cut Honeywell's servers out of the loop completely, useful if Honeywell decide they're end-of-life and try to push a replacement product.

      For what it's worth I've installed Wireshark today to see what the gateway is up to. I'm unfamiliar with Wireshark so forgive any noobishness

      First thing it does is looks for the local router, then makes a HTTPS request (from port 30000 to dest port 443) to auiredir1.alarmnet.com (204.141.57.100).
      After a brief chat it then turns its attention to auiredir2.alarmnet.com (204.141.57.101), again HTTPS but this time with a source port of 30001.
      Next is more HTTPS to 12.149.218.73 (registered to ADI), incrementing the source port once more.
      The cycle then repeats over and over, with the gateway sending snippets of data to auiredir1.alarmnet.com, auiredir2.alarmnet.com and 12.149.218.73 and incrementing the source port counter each time. Most data packets I saw were 170 bytes or less, the third ever auiredir2 packet being the only exception at 634 bytes.

      None of these three appear to make the first move, the Evohome gateway calls them first.
      The gateway is using HTTP-push protocol. It connects to the servers of HW and identifies itself. After that it just sits and wait for you to send commands through that server.
      It is a HTTP(s) client, not a server. Therefore the only way that you will be able to send messages to this device is to reroute the servers you mentioned above to your own server (which includes running your own DNS or a proxy) and implement your own serversoftware.

      The traffic you see is the instantiationrequest of the push protocol and keep-alive messages for the connection (which explains the low byte count). These can differ in contents due to server-architecture and implementation decisions.
      When it was a server, you would have to open up all kinds of ports on your firewall to get this to work. When using HTTP-push, it actually is a continuously open HTTP get-request and therefore can pass through a normal firewall without problems.
      Last edited by fraggel; 3 October 2014, 10:30 AM.

      Comment

      • KW1816
        Automated Home Jr Member
        • Feb 2004
        • 28

        #18
        I'd be very interested in hearing how you get on with linking evohome to Homeseer - I was planning on having a look at this when I have some time, I've been running HS for quite a few years and installed Evohome last month. Scripting/programming was never my strong point however

        Comment

        • magga
          Automated Home Jr Member
          • Sep 2014
          • 24

          #19
          Hi guys,

          With the help of Roy and Andrew's code, I've put together a web (PHP) version of the evohome controller. It's very much work in progress at the moment, I would like to pull the data in real time eventually (currently only the time and date update in real time), and then at least have a further screen where you can set the target temperature by clicking on a zone, along with a quick actions screen. Let me know your thoughts on this, and if you see any problems with it. It's currently pulling the temperatures in my house, but I can easily add a login box if anyone would like to see it working for their own system?

          Evohome Web Controller
          Last edited by magga; 15 October 2014, 02:54 PM.

          Comment

          • fraggel
            Automated Home Lurker
            • Oct 2014
            • 2

            #20
            The conversion from python to C# is complete and works like a charm.
            I am now looking into the HS3 api. Unfortunately, the developer documentation is quite sluggish and far from complete.
            I hope to find some example plugins someware. I have added some plugins myself and looked at the decompiled source, but most of them weren't written by professional programmers, making the code dreadfull to read.

            Comment

            • watchforstock
              Automated Home Jr Member
              • Mar 2014
              • 20

              #21
              Looks really good. If it wasn't for javascript's cross origin protection, it would be possible to do all of this client side (which would mean that credentials wouldn't need to be sent to a third party). Haven't spotted a route around that yet.

              On the other hand, I noticed that the if-this-then-that system is obviously given an OAuth style authentication to the evohome backend meaning that you don't need to give them your username and password so maybe this shows the direction Honeywell are going with allowing other applications access to the evohome data.

              Comment

              • weejimmy
                Automated Home Jr Member
                • Oct 2014
                • 10

                #22
                Hi All,

                It's good to see so many creative solutions!

                I have also been playing around and have managed to get the data from my two locations into some real time trends. The setup is a bit OTT for home use, but it is fun!



                The basic system is:
                • I have a modified version of the Python that outputs a single value per device per location when it runs.
                • I then scheduled the Python script to run once a minute in Task Scheduler on my PC. The output from each run is piped to a CSV file (which is overwritten once a minute).
                • A second process is monitoring the CSV file and making the latest data available via OPC (Ole for Process Control).
                • An OPC historian is then time stamping and archiving the data.
                • I am then viewing the live data (and history) in a desktop trend application.
                Attached Files

                Comment

                • weejimmy
                  Automated Home Jr Member
                  • Oct 2014
                  • 10

                  #23
                  Another set of trends. This time Setpoints Vs Temps. Some really useful things are apparent.
                  1. Window detection in the downstair Cloakroom at 8:07 am.
                  2. Pointless SP change in the Kitchen at 8:00am which caused a two hour heat 'tail'...
                  3. A rogue Setpoint at 9:00am in Harry's room (SP goes from 17 to 20 and then back again)


                  Comment

                  • magga
                    Automated Home Jr Member
                    • Sep 2014
                    • 24

                    #24
                    Hi weejimmy,

                    That's some data you've got going on there!

                    Interesting to see those things that you mention above. If you take a look at my graphs (just click on any room on the link below), I don't get any of this kind of thing, the setpoints always seem to be correct. I do get the temperatures going a fair bit above the setpoints in some rooms, though.

                    Evohome Web Controller

                    Matt

                    Comment

                    • omega015
                      • Oct 2014
                      • 1

                      #25
                      Originally posted by magga View Post
                      Hi guys,

                      With the help of Roy and Andrew's code, I've put together a web (PHP) version of the evohome controller. It's very much work in progress at the moment, I would like to pull the data in real time eventually (currently only the time and date update in real time), and then at least have a further screen where you can set the target temperature by clicking on a zone, along with a quick actions screen. Let me know your thoughts on this, and if you see any problems with it. It's currently pulling the temperatures in my house, but I can easily add a login box if anyone would like to see it working for their own system?

                      Evohome Web Controller
                      Great work magga, looks really nice and I see some additional automation stuff in there for the devices like lights and fire.

                      Do you have a public version of the source? or copy of this as I would love to integrate this with the code Roy/Andrew have given and do some playing about myself.

                      Thanks,

                      Michael.

                      Comment

                      • magga
                        Automated Home Jr Member
                        • Sep 2014
                        • 24

                        #26
                        Originally posted by omega015 View Post
                        Great work magga, looks really nice and I see some additional automation stuff in there for the devices like lights and fire.

                        Do you have a public version of the source? or copy of this as I would love to integrate this with the code Roy/Andrew have given and do some playing about myself.

                        Thanks,

                        Michael.
                        Thanks Michael.

                        It's not really structured well enough to release to the public, it's very bespoke to my setup at the moment. It could be made more modular to suit more setups if there was enough demand, though. In the meantime, feel free to steal the CSS for your own use

                        Comment

                        • PhilDunford
                          Automated Home Lurker
                          • Oct 2014
                          • 2

                          #27
                          I think there would be lots of demand for such an interface. I had assumed it would come 'out of the box' with evohome. The system is working well, but local computer control seems a no-brainer to me.

                          Comment

                          • magga
                            Automated Home Jr Member
                            • Sep 2014
                            • 24

                            #28
                            Noticed that the evohome app has been updated with scheduling capabilities now, so this must mean it's possible to set schedules via the API! I'll post further details in here when I work out what URL and commands are, unless someone else beats me too it

                            Comment

                            • watchforstock
                              Automated Home Jr Member
                              • Mar 2014
                              • 20

                              #29
                              Originally posted by magga View Post
                              Noticed that the evohome app has been updated with scheduling capabilities now, so this must mean it's possible to set schedules via the API! I'll post further details in here when I work out what URL and commands are, unless someone else beats me too it
                              Just waiting for them to push the Android update and I'll be on it. I'm looking forward to the ability to back up and restore the schedules!

                              Comment

                              • magga
                                Automated Home Jr Member
                                • Sep 2014
                                • 24

                                #30
                                Have managed to get the URLS for scheduling, but I've also discovered that my app uses the EMEA version of the Evohome API, which is different to the code posted here.

                                For one, the authentication is completely different, in that it uses OAuth, which makes things complicated because I either now need to use 2 different types of auth, or rewrite it all to work with the EMEA API

                                Secondly, the format of the JSON returned is completely different, different information is returned, in different structures.

                                Interesting that they are using 2 different APIs, yet it's possible for me (and presumably, anyone else), to access either of them. It would be interesting to see if US people are able to access the EMEA API.

                                Anyhow, the URL for scheduling (on the EMEA api), is as below:

                                Comment

                                Working...
                                X