Jump to content

Honeywell Home Polyglot-Cloud


memphis2k

Recommended Posts

@dbarentine, I'd like to understand the flow from the ISY to the thermostats and back and I thought I'd ask the question here for others possible benefit.

As I surmise, the ISY communicates with the Polyglot Cloud Server (PGS) program.  PGS then translates ISY format into Honeywell API format and links to the Honeywell Home (HH) server in the cloud.  The HH server then links to the thermostats in my house. 

Now, since HH doesn't want to deal with API users routinely (I assume), it waits until a request comes in (in this case a poll from PGS) and responds with what it knows of the thermostat state.  And HH might not be completely up to date on the actual thermostat state because of communication delays between HH and the thermostat, but from what I see that delay is only several seconds most of the time.

From what I see looking at the PGS log, it appears PGS echos back to HH what it received as a result of it's poll.  It does this beginning around 5 seconds after receipt of poll data.  Is this correct?  And if an ISY program changed a parameter in that 5 second interval what impact would that have.  I'm trying to see if I need to delay any decisions by the ISY programs until all the polling back and forth is over.

Do I understand correctly?

 

And v1.3.1 continues to work correctly.

Link to comment
Share on other sites

Yes you understand the flow correctly. But I wouldn't say the HH API doesn't want to deal with API users. It's a pretty standard REST API that allows for clients to get or modify data as they see fit.

There are methods for more real-time push style updates from the API itself. But they involve setting up an Azure event hub which individual users would have to do. And even then it wouldn't really change the node server behavior as it only updates the ISY on polling.

The node server itself doesn't echo back to HH on an API call, but it does log various things related to the API call. That is mainly so I have trace logs in case there are issues. I don't know the exact timing between getting the data from the API and reporting it back to the ISY. It would depend somewhat on if it needed to be retried, what actions were required, and how long the API calls actually took.

If you were to change a parameter in the time between the API call and updating the ISY the impact would depend on what you are trying to do. In general if you are change some value in the thermostat it would be good to give it a certain delay before checking if it's been updated and/or retrying. That being said I think all the actions for the HH node server now will update the values as part of the update command call. So by the time it returns to the ISY everything should be updated.

Link to comment
Share on other sites

10 hours ago, Colecaz said:

@TJF1960 , @dbarentine was helping me yesterday and a version of the node server got posted that had the problems you are having. He replaced it last night with version 1.3.1 that is fixed.  Update Polyglot with that version and you should be good.

Thanks Colecaz! That did the trick.

-Tim

Link to comment
Share on other sites

After updating to the newest version I didn't have much time to test. I checked if settings were available in programs and they were. This morning I had more time to test. All of the current values displayed in the admin console are correct and do change when I adjust the tstat  itself. However I cannot change any settings from the admin console. 

On the previous version the admin console did control the tstat.

I do still have Nodelink connected and still set up to control the tstat and any setting changes made in Nodelink node do change the tstat and this node server updates with the correct settings as well.

In the below log I changed both the heat and cool settings.

Any help would be appreciated.

Tim

 

