Jump to content

Honeywell Home Polyglot-Cloud


memphis2k

Recommended Posts

Hello,

Recently, Honeywell let my older Wifi Thermostat (MyTotalComfort) work with the newer Honeywell Home app (Not Total Comfort 2).  So I followed the guide https://github.com/dbarentine/udi-honeywellhome-polyand got everything setup however, I am seeing an error.

2020-02-17 16:43:13,434 [Controller] [DEBUG] Query thermostat 00d02d36****
2020-02-17 16:43:13,691 [Controller] [ERROR] HwhF:Home - THERMOSTAT:_query: Refreshing thermostat 00d02d36**** failed None

I added the ****'s.

The response page from the https://udi-honeywellhome-auth.azurewebsites.net works as expected.  I can see my MAC address of the Thermostat and the Heat Set temps, etc.

Then added it to Polyglot Cloud Node Server.

Node Details
Node Name 1	Address	NodeDef	Primary Node	Is Primary	Is Controller	Time Added	Delete
00d02d36****	00d02d36****	HwhF	00d02d36****	true	false	Feb 17, 2020, 10:43:12 AM	
Driver	UOM	Value
CLIFRS	80	0
CLIFS	68	0
CLIHCS	66	0
CLIHUM	22	0
CLIMD	67	0
CLISPC	17	0
CLISPH	17	0
GV1	25	0
GV2	25	0
GV3	25	0
GV4	25	0
GV5	2	0
GV6	2	0
ST	17	0
Node Name 2	Address	NodeDef	Primary Node	Is Primary	Is Controller	Time Added	Delete
controller	controller	controller	controller	true	true	Feb 17, 2020, 10:11:50 AM	
Driver	UOM	Value
ST	2	1

 

Thermostat.png

 

Any thoughts?

 

Link to comment
Share on other sites

  • 2 weeks later...

I am seeing a similar issue to what @memphis2k reported.  I have two older Honeywell WiFi thermostats (TH9320WF5003) that have been added to Honeywell Home app, and I was able to go through the setup process for the Honeywellhome nodeserver.  user_id, client_id, and client_secret have been configured.  But discovery fails for one of the thermostats, and the other shows up in the ISY but doesn't get any updates.  

2020-02-26_19-22-46.png

Link to comment
Share on other sites

I have not tested it with any older thermostats so it wouldn't surprise me if there are some unforeseen issues. It looks like it's expecting some property that must not be present with the older thermostats.

If one of you would be willing to create a separate and temporary client_id/secret and direct message me I could figure it out quicker. If not no worries, I'll have to add some additional logging and send you an update to try and identify what is going on.

Link to comment
Share on other sites

@dwengrovitz and @memphis2k version 1.1.0 which should be in the nodeserver store shortly should resolve the discovery and update issues for both of your thermostats. There was some things that the thermostat I built it against supported that the older ones don't.

I did not test any of the commands so you may still run into some issues. But I did add some additional exception logging so it should be pretty easy to identify if you do run into anything else.

Link to comment
Share on other sites

@dbarentine Awesome ... thanks for the update.  I updated the nodeserver from the store and it was able to discover and connect to my thermostats.  I tried testing a few commands and they seemed to work.  Will do some more testing with some of the programs I have to see how that works out.  Will let you know and provide logs if I see anything that doesn't seem to work correctly.  Thanks again!

Link to comment
Share on other sites

  • 2 weeks later...

I am seeing  a problems with my Honeywell T10 Pro thermostat. The ISY seems to be inconsistently detecting the hold status using the following program:

If
        'MstrBedRoomHallway / hMainTstat' Hold Status is not Permanent Hold
Then
        Set 'MstrBedRoomHallway / hMainTstat' Schedule Mode Hold Indefinite

If the hold status is not "Permanent Hold", sometimes the program detects it, and sometimes it does not.  One possible hint is the fact that in the ISY admin console, the status has a label of "Hold Status" , yet the setting has a label of "Schedule Mode"?

image.thumb.png.5c8b18e09d93ccd8c61f9b6fe8e134fb.png

Link to comment
Share on other sites

@wmcneil One is the status, one is the command so the name difference isn't the issue. I was following the Ecobee model which is probably why I choose the Schedule Mode name. It may have made more sense to change it to Hold Mode but at this point that would be a breaking change for anyone using it in programs.

