Decoded - EvoHome API access to control remotely.

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

    Were you polling it to often ? I only poll it once every 5 minutes.

    Also, post the SSL error you get - is it an SSL3 error by any chance ?

    Edit: I take it back, my graphs all stopped at 10:20pm last night. So something is definitely up. API V2 also not working. Both with an SSL error. The iPhone app is still connecting ok.
    Last edited by DBMandrake; 9 January 2016, 03:12 PM.

    Comment

    • nico
      Automated Home Jr Member
      • Oct 2015
      • 14

      I'm polling every 30 minutes to save and graph data, plus single call once in a while to set temperature. As I said, I made more calls to test the new script, I hope they didn't banned me for that.
      Here's the error:
      Code:
      Traceback (most recent call last):
        File "evohome-client/temp.py", line 7, in <module>
          for device in client.temperatures():
        File "/home/pi/evohome-client/evohomeclient/__init__.py", line 74, in temperatures
          self._populate_full_data(force_refresh)
        File "/home/pi/evohome-client/evohomeclient/__init__.py", line 33, in _populate_full_data
          self._populate_user_info()
        File "/home/pi/evohome-client/evohomeclient/__init__.py", line 68, in _populate_user_info
          response = requests.post(url,data=json.dumps(self.postdata),headers=self.headers)
        File "/usr/lib/python2.7/dist-packages/requests/api.py", line 94, in post
          return request('post', url, data=data, json=json, **kwargs)
        File "/usr/lib/python2.7/dist-packages/requests/api.py", line 49, in request
          return session.request(method=method, url=url, **kwargs)
        File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 457, in request
          resp = self.send(prep, **send_kwargs)
        File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 569, in send
          r = adapter.send(request, **kwargs)
        File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 420, in send
          raise SSLError(e, request=request)
      requests.exceptions.SSLError

      Comment

      • DBMandrake
        Automated Home Legend
        • Sep 2014
        • 2361

        I've done a little bit of digging and it looks like there is a problem with the SSL certificates on rs.alarmnet.com.

        If I try to access it using lynx on Linux (on the same machine that does the graphing) I get: SSL error:the certificate has no known issuer-Continue?

        If I try to access it with Google Chrome on Windows I don't get an error, however analysing their server with SSL labs shows a problem:



        "This server's certificate chain is incomplete. Grade capped to B."

        and in additional certificates:

        "Chain issues Incomplete"

        So it looks like there has been a change to their server certificates that is upsetting some (but not all) clients.

        As a workaround it should be possible to download the missing certificate and put it in the certificate store on the device running the Python API.

        Comment

        • DBMandrake
          Automated Home Legend
          • Sep 2014
          • 2361

          Until they fix their missing intermediate certificate, I have a workaround that is working for me on Raspbian. (Debian based)

          First download the missing intermediate certificate from here:

          rs.alarmnet.com.txt

          (I extracted this from the ssl labs report page I linked earlier - it's the middle certificate in the trust of chain)

          Save that as a file called rs.alarmnet.com.crt and put it in /usr/local/share/ca-certificates/ then run:

          sudo update-ca-certificates

          This will add the missing intermediate certificate in the trusted certificate store and should solve the SSL errors.

          If you want to remove the certificate later delete the file then run:

          sudo update-ca-certificates --fresh
          Last edited by DBMandrake; 9 January 2016, 04:59 PM.

          Comment

          • nico
            Automated Home Jr Member
            • Oct 2015
            • 14

            You actually are Mandrake!
            I couldn't get things working downloading your attachment, so I redownloaded the additional certificate from sslabs and followed your instruction to fix my raspberry!
            Thank you!!!
            I attach the working (for me) zipped certificate.

            I also found an API Help Page for TCC (with the same client certificate issue), I think they are working on it to make it like the Lyric public api page:
            Attached Files

            Comment

            • PaulB
              Automated Home Sr Member
              • Sep 2015
              • 60

              Originally posted by Caesium View Post
              No, it doesn't
              Would be nice if this was possible...

              Hopefully a future feature!

              Comment

              • Krejt
                Automated Home Jr Member
                • Jan 2016
                • 21

                I'd like to confirm DB Mandrake's observation that the rs.alarmnet.com webserver generates a lot of HTTP/1.1 500 Internal Server Errors when using the evohomeclient V2 API. This results in lots of "ValueError: No JSON object could be decoded" error messages, not providing the requested temperatures, obviously....

                Originally posted by DBMandrake View Post
                One thing I immediately noticed is that I was getting a lot of gaps in my graphs and doing a little bit of debugging directly with some python code calling watchforstock's libraries I realised the issue is nothing local but rather that approximately 20-30% of the calls to the servers are failing with HTTP 500 errors... ... There is no particular pattern except that the failure rate is pretty consistent and it's always an HTTP 500 error. Another thing that suggests its not rate limiting related is that I can retry just a few seconds later and nearly every time it will go through. And it doesn't matter whether I wait 10 seconds or a minute to retry, the chance of success is about the same. ... On a hunch I tried switching the script to use the V1 API instead of the V2 API ... Presto - no more random server failures, so far it's succeeding every time although I haven't given it a full 24 hours yet to see if there are any gaps in the graph.
                I have exacly the same problem. Similar to Mandrake I set a cron job to gather our room temperatures every 5 minutes using the evohomeclient2. After a few days I wondered why my graphs showed lots of 'holes'. I then noticed lots of "ValueError: No JSON object could be decoded" messages in the logfile of the cron job. With the debug option set I noticed all the missing JSON data is caused bij the same Error 500's Mandrake experienced. I think most (if not all?) of the people who use the V2 API experience the same problem, but might not be aware of the cause.

                Switching to the version 1 evohomeclient API solved the problem immediately and completely. I haven't experienced any error 500's yet using the old API.
                Using the V2 API I can easily reproduce the error 500 messages.

                I wonder of is anybody at Honeywell is aware of this problem with the V2 API, or rather with the alarmnet server?
                Does somebody have any idea who to contact at Honeywell to file a report about this problem, assuming this is a problem of the alarmnet server?
                Evohomeclient temperatures on ThingSpeak: https://thingspeak.com/channels/79213

                Comment

                • paulockenden
                  Automated Home Legend
                  • Apr 2015
                  • 1719

                  The V2 API has been (randomly) broken for some time now. It's strange how it sometimes works and sometimes doesn't. I suspect there are multiple servers behind a load balancer (or perhaps just using round-robin DNS), and that one of them is borked.

                  I'm surprised it hasn't been fixed yet.

                  Comment

                  • jzwack-honeywell
                    Automated Home Jr Member
                    • Jan 2016
                    • 36

                    Hey everyone!

                    My name is Joe Zwack, I'm the API Evangelist for Honeywell on the Connected Home side. I'm based in Minnesota, USA.

                    I'm trying to catch up to some of the issues here.. but the first thing I've noticed is the domain you're using. I see a few references to rs.alarmnet.com/totalconnectcomfort, switch that to tccna.honeywell.com. Make sure you drop the /totalconnectcomfort Those alarmnet servers are being repurposed/decomissioned and eventually that domain just won't work anymore. That might explain some of the issues you're seeing, can you try changing that domain first and let me know if you're still seeing the timeouts/50x/certificate errors?
                    Last edited by jzwack-honeywell; 19 January 2016, 09:23 PM. Reason: Made a URI mistake
                    developer.honeywell.com | I work for Honeywell. API Evangelist. Views are my own.

                    Comment

                    • Otto-Mate
                      Founder
                      • Jan 2004
                      • 882

                      Hi Joe - welcome to the forums and thanks for the info.

                      Can you tell us if Honeywell are any closer to providing their own web interface to evohome?

                      Thanks

                      M.
                      Last edited by Otto-Mate; 19 January 2016, 06:13 PM. Reason: typo
                      Editor AutomatedHome.co.uk


                      www.facebook.com/AutomatedHomeUK
                      www.twitter.com/ottomate
                      www.instagram.com/automatedhome/

                      Comment

                      • jzwack-honeywell
                        Automated Home Jr Member
                        • Jan 2016
                        • 36

                        Thanks for the warm welcome!

                        You mean as opposed to the mobile app, something in the browser? I can check, but we have a website like that for our North America thermostats like that, and the vast bulk of our usage is on the mobile app still.
                        developer.honeywell.com | I work for Honeywell. API Evangelist. Views are my own.

                        Comment

                        • Otto-Mate
                          Founder
                          • Jan 2004
                          • 882

                          Yes Joe, browser access.

                          Thanks

                          M.
                          Editor AutomatedHome.co.uk


                          www.facebook.com/AutomatedHomeUK
                          www.twitter.com/ottomate
                          www.instagram.com/automatedhome/

                          Comment

                          • Krejt
                            Automated Home Jr Member
                            • Jan 2016
                            • 21

                            Great to see you here Joe! .... Thats the kind of Evangelisation we like! I think you'll notice that a lot of the people active with the client and API around the globe got somehow gathered together on this forum! I for sure like this hotspot a lot!

                            I'm sure your reference to rs.alarmnet.com and switching that to tccna.honeywell.com will be picked up by the people (most notably Andrew Stock) working on the evohomeclient lots of us here use. (See https://github.com/watchforstock/evohome-client and http://evohome-client.readthedocs.org/en/latest/) The domain used is configured somewhere in the client... Are things like the domain the client should use (and related things, features and functions of the API) publically documented and maintained somewhere where we can access it? (or only behind developper accounts that dont's seem to be available to us?)

                            I hope you can answer some of the other API related questions and ideas(!) on this forum??
                            Evohomeclient temperatures on ThingSpeak: https://thingspeak.com/channels/79213

                            Comment

                            • jzwack-honeywell
                              Automated Home Jr Member
                              • Jan 2016
                              • 36

                              Originally posted by Krejt View Post
                              Great to see you here Joe! .... Thats the kind of Evangelisation we like! I think you'll notice that a lot of the people active with the client and API around the globe got somehow gathered together on this forum! I for sure like this hotspot a lot!
                              One of my UK friends sent this to me this morning, so here I am! Happy to be of service!

                              Originally posted by Krejt View Post
                              The domain used is configured somewhere in the client... Are things like the domain the client should use (and related things, features and functions of the API) publically documented and maintained somewhere where we can access it? (or only behind developper accounts that dont's seem to be available to us?)

                              I hope you can answer some of the other API related questions and ideas(!) on this forum??
                              I have a half answer to that question, so as mentioned in a few places here we have the developer.honeywell.com site (since August of 2015) that we launched just for Lyric Round Thermostat. The trick is that API and the API for the rest of our thermostats (and the EvoHome) are different backends. So hence two APIs. I don't have any automated way of giving access to that API right now, so it's all manual. Plus it uses a different environment for development (which means I have to push special firmware to your thermostat). Ideally I want to remove some of those barriers so you all can have your own API access.

                              That being said, I AM working on putting the documentation for the TCC API on that developer portal in a separate section, to help you out with what you're asking. So just giving out access will be slow.

                              Oh, and feel free to PM me questions you think I can answer. I'll never be able to catch some of the historical ones.
                              developer.honeywell.com | I work for Honeywell. API Evangelist. Views are my own.

                              Comment

                              • Krejt
                                Automated Home Jr Member
                                • Jan 2016
                                • 21

                                Originally posted by jzwack-honeywell View Post
                                I see a few references to rs.alarmnet.com, switch that to tccna.honeywell.com
                                Switching to the tccna.honeywell.com host doesn't seem to be as simple as to search and replace that host name in all evohomeclient2 files. I tried that (being totally clueless ;-) and hit a HTTP/1.1 404 Not Found error on the very first request. I bet the tccna.honeywell.com machine uses different directories. This is something for smarter guys like watchforstock to look into ;-)
                                Evohomeclient temperatures on ThingSpeak: https://thingspeak.com/channels/79213

                                Comment

                                Working...
                                X