2020-04-18 06:32:06,542 [Controller] [INFO ] Updating Driver 00d02db94557 - CLISPC: 74, uom: 17
2020-04-18 06:32:06,543 [Controller] [DEBUG] HwhF:00d02db94557:Home - France House:_update: setDriver(CLIMD,0)
2020-04-18 06:32:06,544 [Controller] [DEBUG] HwhF:00d02db94557:Home - France House:_update: setDriver(CLIFS,0)
2020-04-18 06:32:06,544 [Controller] [DEBUG] HwhF:00d02db94557:Home - France House:_update: setDriver(CLIHUM,128)
2020-04-18 06:32:06,545 [Controller] [DEBUG] HwhF:00d02db94557:Home - France House:_update: setDriver(CLIHCS,0)
2020-04-18 06:32:06,546 [Controller] [DEBUG] HwhF:00d02db94557:Home - France House:_update: setDriver(CLIFRS,0)
2020-04-18 06:32:06,546 [Controller] [DEBUG] HwhF:00d02db94557:Home - France House:_update: setDriver(GV1,0)
2020-04-18 06:32:06,547 [Controller] [DEBUG] HwhF:00d02db94557:Home - France House:_update: setDriver(GV2,1)
2020-04-18 06:32:06,548 [Controller] [DEBUG] HwhF:00d02db94557:Home - France House:_update: setDriver(GV3,0)
2020-04-18 06:32:06,548 [Controller] [DEBUG] HwhF:00d02db94557:Home - France House:_update: setDriver(GV4,3)
2020-04-18 06:32:06,549 [Controller] [INFO ] Updating Driver 00d02db94557 - GV4: 3, uom: 25
2020-04-18 06:32:06,550 [Controller] [DEBUG] HwhF:00d02db94557:Home - France House:_update: setDriver(GV5,False)
2020-04-18 06:32:06,551 [Controller] [DEBUG] HwhF:00d02db94557:Home - France House:_update: setDriver(GV6,1)
2020-04-18 06:32:06,552 [Controller] [DEBUG] HwhF:00d02db94557:Home - France House:_update: setDriver(GV7,1587216726)
2020-04-18 06:32:06,553 [Controller] [INFO ] Updating Driver 00d02db94557 - GV7: 1587216726, uom: 110
2020-04-18 06:32:06,554 [Controller] [INFO ] Updating All Drivers to ISY for Home - France House(00d02db94557)
2020-04-18 06:32:06,570 [Controller] [INFO ] Updating All Drivers to ISY for Home - France House(00d02db94557)
2020-04-18 06:34:07,200 [Controller] [DEBUG] (invalid_token) Unauthorized, Retrying in 3 seconds...
2020-04-18 06:34:11,048 [Controller] [DEBUG] Setting cool setpoint for 00d02db94557 to 78
2020-04-18 06:34:12,002 [Controller] [ERROR] Could not set thermostat set point 00d02db94557 because (400)
Reason: Bad Request
HTTP response headers: HTTPHeaderDict({'Access-Control-Allow-Credentials': 'true', 'Access-Control-Allow-Headers': 'Content-Type, Accept, Pragma, Cache-Control, Authorization, RequestVerificationToken', 'Access-Control-Allow-Origin': 'https://account.honeywellhome.com', 'Cache-Control': 'no-cache', 'Content-Type': 'application/json', 'Date': 'Sat, 18 Apr 2020 13:34:11 GMT', 'Expires': '-1', 'Pragma': 'no-cache', 'Strict-Transport-Security': 'max-age=31536000', 'Content-Length': '79', 'Connection': 'keep-alive'})
HTTP response body: 
                {"code":400, "message":"'NextTime' is required."}
            
Traceback (most recent call last):
  File "/home/pi/.polyglot/nodeservers/HoneywellHome/thermostat.py", line 201, in cmdSetPF
    self._api.set_setpoint(self._location_id, self._thermostat_id, h_setpoint, cmd['value'], self._use_celsius, mode, auto_changeover_active)
  File "/home/pi/.polyglot/nodeservers/HoneywellHome/api_helper.py", line 56, in set_setpoint
    self._call_api(lambda: self._api.v2_devices_thermostats_device_id_post(self._client_id, self._user_id, location_id, thermostat_id, update))
  File "/home/pi/.polyglot/nodeservers/HoneywellHome/retry.py", line 27, in f_retry
    return f(*args, **kwargs)
  File "/home/pi/.polyglot/nodeservers/HoneywellHome/api_helper.py", line 73, in _call_api
    return function()
  File "/home/pi/.polyglot/nodeservers/HoneywellHome/api_helper.py", line 56, in <lambda>
    self._call_api(lambda: self._api.v2_devices_thermostats_device_id_post(self._client_id, self._user_id, location_id, thermostat_id, update))
  File "/home/pi/.polyglot/nodeservers/HoneywellHome/honeywell_home/api/default_api.py", line 471, in v2_devices_thermostats_device_id_post
    return self.v2_devices_thermostats_device_id_post_with_http_info(apikey, user_ref_id, location_id, device_id, update_thermostat, **kwargs)  # noqa: E501
  File "/home/pi/.polyglot/nodeservers/HoneywellHome/honeywell_home/api/default_api.py", line 581, in v2_devices_thermostats_device_id_post_with_http_info
    collection_formats=collection_formats)
  File "/home/pi/.polyglot/nodeservers/HoneywellHome/honeywell_home/api_client.py", line 341, in call_api
    _preload_content, _request_timeout, _host)
  File "/home/pi/.polyglot/nodeservers/HoneywellHome/honeywell_home/api_client.py", line 172, in __call_api
    _request_timeout=_request_timeout)
  File "/home/pi/.polyglot/nodeservers/HoneywellHome/honeywell_home/api_client.py", line 386, in request
    body=body)
  File "/home/pi/.polyglot/nodeservers/HoneywellHome/honeywell_home/rest.py", line 276, in POST
    body=body)
  File "/home/pi/.polyglot/nodeservers/HoneywellHome/honeywell_home/rest.py", line 229, in request
    raise ApiException(http_resp=r)
