Honeywell Lyric Thermostat

Great…look forward to an official PR :slight_smile:

1 Like

I was able to fix the error and get it working again.

In the requests oauthlib init.py file there is an if statement that calls requests.__version__ and compares it to ‘2.0.0’

I get a type error every time:
File "/srv/USER/lib/python3.5/site-packages/requests_oauthlib/__init__.py", line 9, in <module> if requests.__version__ < '2.0.0': TypeError: unorderable types: module() < str()

I was able to manually remove the error by replacing requests.__version__ with ‘2.18.4’ which is the value it should be pulling (if you are running 2.18.4). If I run the code in a python terminal, it works, but if I run it as a script it fails.

I have submitted this in a bug report on the github page

https://github.com/requests/requests-oauthlib/issues/299

I have moved my All-In-One-Installation onto Raspbian Stretch with Desktop. I have everything working except for my Lyric T5 thermostat. I am including the information from home-assistant.log. Any help would be appreciated.
Thank You in advance

2017-11-24 11:53:37 ERROR (MainThread) [homeassistant.loader] Error loading homeassistant.components.climate.lyric. Make sure all dependencies are installed
Traceback (most recent call last):
File “/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/loader.py”, line 142, in get_component
module = importlib.import_module(path)
File “/srv/homeassistant/homeassistant_venv/lib/python3.5/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 986, in _gcd_import
File “”, line 969, in _find_and_load
File “”, line 958, in _find_and_load_unlocked
File “”, line 673, in _load_unlocked
File “”, line 673, in exec_module
File “”, line 222, in _call_with_frames_removed
File “/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/climate/lyric.py”, line 16, in
from custom_components.lyric import DATA_LYRIC, CONF_FAN, CONF_AWAY_PERIODS
ImportError: No module named ‘custom_components’
2017-11-24 11:53:37 ERROR (MainThread) [homeassistant.loader] Unable to find component climate.lyric
2017-11-24 11:53:37 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform climate.lyric: Platform not found.

I have found Bram_Kragten previous fix on my old system. I guess I had better start keeping better notes.

Thanks Bram

Bram_KragtenAug 16
Where have you placed the 2 lyric.py5 files? Not in the custom_components folder?

Bram_Kragten:
You should either move it to custom_components or change line 16 of climate/lyric.py:

from custom_components.lyric import DATA_LYRIC

from homeassistant.components.lyric import DATA_LYRIC

Looks like 0.59 broke Lyric thermostat. Seeing the following errors

Sun Dec 03 2017 15:43:35 GMT-0500 (Eastern Standard Time)

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.6/asyncio/tasks.py", line 180, in _step
    result = coro.send(None)
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 399, in async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 247, in async_add_entity
    yield from entity.async_update_ha_state()
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 231, in async_update_ha_state
    attr)
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 333, in _attr_setter
    value = getattr(self, name)
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/climate/__init__.py", line 736, in supported_features
    raise NotImplementedError()
NotImplementedError

All climate platforms are required to implement the supported_features method now. Custom components must adapt to this. Sorry for breaking this, but with changes like this, we can only adapt the “official” platform ourselves.

Will fix it today

Should be fixed now.

https://raw.githubusercontent.com/bramkragten/home-assistant/lyric/homeassistant/components/climate/lyric.py

Yes…it works now. Thanks for the quick fix :+1:

Hats off to you @Bram_Kratgen for taking this on and adding this component to HA.

I would very much like to integrate my Lyric T5 into HA.

I have followed the instructions above and have placed the files in \custom_components and \climate and added lyric component to configuration.yaml with my key and secret.

Running HA 59.1
Set up a developer acct with url: http://my.local.ha.ip:8123/api/lyric/authenticate
Unfortunately, HA is having trouble activating the component.

I have included debug output below. I am hoping you or others can help explain this error (OAith2Session import error?) to me and help me remedy it.Thanks in advance.

Logging mode set to debug.