So if I understand the problem correctly the issue you are having is a Hold Status change doesn't doesn't seem to be triggering the program correctly. Is that correct?

Is the hold status being updated properly in the thermostat "Hold Status" field? e.g., It updates in what you can see but doesn't actually trigger the program.

Link to comment
Share on other sites

@dbarentine  , the Hold Status field in the Admin Console does seem to update correctly. The problem is that the program which is checking for the Hold Status not equal to "Permanent Hold" does not always detect that it is not equal.  I run the program only when I explicitly want to check/change the the setting, so the program is not dependent on being notified/triggered  due to a state change. The current choices for changing the setting (using Schedule Mode in the admin console) are: "running", "hold next", and "hold infinite". In the Honeywell App, the choices are  "permanently", hold until "a specific time", and "remove hold". 

My actual code is checking 5 different values on the thermostat (hMainTstat) as shown below:

hChkTempsStay - [ID 0022][Parent 0001]

If
        $EnChkTempsStay is not 0
    And (
             'MstrBedRoomHallway / hMainTstat' Hold Status is not Permanent Hold
          Or 'MstrBedRoomHallway / hMainTstat' Heat Setpoint is not 71°F
          Or 'MstrBedRoomHallway / hMainTstat' Cool Setpoint is not 77°F
          Or 'MstrBedRoomHallway / hMainTstat' Mode is not Auto
          Or 'MstrBedRoomHallway / hMainTstat' Fan Mode is not Auto
          Or 'Upstairs Hallway / hUpstairsThermostat' Heat Setpoint is not 70°F
          Or 'Upstairs Hallway / hUpstairsThermostat' Cool Setpoint is not 80°F
          Or 'Upstairs Hallway / hUpstairsThermostat' Mode is not Auto
          Or 'Upstairs Hallway / hUpstairsThermostat' Fan Mode is not Auto
        )
 
Then
        Set 'MstrBedRoomHallway / hMainTstat' Schedule Mode Hold Indefinite
        Set 'MstrBedRoomHallway / hMainTstat' Heat Setpoint 71°F
        Set 'MstrBedRoomHallway / hMainTstat' Cool Setpoint 77°F
        Set 'MstrBedRoomHallway / hMainTstat' Mode Auto
        Set 'MstrBedRoomHallway / hMainTstat' Fan Mode Auto
        Set 'Upstairs Hallway / hUpstairsThermostat' Heat Setpoint 70°F
        Set 'Upstairs Hallway / hUpstairsThermostat' Cool Setpoint 80°F
        Set 'Upstairs Hallway / hUpstairsThermostat' Mode Auto
        Set 'Upstairs Hallway / hUpstairsThermostat' Fan Mode Auto
        Send Notification to 'Billgmail' content 'setStayTemps'
        $EnChkTempsStay  = 0
 
Else
        $EnChkTempsStay  = 0
 

Link to comment
Share on other sites

 

@dbarentine , I am seeing an error in the nodeserver log file now. I'd say ignore the issue above for now. Any idea what is going on here:?

After running the code below in the ISY admin console,   I see the error in the node server log file shown below:
        Set 'MstrBedRoomHallway / hMainTstat' Schedule Mode Hold Indefinite
        Set 'MstrBedRoomHallway / hMainTstat' Heat Setpoint 55°F
        Set 'MstrBedRoomHallway / hMainTstat' Cool Setpoint 80°F
        Set 'MstrBedRoomHallway / hMainTstat' Mode Auto
        Set 'MstrBedRoomHallway / hMainTstat' Fan Mode Auto

2020-03-23 15:23:47,865 [Controller] [DEBUG] HwhF:b82ca052d352:Home - Hallway:_update: setDriver(GV4,2)
2020-03-23 15:23:48,755 [Controller] [ERROR] Could not set thermostat set point b82ca052d352 because (400)
Reason: User Input Error

HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/json', 'Date': 'Mon, 23 Mar 2020 19:23:48 GMT', 'Content-Length': '79', 'Connection': 'keep-alive'})
HTTP response body: 
                {"code":400, "message":"nextPeriodTime required"}
            