honeywell_home.exceptions.ApiException: (400)
Reason: Bad Request
HTTP response headers: HTTPHeaderDict({'Access-Control-Allow-Credentials': 'true', 'Access-Control-Allow-Headers': 'Content-Type, Accept, Pragma, Cache-Control, Authorization, RequestVerificationToken', 'Access-Control-Allow-Origin': 'https://account.honeywellhome.com', 'Cache-Control': 'no-cache', 'Content-Type': 'application/json', 'Date': 'Sat, 18 Apr 2020 13:34:11 GMT', 'Expires': '-1', 'Pragma': 'no-cache', 'Strict-Transport-Security': 'max-age=31536000', 'Content-Length': '79', 'Connection': 'keep-alive'})
HTTP response body: 
                {"code":400, "message":"'NextTime' is required."}
            

2020-04-18 06:34:17,006 [Controller] [DEBUG] Setting heat setpoint for 00d02db94557 to 68
2020-04-18 06:34:22,789 [Controller] [ERROR] Could not set thermostat set point 00d02db94557 because (400)
Reason: Bad Request
HTTP response headers: HTTPHeaderDict({'Access-Control-Allow-Credentials': 'true', 'Access-Control-Allow-Headers': 'Content-Type, Accept, Pragma, Cache-Control, Authorization, RequestVerificationToken', 'Access-Control-Allow-Origin': 'https://account.honeywellhome.com', 'Cache-Control': 'no-cache', 'Content-Type': 'application/json', 'Date': 'Sat, 18 Apr 2020 13:34:22 GMT', 'Expires': '-1', 'Pragma': 'no-cache', 'Strict-Transport-Security': 'max-age=31536000', 'Content-Length': '79', 'Connection': 'keep-alive'})
HTTP response body: 
                {"code":400, "message":"'NextTime' is required."}
            
Traceback (most recent call last):
  File "/home/pi/.polyglot/nodeservers/HoneywellHome/thermostat.py", line 197, in cmdSetPF
    self._api.set_setpoint(self._location_id, self._thermostat_id, cmd['value'], c_setpoint, self._use_celsius, mode, auto_changeover_active)
  File "/home/pi/.polyglot/nodeservers/HoneywellHome/api_helper.py", line 56, in set_setpoint
    self._call_api(lambda: self._api.v2_devices_thermostats_device_id_post(self._client_id, self._user_id, location_id, thermostat_id, update))
  File "/home/pi/.polyglot/nodeservers/HoneywellHome/retry.py", line 27, in f_retry
    return f(*args, **kwargs)
  File "/home/pi/.polyglot/nodeservers/HoneywellHome/api_helper.py", line 73, in _call_api
    return function()
  File "/home/pi/.polyglot/nodeservers/HoneywellHome/api_helper.py", line 56, in <lambda>
    self._call_api(lambda: self._api.v2_devices_thermostats_device_id_post(self._client_id, self._user_id, location_id, thermostat_id, update))
  File "/home/pi/.polyglot/nodeservers/HoneywellHome/honeywell_home/api/default_api.py", line 471, in v2_devices_thermostats_device_id_post
    return self.v2_devices_thermostats_device_id_post_with_http_info(apikey, user_ref_id, location_id, device_id, update_thermostat, **kwargs)  # noqa: E501
  File "/home/pi/.polyglot/nodeservers/HoneywellHome/honeywell_home/api/default_api.py", line 581, in v2_devices_thermostats_device_id_post_with_http_info
    collection_formats=collection_formats)
  File "/home/pi/.polyglot/nodeservers/HoneywellHome/honeywell_home/api_client.py", line 341, in call_api
    _preload_content, _request_timeout, _host)
  File "/home/pi/.polyglot/nodeservers/HoneywellHome/honeywell_home/api_client.py", line 172, in __call_api
    _request_timeout=_request_timeout)
  File "/home/pi/.polyglot/nodeservers/HoneywellHome/honeywell_home/api_client.py", line 386, in request
    body=body)
  File "/home/pi/.polyglot/nodeservers/HoneywellHome/honeywell_home/rest.py", line 276, in POST
    body=body)
  File "/home/pi/.polyglot/nodeservers/HoneywellHome/honeywell_home/rest.py", line 229, in request
    raise ApiException(http_resp=r)
