Honeywell Lyric Thermostat

Ok, stupid me… After having this working for about a year I have screwed up. I noticed above post and looked at my Honeywell account and noticed that my callback URL was still linking to my old internal IP. And even tough (for me for not understandable reasons) everything was still working fine I changed it to the correct IP.

Now setting a setpoint in HASS works suddenly very unreliable (strange enough, sometimes I see it work). Setting setpoint on thermostat still show up in HASS. Also get errors in logs (some symbols replaced with xxx):

HTTP Error Lyric API: 400 Client Error: User Input Error for url: https://api.honeywell.com/v2/devices/thermostats/LCC-00D02DExxxxE?locationId=53xxxx&apikey=zStmuOO7lbKKgaVQqxxxxxxxxxxxxx

If I run the URL I get;

{"code":401, "message":"Invalid or expired accesstoken"}

While this is really the correct token +expiration date is unlimted.

So tought; let’s start over. Created new app with new name on honeywell but then actually never get the authentication pop-up.

Any suggestions?

Your key never expires … but I am pretty sure that the acesstoken can. If I understand correctly, the access code is created when we execute the authentication pop-up. Home Assistant stores this so it can communicate with Honeywell via the API.

I’m guessing (and I’m no expert on this topic) that your HA is still storing the old access token, and it won’t display the authentication popup because it think’s it is already authenticated … but the access token is invalid for the new Honeywell app, so you get the “invalid or expired” message.

Could make sense…

Anyone any idea how to re-trigger the authentication/pop up window?

Edit: after re-reading most of the posts it seems I need to remove lyric.conf. will try that when back home

I did some searching, and found this interesting … My .homeassistant folder contains a lyric.conf and it stores my Honeywell API access token. Assuming you have that file as well, you might try renaming it and restarting HA to see what happens.

Thanks for spotting this

I was unable to set the temperature using this component, because I would get the following error:

2019-02-06 13:34:01 ERROR (SyncWorker_4) [lyric] HTTP Error Lyric API: 400 Client Error: User Input Error for url: https://api.honeywell.com/v2/devices/thermostats/XXX?locationId=YYY&apikey=ZZZ

Some people in this topic mentioned that this error will disappear after a few hours. Well, after some debugging I found out they’re right: this error only occurs when the thermostat is set to HoldUntil (e.g. the thermostat is temporarily set to 20 degrees until 18:00). You can disable this mode by clicking on the small cross (bottom right) on the thermostat, or by simply waiting until that time has passed and the thermostat continues its normal schedule.

Technical details

The request fails with this response:

{"code":400, "message":"nextPeriodTime required"}

And the documentation mentions:

  • “HoldUntil” - Requires a “nextPeriodTime” value, the thermostat will hold the requested setpoint(s) until that time.

Fix

I’ve created a Pull Request to automatically set the mode to PermanentHold before changing the temperature. I’m not sure if this is the best fix, but anyone running into the same issue can apply this patch to make it work!

Seems Bram commited your change, however now I get below. Do you have the same?

 File "/usr/local/lib/python3.6/site-packages/homeassistant/components/climate/__init__.py", line 266, in state_attributes
    if self.fan_list:
  File "/config/custom_components/climate/lyric.py", line 285, in fan_list
    return self._fan_list
AttributeError: 'LyricThermostat' object has no attribute '_fan_list'
2019-02-07 12:36:55 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 239, in async_update_ha_state
    attr = self.state_attributes or {}
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/climate/__init__.py", line 266, in state_attributes
    if self.fan_list:
  File "/config/custom_components/climate/lyric.py", line 285, in fan_list
    return self._fan_list
AttributeError: 'LyricThermostat' object has no attribute '_fan_list'

I’m not getting any exceptions and I also haven’t changed anything related to that part of code.

Looking at the latest code this seems like a weird error to me because _fan_list should always exist. Are you sure you haven’t accidentally altered some part of the code?

Just to make sure: Can you post your full lyric.py?

I’m using the files linked above.

Thanks , but it seems you submitted the change to Bram Kragtens version, which in the meantime seems out of sync with Cheelio’s version…(in which , locally, you made some changes). Or am I wrong?

My changes to the Lyric Home Assistant component (components/lyric.py and components/climate/lyric.py) haven’t been merged and are therefore unchanged. Instead, I fixed the issue in the Python package python-lyric, on which both Bram’s and Cheelio’s version have a dependency.

A new version of this package hasn’t been published to PyPI yet, so if you installed the dependency using pip install python-lyric (or let Home Assistant do it) then nothing has changed for you.

The error you’re getting doesn’t seem related to the python-lyric package at all. I would like to help you fix it but I can’t think of any reason why you would be getting that error…

I’m a github noob so interpreted you link above as an update to Bram’s lyric.py (which seems he commited to his branch). So I copied that as my new lyric.py. That caused above errors.

So I’m now back to the files from this post and all is working like before (but obviously still with the errors in the log you mention in post 485)

It will no longer work in 0.88. There are breaking changes there and component will need to be updated.

Ouch. Same experience for others that have moved to .88?

Is this a beta version? Because the current release is 0.87.1 and this plugin works fine.

Yes in Beta version.

I’m looking to get a Z-wave+ thermostat and found the T6 Pro available on a HVAC site.

With this addon, will my HA need access to the internet all the time, or once set up with a Honeywell account, can I disconnect from the internet and control the thermostat locally?

Normally I don’t have my HA connected to the internet and only connect to get updates.

Thanks.

Hi Concord, an internet connection is required to control the Lyric T6 thermostat. A local API is unavailable as far as I know.

Didn’t test yet, but perhaps it’s caused by the new custom component structure I read about?

Don’t update betas so will only test at a later stage. Someone able to publish error message, perhaps the fix is easy?