Traceback (most recent call last):
  File "/var/polyglot/nodeservers/HoneywellHome/thermostat.py", line 180, in cmdSetPF
    self._api.set_setpoint(self._location_id, self._thermostat_id, cmd['value'], c_setpoint, self._use_celsius, mode, auto_changeover_active, "HoldUntil", next_period_time)
  File "/var/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 "/var/polyglot/nodeservers/HoneywellHome/retry.py", line 27, in f_retry
    return f(*args, **kwargs)
  File "/var/polyglot/nodeservers/HoneywellHome/api_helper.py", line 73, in _call_api
    return function()
  File "/var/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 "/var/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 "/var/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 "/var/polyglot/nodeservers/HoneywellHome/honeywell_home/api_client.py", line 341, in call_api
    _preload_content, _request_timeout, _host)
  File "/var/polyglot/nodeservers/HoneywellHome/honeywell_home/api_client.py", line 172, in __call_api
    _request_timeout=_request_timeout)
  File "/var/polyglot/nodeservers/HoneywellHome/honeywell_home/api_client.py", line 386, in request
    body=body)
  File "/var/polyglot/nodeservers/HoneywellHome/honeywell_home/rest.py", line 276, in POST
    body=body)
  File "/var/polyglot/nodeservers/HoneywellHome/honeywell_home/rest.py", line 229, in request
    raise ApiException(http_resp=r)
honeywell_home.exceptions.ApiException: (400)
Reason: User Input Error
HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/json', 'Date': 'Mon, 23 Mar 2020 19:23:48 GMT', 'Content-Length': '79', 'Connection': 'keep-alive'})
HTTP response body: 
                {"code":400, "message":"nextPeriodTime required"}
            

2020-03-23 15:23:49,718 [Controller] [DEBUG] HwhF:b82ca052d352:Home - Hallway:_update: setDriver(CLISPH,62)
2020-03-23 15:23:49,720 [Controller] [DEBUG] HwhF:b82ca052d352:Home - Hallway:_update: setDriver(CLISPC,80)
2020-03-23 15:23:49,720 [Controller] [DEBUG] HwhF:b82ca052d352:Home - Hallway:_update: setDriver(CLIMD,3)
2020-03-23 15:23:50,688 [Controller] [DEBUG] HwhF:b82ca052d352:Home - Hallway:_update: setDriver(CLISPH,62)
2020-03-23 15:23:50,689 [Controller] [DEBUG] HwhF:b82ca052d352:Home - Hallway:_update: setDriver(CLISPC,80)
2020-03-23 15:23:50,690 [Controller] [DEBUG] HwhF:b82ca052d352:Home - Hallway:_update: setDriver(CLIMD,3)
2020-03-23 15:23:50,986 [Controller] [DEBUG] HwhF:b82ca052d352:Home - Hallway:_update: setDriver(CLIFS,0)
 

Link to comment
Share on other sites

It looks like a bug in the code. There used to be a bug in their API where we would change the set point and use TemporaryHold. But that wasn't working so we had to do a HoldUntil with the next period time. I'm wondering if they broke the workaround while fixing the other one.

I'll take a look at it as soon as I can and figure out what changed.

Link to comment
Share on other sites

@wmcneil There will be a version 1.2.0 showing up in the nodeserver store soon that will hopefully address your last issue.

I say hopefully because I couldn't actually reproduce it locally. But the exception you encountered was triggered by some code that worked around a bug in the Honeywell API. I reported it to them when I first built this and it seems they have now fixed it. As such I've removed the code in question so at a minimum you won't hit the same issue. There was at least one other API change around hold status that I had to update as well.

For your other issue(s), The values in Schedule Mode map to the Honewell app this way:

Running -> Remove Hold
Hold Infinite -> Permanently
Hold Next -> Is basically a specific time. But you don't actually get to set the specific time so it's really hold until the next period time.

I've also changed how we update values after a command is run. Before it would only update the field it was commanding. But since some command can actually change multiple things it now does a refresh of the thermostat after a command is run.

That being said I don't think that's your program issue but I haven't had a chance to play with it yet. It would still be good for you to update to the latest version and see if maybe it does have an effect on your program.

 

Link to comment
Share on other sites

@dbarentine , I have tested out 1.2.0. The thermostat now seems to be accepting all settings changes correctly. One small thing I did notice: the ISY email substitution variable ${sys.node.<address>.CLISMD} is empty. If I use ${sys.node.<address>.GV4} instead, it does contain the schedule mode value.

Thank you for the update!