honeywell_home.exceptions.ApiException: (400)
Reason: Bad Request
HTTP response headers: HTTPHeaderDict({'Access-Control-Allow-Credentials': 'true', 'Access-Control-Allow-Headers': 'Content-Type, Accept, Pragma, Cache-Control, Authorization, RequestVerificationToken', 'Access-Control-Allow-Origin': 'https://account.honeywellhome.com', 'Cache-Control': 'no-cache', 'Content-Type': 'application/json', 'Date': 'Sat, 18 Apr 2020 13:34:22 GMT', 'Expires': '-1', 'Pragma': 'no-cache', 'Strict-Transport-Security': 'max-age=31536000', 'Content-Length': '79', 'Connection': 'keep-alive'})
HTTP response body: 
                {"code":400, "message":"'NextTime' is required."}
            

2020-04-18 06:37:05,755 [Controller] [INFO ] Updating All Drivers to ISY for Honeywell Home Controller(controller)

 

Link to comment
Share on other sites

I found two things that helped me cure problems.  Delete the node completely in Polyglot and repeat the reinstall process from the point of reauthorizing the Honeywell API server with the two id's from the developer setup.  Then install 1.3.1 in Polyglot and enter the id's there.  Then stop and restart Polyglot.  Things then worked as they should.  I've been testing a dual thermostat setup using 1.3.1 and have found no bugs.

My log looked like yours until I went through the whole reinstall process.

Good luck.

Link to comment
Share on other sites

Thanks for the quick response Colecaz.

I just tried your suggestions twice. Same thing. Yesterday I found I had to delete the node, reboot my pi and reboot isy before reinstalling the node. So I did as you suggested including reauthorizing the api. I am still not able to change the tstat from the admin console. And with the same errors. 

Question, I know a long time ago there was an issue with Poly or isy that if you deleted a node server you might have to try and reinstall it in a different slot in Poly, did you reinstall in the same slot or new ones?

Link to comment
Share on other sites

In my original setup I installed in slot 1.  During subsequent uninstall/reinstalls slot 1 developed issues so I started using slot 2.  So far, slot 2 has worked fine for several reinstall cycles and that's what I'm using currently.

Also, I just remembered.  The funny log entries that have reference to files and errors that I had seemed to be related to errors in my ISY program operation from programs I was trying before I really understood how the ISY O.S. worked.  I think.  I've been working on this project almost full time during this CV period so some of my trial and error actions get confused in recall...Lol. 

Oh, I just noticed you're using a Raspberry Pi.  I working with polyglot cloud.

Link to comment
Share on other sites

I totally get that. Working so long with these things it is easy to get events confused.

I am wondering if it might have something to do with my old tstat. But then I was able to set temps and modes on the previous version I just was not able to see them in programs. Now I can see them in programs but just cant change the settings. 

I wish I was able to revert back to the previous just for testing. 

Anyway, Thanks for your suggestions!

Link to comment
Share on other sites

FYI, @TJF1960, I started with older thermostats too.  RTH6580WF.  I had to import it from Total Connect Comfort to Honeywell Home and had problems working with Polyglot, kind of like I think you're having.  I finally figured if I was going to put this much effort into it and wanted it to work reliably for my application I would get thermostats that Honeywell Home recognized directly.  I started with T5 Plus for ~$150 but my wife didn't like the color/style (Ha!).  So I found some T6 Pro's on Amazon for $100 (ok, everybody wins) and they've been working fine and predictably.  @dbarentine was going to look at his node software to see what was wrong with the RTH operation but I told him about my new T6 and he didn't need to spend the time on the old one if he didn't want to.  So AFAIK he's not looking backwards.

If it's an option for you, upgrading to one of the newer ones might make things easier.

Good Luck...

Link to comment
Share on other sites

@TJF1960 I haven't looked at it yet but as @Colecaz mentioned it seems like there is an issue with the older thermostats. We don't specify NextTime when making updates to the Honeywell API. This is supposed to (according to their API docs) hold until the next period time. But it seems like it doesn't work that way in the Honeywell Home API for certain thermostats hence the error.

I'll have to think about how to address that because changing it may break updating newer thermostats. Part of the problem here is I don't have an old thermostat that I can reproduce the issue with.

Link to comment
Share on other sites

@Colecaz If you aren't using it any longer I'd certainly be open to it.

I've been giving it some thought and I think I know how to address it but obviously it's just a guess at the moment since I don't have one to test against.

Link to comment
Share on other sites

  • 2 weeks later...

Polyglot polls Honeywell Home at the interval set in the "longPoll" parameter on the configuration page of the node.  It appears the thermostat talks to Honeywell whenever it detects a change in its settings or readings.  It also looks like Polyglot tells Honeywell whenever it has a change, regardless of poll settings 

Link to comment
Share on other sites

  • 4 months later...