2017-12-04 15:26:28 ERROR (MainThread) [homeassistant.setup] Error during setup of component lyric
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/setup.py", line 193, in _async_setup_component
    component.setup, hass, processed_config)
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.homeassistant/custom_components/lyric.py", line 116, in setup
    import lyric
  File "/srv/homeassistant/lib/python3.5/site-packages/lyric/__init__.py", line 6, in <module>
    from requests_oauthlib import OAuth2Session
  File "/srv/homeassistant/lib/python3.5/site-packages/requests_oauthlib/__init__.py", line 9, in <module>
    if requests.__version__ < '2.0.0':
TypeError: unorderable types: module() < str()

My work around until OAuth2Session requests.version TypeError gets fixed,is commenting out lines 9-12 in
/srv/homeassistant/lib/python3.5/site-packages/requests_oauthlib/__init__.py. Lyric component seems to be running great now.

Bram_Kragten, you are the man. I’ve got the T5 working and reporting perfectly. Thank you so much. I wouldn’t have gotten it working if you hadn’t taken the time to help other people who asked questions that I had.

I had the same oauth errors and the edit worked. I was able to configure the thermostat but the Lyric device no longer appears in the UI. Did you need to do anything else to get this working again?

Hi Bram! I have Hassbian installed on my RPi and thus I do not see the components folder in /home/homeassistant/.homeassistant. I tried to manually create a components folder and checked the config file but it said ‘component lyric not found’. Any idea what I’m doing wrong? Thanks in advance!

I have upgraded to HA version 0.60.0 and have also lost Lyric in my UI: I deleted lyric.conf and made the connection to Honeywell with no issues but still did not see Lyric in the UI. I think it is time to stop upgrading HA!! Since the last 2 updates I have lost my Amcrest Cameras and my T5 thermostat. What good do updates do if everything else keeps breaking. I am including my HA log if that will help.
2017-12-23 08:09:05 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/lib/python3.5/asyncio/tasks.py”, line 241, in _step
result = coro.throw(exc)
File “/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/init.py”, line 332, in async_update_config
dev_id, device)
File “/usr/lib/python3.5/asyncio/futures.py”, line 380, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.5/asyncio/tasks.py”, line 304, in _wakeup
future.result()
File “/usr/lib/python3.5/asyncio/futures.py”, line 293, in result
raise self._exception
File “/usr/lib/python3.5/concurrent/futures/thread.py”, line 55, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/init.py”, line 740, in update_config
with open(path, ‘a’) as out:
PermissionError: [Errno 13] Permission denied: ‘/home/homeassistant/.homeassistant/known_devices.yaml’
2017-12-23 08:10:02 ERROR (Thread-18) [homeassistant.components.lyric] Connection error logging into the Lyric web service.
2017-12-23 08:10:02 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/lib/python3.5/asyncio/tasks.py”, line 239, in _step
result = coro.send(None)
File “/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py”, line 399, in async_process_entity
new_entity, self, update_before_add=update_before_add
File “/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py”, line 247, in async_add_entity
yield from entity.async_update_ha_state()
File “/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/helpers/entity.py”, line 231, in async_update_ha_state
attr)
File “/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/helpers/entity.py”, line 333, in _attr_setter
value = getattr(self, name)
File “/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/climate/init.py”, line 736, in supported_features
raise NotImplementedError()
NotImplementedError

Just a update. Moved back to 0.58.1 and everything is working great!! Thanks for all of you work!!

This issue is already fixed. Just scroll up a few posts please.

Thanks it works!! Sorry I jumped to conclusions. Seems like every time I do a update something breaks.

This has been 100% flawless for me for months, plus this thread has gotten relatively quiet. When might this component get pushed to the main tree? I suspect it is as well tested as it’s gonna get with this sub-selection of the community testing it.

1 Like

@Bram_Kragten I will be visiting the Honeywell plant where I think these thermostats are developed. I am being interviewed in connection with the app and would like to show them your component if that is OK.