Honeywell Lyric Thermostat

i tried this with a lyric t6 pro and all i get is componet not found any help ?

@Bram_Kragten When I get to the Request Authorization page do I use the developer login credentials. I get a “no user with these credentials” response.

Answering myself. You need to use the login that you created for the Android or iOS app and then select the Thermostat that you set up.

That seemed to work for me. Good catch. Also running macOS.
Here was my full error.

2017-06-04 12:40:35 INFO (MainThread) [homeassistant.setup] Setting up lyric
2017-06-04 12:40:35 INFO (<concurrent.futures.thread.ThreadPoolExecutor object at 0x1036fbc18>_7) [homeassistant.util.package] Attempting install of mutagen==1.37.0
2017-06-04 12:40:35 ERROR (MainThread) [homeassistant.setup] Error during setup of component lyric
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/homeassistant/setup.py", line 190, in _async_setup_component
    component.setup, hass, processed_config)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/Users/ob1/.homeassistant/custom_components/lyric.py", line 126, in setup
    app_name='Home Assistant', redirect_uri=redirect_uri)
  File "/Users/ob1/.homeassistant/deps/lyric/__init__.py", line 855, in __init__
    self._lyricAuth()
  File "/Users/ob1/.homeassistant/deps/lyric/__init__.py", line 916, in _lyricAuth
    self._token = json.load(f)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/__init__.py", line 299, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/json/decoder.py", line 342, in decode
    raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 156 (char 155)
2017-06-04 12:40:35 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=persistent_notification, service=create, service_data=title=Invalid config, message=The following components an$
* [lyric](https://home-assistant.io/components/lyric/)

So. Close!

Can’t quite get it to configure through the HASS web ui.

Mucking about with the API, I can run:

https://api.honeywell.com/oauth2/authorize?response_type=code&client_id=Consumer Key/client_id f&redirect_uri=https:// myHASSwebAddress /api/lyric/authenticate

But I get back, after entering my Lyric App credentials: {"message": "Authentication failed, not the right variables, try again."}

Am I doing something silly?

I’ve been trying to get this working with my T6.
I’ve added the .py files to their respective folders.
Got the configurator ‘card’. Connected it and afther that it was ‘done’. However I can’t find the T6 in my homeassistant.

I do get this error when starting HA:
2017-06-06 15:19:52 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform lyric
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py”, line 155, in _async_setup_platform
entity_platform.schedule_add_entities, discovery_info
File “/usr/lib/python3.4/asyncio/futures.py”, line 388, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.4/asyncio/tasks.py”, line 286, in _wakeup
value = future.result()
File “/usr/lib/python3.4/asyncio/futures.py”, line 277, in result
raise self._exception
File “/usr/lib/python3.4/concurrent/futures/thread.py”, line 54, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/climate/lyric.py”, line 48, in setup_platform
for location, device in hass.data[DATA_LYRIC].thermostats()],
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/climate/lyric.py”, line 48, in
for location, device in hass.data[DATA_LYRIC].thermostats()],
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/climate/lyric.py”, line 77, in init
self._fan_list = self.device.settings[“fan”][“allowedModes”]
KeyError: ‘fan’

where did you put the flies at i couldnt get ha to find my T6 i

/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components and /srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/climate

Wonder if the issue is that I’m not use virtual just running it straight up. I put one in /homeassistant/component and the other in /homeassistant/component/climate. All I get is can’t find component. Lyric

Make sure that the two lyric.py files and the climate folder are owned by the homeassistant user or whatever user HA runs under. Check the current ownership of the other files in the folders with ls -l

I found that every time I restarted HA, I needed to delete the lyric.conf file in the homeassistant directory and re-authenticate. It looks like it required a token refresh. I don’t know if this is just me, but in looking through the API pages on the Honeywell developer site I saw that I could refresh the token with a curl command line string. I just set up a cron job to run the curl string every 15 minutes.
https://developer.honeywell.com/authorization-oauth2/apis/post/token-0
The curl method could be used to perform other things as well, like changing temps, going from heat to cool.

No, the problem is that when there is a refresh, the token sometimes is shorter than the last time, and it just overwrites now and does not empty the file. So there stays a char behind. I fixed this already, will push an update soon when I have also fixed the temperature set function. But still don’t have much time, unfortunately…

@Bram_Kragten I do so appreciate your efforts and look forward to the update.

I was wonder if this could be combined into the main Lyric component eventually. EDIT: Scratch that, I meant Honeywell

What main Lyric component?

I’m a dummy. I meant Honeywell component. Edited my above post.

No, it is completely different product, so would not make sense to combine it with the Honeywell component.

I disagree that it is a completely different product. Or rather, I don’t think that access / control will be separate for long. Take a look at a few things:

Right now we have two API sets, one is completely public via developer.honeywell.com. That covers our Lyric line of products.

We are working on getting the Total Connect Comfort (TCC) line on that site as well, problem is the process of handing out API keys isn’t automated yet (it’s all on me, manually).

For the Lyric API we support Auth Code only right now.

For the TCC API we support all three flows (Auth Code, Client Credentials, and ROPC).

  • Take a look here as well as here. It’s my entirely unsubstantiated feeling that under the Device ID: LCC
    and TCC stand for Lyric Connect Comfort and Total Connect Comfort.

To me, this indicates commonality, and if not now, an eventual merger of access methods to these devices. Similar to how the Wink component/platform evolved as access methods changed.

@Bram_Kragten, I don’t want to take away anything you have done, or will be doing. This is great, essential work that will help quite a few people.

1 Like

A little update (yes, taken way too long).

  • Fixes the token json extra data error.
  • Fixed changing the setpoint while in a schedule.

Change the requirements: (or download the new file)

REQUIREMENTS = [
https://github.com/bramkragten/python-lyric
‘/archive/v0.0.5-alpha.1.zip’
‘#python-lyric==0.0.5’]

1 Like

After successfully configuring, I see the following in the logs:

The following errors have been logged this session:
2017-08-07 12:25:25 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
 Traceback (most recent call last):
 File "/usr/lib/python3.6/asyncio/tasks.py", line 179, in _step
 result = coro.send(None)
 File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 125, in _async_setup_platform
 self.hass, self.config, self.domain, platform_type)
 File "/usr/lib/python3.6/site-packages/homeassistant/setup.py", line 242, in async_prepare_setup_platform
 platform = loader.get_platform(domain, platform_name)
 File "/usr/lib/python3.6/site-packages/homeassistant/loader.py", line 104, in get_platform
 return get_component(PLATFORM_FORMAT.format(domain, platform))
 File "/usr/lib/python3.6/site-packages/homeassistant/loader.py", line 142, in get_component
 module = importlib.import_module(path)
 File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
 return _bootstrap._gcd_import(name[level:], package, level)
 File "<frozen importlib._bootstrap>", line 978, in _gcd_import
 File "<frozen importlib._bootstrap>", line 961, in _find_and_load
 File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked
 File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
 File "<frozen importlib._bootstrap_external>", line 674, in exec_module
 File "<frozen importlib._bootstrap_external>", line 781, in get_code
 File "<frozen importlib._bootstrap_external>", line 741, in source_to_code
 File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
 File "/config/custom_components/climate/lyric.py", line 50
 devices = [LyricThermostat(location, device, temp_unit, has_fan)
                               ^ 
TabError: inconsistent use of tabs and spaces in indentation

I am using it as custom component.