Link to comment
Share on other sites

Try CLIMD instead of CLISMD.

The full list is:
CLISPH - Heat Setpoint
CLISPC - Cool Setpoint
CLIMD - Mode
CLIFS - Fan Mode
CLIHUM - Humidity
CLIHCS - Heat/Cool State
CLIFRS - Fan State
GV1 - Priority Type (Applies only to newer thermostats)
GV2 - Schedule Status
GV3 - Current Schedule Mode (Applies only to newer thermostats)
GV4 - Hold Status
GV5 - Vacation Hold (Applies only to newer thermostats)
GV6 - Connected (Is the thermostat online)

Link to comment
Share on other sites

From the Honeywell Developer website:  "Our limit is designed to allow you to poll device status every 5 minutes for up to 20 devices per hour, with a little cushion to make changes. If you need a higher rate limit, please contact us: HoneywellAPISupport@honeywell.com"

Would this mean if you have less than 20 devices you could poll more often than every 5 minutes?  I have five devices, so could I set the poll interval to 3 minutes, for example?

I'm trying to make some decisions based on the Heat/Cool State of thermostats and would like to know the state more often than every five minutes.

Link to comment
Share on other sites

  • 2 weeks later...

Hello @dbarentine

I have followed all the instructions and am getting an error in the logs. I have double checked my id and password and user id, all are correct. I am running ISY 5.0.16 and Poly on rpi 2.2.9

Any suggestions would be appreciated.

Tim

 

2020-04-13 20:33:26,136 [Interface ] [INFO ] MQTT Connected with result code 0 (Success)
2020-04-13 20:33:26,137 [Interface ] [INFO ] MQTT Subscribing to topic: udi/polyglot/ns/5 -  MID: 1 Result: 0
2020-04-13 20:33:26,138 [Interface ] [INFO ] MQTT Subscribing to topic: udi/polyglot/connections/polyglot -  MID: 2 Result: 0
2020-04-13 20:33:26,139 [Interface ] [INFO ] Sent Connected message to Polyglot
2020-04-13 20:33:27,114 [NodeServer] [INFO ] Started Honeywell Home Nodeserver
2020-04-13 20:33:27,115 [NodeServer] [INFO ] Sending customParams to Polyglot.
2020-04-13 20:33:27,117 [NodeServer] [INFO ] Sending removenotice to Polyglot for index {'key': 'discovery_failed'}
2020-04-13 20:33:27,122 [NodeServer] [DEBUG] Starting discovery
2020-04-13 20:33:28,105 [NodeServer] [INFO ] Sending addnotice to Polyglot: {'key': 'discovery_failed', 'value': 'Discovery failed please check logs for a more detailed error.'}
2020-04-13 20:33:28,107 [NodeServer] [ERROR] Discovery failed with error 'NoneType' object is not iterable
Traceback (most recent call last):
  File "./honeywellhome-poly.py", line 62, in discover
    for thermostat in location.devices:
TypeError: 'NoneType' object is not iterable

 

Link to comment
Share on other sites

@TJF1960 Do you maybe have a location with no thermostats? That's the only reason I can think of that it wouldn't be able to iterate through the devices.

One of the things to try is to go through the install instructions again to authorize your user. At the end when you get the response that contains your User ID below it there will be a JSON payload. Just look at the locations and see if you have one that doesn't contain any devices. Or if you want you can direct message me with it and I can look at it.

I can always update the code to ignore any locations with no devices but that doesn't really solve your issue if you are expecting something to be there.

Dane

Link to comment
Share on other sites

Thanks Dane!

In my attempt at troubleshooting last week after setting this all up I had deleted the link between the new my home app on my phone to TCC where my tstat resides. The minute I reauthorized the link on my phone and restarted the node server everything is working.

A big thanks to Dane for steering me in the right direction and for this node server!

Tim

Link to comment
Share on other sites

I went to make a program and found that the thermostat node is not showing up in either the condition or action drop downs. I tried reinstalling the node server as well as rebooting the ISY. The node server display in ISY looks good and does track any changes made at the device as well as the device responds to changes I make in the admin console of the ISY.

I also noticed on the device tree in the admin console that the two nodes cannot be "grouped" together, don't know if this is by design or related.

Any suggestions would be appreciated.

Tim

Link to comment
Share on other sites

Archived

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


×
×
  • Create New...