I've been using the HoneywellHome node server for a while now with a Honeywell Wi-Fi 9000 thermostat, and it has worked quite well.  In the last week or two, I noticed some things weren't working quite right but it took me a little while to investigate. In the process, I decided to clean things out with the node server and start over following the directions here:  https://github.com/dbarentine/udi-honeywellhome-poly 

When I get to the point after logging in to Honeywell Home and authorizing the ISY Nodeserver for access, it no longer sees any of my thermostats that I can allow to connect.  However, I am still able to see and control them via the Honeywell Home app on an iPhone.  Any suggestions on how to proceed? 

Link to comment
Share on other sites

  • 2 weeks later...

I am having a similar issue. When logged into https://udi-honeywellhome-auth.azurewebsites.net/ and entering credentials for honeywell home and hitting allow I get the following error

Response

Unable to cast object of type 'Newtonsoft.Json.Linq.JObject' to type 'Newtonsoft.Json.Linq.JArray'.

 

 

null

 

Any help would be appreciated.

-Tim

Link to comment
Share on other sites

56 minutes ago, TJF1960 said:

I am having a similar issue. When logged into https://udi-honeywellhome-auth.azurewebsites.net/ and entering credentials for honeywell home and hitting allow I get the following error

Response

Unable to cast object of type 'Newtonsoft.Json.Linq.JObject' to type 'Newtonsoft.Json.Linq.JArray'.

 

 


null

 

Any help would be appreciated.

-Tim

Dollars to donuts, that's a backend .NET problem on the Honeywell Home servers.  Likely completely outside of your control.  You might look for a support phone # or email address on the Honeywell Home web site and inform them of the issue.

Link to comment
Share on other sites

4 hours ago, Bumbershoot said:

Dollars to donuts, that's a backend .NET problem on the Honeywell Home servers.  Likely completely outside of your control.  You might look for a support phone # or email address on the Honeywell Home web site and inform them of the issue.

Thanks for reponding.  I tweeted to Honeywell support about week ago, and they were pretty prompt about responding.  Eventually, they suggested I contact developerinfo@resideo.com, so I promptly sent an email to that address.  A week has gone by now and there has still been no response.  Pretty disappointing, as my Honeywell automations are broken until something on the backend gets fixed I guess.  

Link to comment
Share on other sites

@dwengrovitz @TJF1960 what URL is in the address bar when you see the error? It's likely that's on my end not on Honeywell's. That UI is built in .NET and Honeywell's API's typically aren't as far as I know.

I'm not sure if you've ever used Fiddler (https://www.telerik.com/fiddler) or the browser network tracing tool. But if you are able to it would be great if you could capture a trace of logging in and getting the error and then PM it to me. Otherwise I'll try to run through the process tomorrow and try reproduce it. It's likely they changed the API response and broke something.

As for Honeywell developer support don't expect a response from that email. I tried when I first built it and finally had to private message their twitter account to get in touch with what seems to be the only developer that works on it. If it is a Honeywell problem I will see if he is still there.

On 9/23/2020 at 4:30 PM, dwengrovitz said:

When I get to the point after logging in to Honeywell Home and authorizing the ISY Nodeserver for access, it no longer sees any of my thermostats that I can allow to connect.  However, I am still able to see and control them via the Honeywell Home app on an iPhone.  Any suggestions on how to proceed? 

I assume this was before the Newtonsoft error started to appear. This one I don't know about because that thermostat selection is completely within their webpage. So the page I built doesn't control any of that. After I get the other error resolved if it is still a problem we'll probably need to see if we can loop in the Honeywell developer I mentioned above.

 

Link to comment
Share on other sites

9 hours ago, dbarentine said:

@dwengrovitz After I get the other error resolved if it is still a problem we'll probably need to see if we can loop in the Honeywell developer I mentioned above.

 

Thanks @dbarentine.  I am not seeing the Newtonsoft error.  I can successfully login to your server with the Consumer Key and Secret, and I can then enter my Honeywell Home credentials.  The back-end system just no longer sees my Honeywell Wi-Fi 9000 thermostats anymore, so the authorization process seems to grind to a halt at that point.  I'm not sure if running Fiddler will help in this situation, but I'm happy to do that if you'd like.  

Link to comment
Share on other sites

@dwengrovitz Does it still show you the found devices page after login? I'm assuming it does but with nothing on it. It might help if you could capture some screenshots or a short video.

I suspect that we'll have to contact Honeywell to figure out what happened as it sounds like it's something on their end. I'll find the contact I have and will send you some additional information. Any screen shots, information about when it last worked, etc... will be helpful.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...