Honeywell Lyric Thermostat

I have the same thermostat and saw the same behaviour before using the custom component (which works well). It’s like the HA homekit component isn’t fully compatible with the t5. I never did get past the homekit code entry using the native way.

I have the files running in “/config/custom_components/lyric”

1 Like

Hi,

You had to create /home/homeassistant/.homeassistant, did you not? My hassio install has no /home/homeassistant. It only has a /home/hassio folder with a single .profile file with a “exec sudo -i” command.

And where did you put the other lyric files from the github repo?

Thanks,

Ambi

So I’ve spent many an hour in the last 2 days trying to get this to work. I have 2 Honeywell Lyric T5 thermos.

I get past the discovery of components. It downloads my data from Honeywell. I get hung up discovering the platform.

The error is: Unable to prepare setup for platform lyric.climate: Platform not found (cannot import name ‘STATE_AUTO’ from ‘homeassistant.components.climate.const’ (/usr/src/homeassistant/homeassistant/components/climate/const.py)).

Now, I’ve seen this in the tread before. So, I make sure I deleted the cache directory. I got the correct imports, etc.

So, could someone please restate the files, with the sources, the locations of the files, and the process to get it running! I’d hate to have to wait for an official integration with HA/Hassio, but I may need to!

BTW, I have a RPi 4, Hassio 0.100.2 and lyric is my only custom component.

Thanks,
Ambi

I hope someone else watching this thread can confirm what just worked for me -

I recently lost my entire hassio setup when I had a SSD failure and no recent backups (woops).

I resetup hassio and am on a fresh install of 0.100.2. During initial setup I noticed that my lyric t5 was auto discovered as a homekit accessory. I tried pairing it using the homekit code and it actually worked!

No custom component in place.

Anyone else?

Here is my directory structure in custom_components

~/homeassistant/custom_components# du -a -h
4.0K    ./lyric/services.yaml
8.0K    ./lyric/__init__.py
4.0K    ./lyric/.translations/en.json
8.0K    ./lyric/.translations
4.0K    ./lyric/manifest.json
12K     ./lyric/climate.py
8.0K    ./lyric/config_flow.py
4.0K    ./lyric/__pycache__/sensor.cpython-37.pyc
4.0K    ./lyric/__pycache__/const.cpython-37.pyc
4.0K    ./lyric/__pycache__/config_flow.cpython-37.pyc
8.0K    ./lyric/__pycache__/__init__.cpython-37.pyc
12K     ./lyric/__pycache__/climate.cpython-37.pyc
36K     ./lyric/__pycache__
8.0K    ./lyric/sensor.py
4.0K    ./lyric/const.py
4.0K    ./lyric/strings.json
100K    ./lyric

1 Like

Hi,

I had the same thing happen to me originally.

I did a new hassio install on a RPi 4. It went fine. I didn’t have any switches or sensors defined yet, as my USB1 Zigbee/Z-Wave dongle hadn’t arrived.

Hassio gave me a notification that it found the two T5s, and asked me to enter the code shown on the T5s. So I looked at them, and go figure, they were displaying codes. So I took a screen shot of each, and went upstairs to enter them into hassio.

I entered the codes and they didn’t work. I did them twice for each unit, with the 2 codes. It didn’t pair. I restarted hassio and used the new codes it provided. Still nothing. I think at one point it did pair them, but they were gone on the next restart.

Then my dongle came in the mail, once I started setting up hassio, there was a point where the next reboot didn’t discover the thermos. I googled around to find out how to make sure discovery was working, but something I added or changed in the small configuration.yaml was making discovery not see the T5s.

Could it have been a direct wifi-wifi connection? Could the RPis wireless interface been the one that saw the T5s?

I don’t know. I wrote off that Lyric thermostats were supported as a custom config, as via this thread it was the only way anyone was using it, and not by default in hassio.

I even tried adding Homekit entries in hassio, to see if I could discover them again - no soap!

I’m close to getting the custom component to work, but I keep hearing the native lyric implementation is “close” or “in the works” or something. So, hopefully it will work before it gets cold enough to need the heat! :smiley:

If you could please post the the Lovelace card you have with the thermostats(s) on it, that would help me see what I’m attempting to see. Maybe the entitities for the termostats too.

BTW, I don’t have any Homekit stuff here, but I do have an iPhone and a Samsung TV that can use Homekit. I dunno if that matters.

Regards,
Ambi

And it works? Brilliant!

Are these the default files, or did you have to remove some import variables or something?

Which repo did you get them from? (It’s hard to tell from any particular file the date, version number, and author of the files…but at least we can see when they were put on git.

Tnx,
Ambi

Default, I went into the Git repository, clicked on file and then raw, cut and pasted each file.

Followed the instructions in this post to get it working Honeywell Lyric Thermostat

I know I’ve had my fair share of trouble with the component in the past too, it’s a PITA to get working, but has been working great once I did get it working.

1 Like

Hi,

Well thanks for the ray of hope. I’ll follow your lead and get it going!

Cheers,

Ambi

More people having errors in the logfiles?

Update for sensor.thermostaat_next_period_time fails
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 268, in async_update_ha_state
await self.async_device_update()
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 446, in async_device_update
await self.async_update()
File “/config/custom_components/lyric/init.py”, line 154, in async_update
await self._lyric_update()
File “/config/custom_components/lyric/sensor.py”, line 122, in _lyric_update
state = getattr(self.device, self.key)
File “/usr/local/lib/python3.7/site-packages/lyric/init.py”, line 384, in nextPeriodTime
return self.changeableValues.get(‘nextPeriodTime’)
File “/usr/local/lib/python3.7/site-packages/lyric/init.py”, line 484, in changeableValues
return self.device.get(‘changeableValues’)
AttributeError: ‘NoneType’ object has no attribute ‘get’

And this one for 108 times

Update for sensor.thermostaat_status fails
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 268, in async_update_ha_state
await self.async_device_update()
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 446, in async_device_update
await self.async_update()
File “/config/custom_components/lyric/init.py”, line 154, in async_update
await self._lyric_update()
File “/config/custom_components/lyric/sensor.py”, line 111, in _lyric_update
status = getattr(self.device, self.key)
File “/usr/local/lib/python3.7/site-packages/lyric/init.py”, line 366, in thermostatSetpointStatus
return self.changeableValues.get(‘thermostatSetpointStatus’)
File “/usr/local/lib/python3.7/site-packages/lyric/init.py”, line 484, in changeableValues
return self.device.get(‘changeableValues’)
AttributeError: ‘NoneType’ object has no attribute ‘get’

Here’s what I did to get it working:

a) Deleted my files from /config/custom-components/lyric
b) Used Teun’s repo: (https://community.home-assistant.io/u/teunehv): https://github.com/teunehv/ha-custom-components/tree/master/custom_components/lyric (this one had current changes)
c) Deleted the /conf/lyric.conf file.
d) Made sure my base_url was setup to the local, private address.
e) Rebooted (could use clarification if “reboot” in the instructions means my whole RPi, or just the hassio/ha instance. If the later, the instructions should say “restart HA/hassio”, not reboot - which is an ssh command)
f) It still wouldn’t work. But considering I already tried it once and got 1/2 way connected, I went to the Honeywell dev site and deleted the old app and added another one with the same name and url, but a new key and passcode was created. That seemed to do it after another “reboot”.
g) I also wonder if version 0.100.3 of hassio has some fix that made the https/http difference easier. Last time, I had to keep editing the URLs that were being provided. But now, it just worked.
h) Made an off-site snapshot, and did a happy dance!

Thanks to everyone who contributes to the lyric integration, and to the whole comminity! I’d still be waiting for a small adjustment if I kept with mainstream bridges or hubs, so thank tons!

Cheers,

Ambi

Continuing the discussion from Honeywell Lyric Thermostat:

1 Like

OK, now that it was cold yesterday, I got to try the Lyric custom component integration out.

What I noticed:

a) The default thermostat device looks great in HA. But I wonder if I can scale it so it doesn’t take so much space on Lovelace.
b) The default iOS-app thermostat is just as good, and when I rotate the iOS device, the thermo moves next to my other one, which is something other apps don’t tend to do correctly all the time.
c) The Honeywell app has some features that would be nice in HA: Like:

  • “filter change alert” (should be an easy trigger for me to add to automations to launch a notification)
  • vacation mode where different temp settings are used - and all the Lyric devices at home are allows the same vacation schedule (not separate for each heating zone)
  • there’s a “hold until midnight” setting which can be set per thermo.
  • Schedule: This is a big one, it would be nice to view and set the schedule for sleep, awake, away, and home times. They use single day schedule or group schedules. New schedules can be created and edited.

d) One thing I’d really like is “current operating status”…maybe change the heat, cool, or fan icon in some manner to indicate “I’m currently heating, cooling or moving air now”. One can intuit this if the temp is low and the set temp is higher and heat/cool/fan is enabled. Of course, when I’m home I can tell the heat is working, but when away, knowing it’s OK is good. And yes, I can see in the history (and it’s a great history graph!!) when the heat is working. I wonder if the heater is disabled electrically would the integration indicate this by showing the “green area indicating heating” to be red or something…if “heat is on but temp stays cold”?

e) From an operational standpoint, I wonder why I get the following errors in the log:
2019-11-05 19:25:22 ERROR (SyncWorker_3) [lyric] HTTP Error Lyric API: 500 Server Error: Internal Server Error for url: https://api.honeywell.com/v2/locations?apikey=Yffooq7G9RfTttyR00fyjjBQeyTpE0iN 2019-11-05 20:00:53 ERROR (SyncWorker_5) [lyric] HTTP Error Lyric API: 401 Client Error: Unauthorized for url: https://api.honeywell.com/v2/locations?apikey=Yl60Lq7G9RfTigh79GRfoojj98gh0iN
or
2019-11-05 21:15:02 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.1st_floor_thermostat fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 270, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 450, in async_device_update await self.hass.async_add_executor_job(self.update) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/lyric/climate.py", line 325, in update self._name = self.device.name File "/usr/local/lib/python3.7/site-packages/lyric/__init__.py", line 47, in name if 'name' in self.device: TypeError: argument of type 'NoneType' is not iterable
These errors seem like a timeout issue…if I go away from “overview” (when I see some oddness with the lyric display of termo cards, then go back, the thermo card is fixed. Is there some way to extend the timeout? I can sniff on my outgoing firewall to see if there’s some timeout happening.

In any case, this is a rocking integration considering it’s not an official component! And HA is super-great, thank you all!

Regards,
Ambi

Hi Again,

And today, it started failing totally and doesn’t show up as entities:
2019-11-07 11:00:30 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform lyric Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 150, in _async_setup_platform await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT) File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for return fut.result() File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/lyric/climate.py", line 66, in setup_platform for location, device in hass.data[DATA_LYRIC].thermostats()] File "/config/custom_components/lyric/climate.py", line 65, in <listcomp> devices = [LyricThermostat(location, device, hass, temp_unit, has_fan, away_periods) File "/config/custom_components/lyric/__init__.py", line 162, in thermostats if location.name in self._location: AttributeError: 'LyricDevice' object has no attribute '_location'

I’m wondering if this IS the “the current token expired but you already got the popup, so just … do nothing” issue discussed above?

Thanks,
Ambi

----follow up----

And a reload of the HA makes it work (but didn’t last night). It’s like the Lyric service does stuff that breaks it for hours, and can’t recover…then it does.

Regards,

Ambi

I know there’s a test for the API servers before the call to the API, but it would be good if there were some controls on the developer page to control the repeats, wait, retry timers, packet length, etc.

It would also be good to be enable extra logging for just the initial auth and token validation.

The fact that mine was broken, then magically got better is odd. I wonder if there’s other API calls we could do to verify the health of their network? Maybe they keep updating the service at night? Perhaps they limit the maximum connected clients?

I may be able to see from my firewall logs if the traffic from their end is on ascending source ports when they reply. Sometimes these are randomized but if they ascend then go back to lower ports that would make me think the service at their end was restarted.

For all we know, they have a load balancer setup and one or two of the balanced servers In the pool aren’t right.

Cheers,

Ambi

I noticed I’m seeing a 500 error when attempting to configure my lyric thermostat, and here is the excerpt from the logs:

2019-11-09 23:37:39 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
    resp = await task
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/real_ip.py", line 40, in real_ip_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 73, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 136, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 122, in handle
    result = await result
  File "/usr/local/lib/python3.7/asyncio/coroutines.py", line 120, in coro
    res = func(*args, **kw)
  File "/config/custom_components/lyric/__init__.py", line 199, in get
    data = request.GET
AttributeError: 'Request' object has no attribute 'GET'

I’m also seeing intermittent error 500’s. Most of the time, my Lyric thermostat works fine with Home Assistant, and I can live with occasional errors (if Honeywell’s API servers aren’t reliable, that’s certainly not HA’s fault) if they affect only the functionality of those devices in HA.

However, since the 500 errors appear to be happening on the main thread (see the logs others have posted above), it seems to bring down my entire HA system whenever those errors happen - at least for the time the errors are happening (it keeps running, but it becomes unresponsive to other requests), and according to my logs, that can last for hours at a time.

Ideally, I would think those checks/updates should happen on a background thread, but I’m unfamiliar with the concurrency architecture of HA, so that recommendation may be misguided.

1 Like

However, since the 500 errors appear to be happening on the main thread (see the logs others have posted above), it seems to bring down my entire HA system whenever those errors happen

Yeah I have suddenly been seeing the same thing and makes HA inaccessible while it’s happening…nasty bug actually if I can’t access HA because of it.

2019-11-11 06:58:54 ERROR (MainThread) [lyric] HTTP Error Lyric API: 504 Server Error: GATEWAY_TIMEOUT for url: https://api.honeywell.com/v2/locations?apikey=***********************
2019-11-11 06:59:54 ERROR (MainThread) [lyric] HTTP Error Lyric API: 504 Server Error: GATEWAY_TIMEOUT for url: https://api.honeywell.com/v2/locations?apikey=***********************
2019-11-11 07:00:54 ERROR (MainThread) [lyric] HTTP Error Lyric API: 504 Server Error: GATEWAY_TIMEOUT for url: https://api.honeywell.com/v2/locations?apikey=***********************

Github shows no development on this for 4 months, so not sure if this is a plug-in that is going to really go anywhere.

https://github.com/home-assistant/home-assistant/tree/92082b687a46c17a9a94a598b245728a8832b179/homeassistant/components/lyric

I may give up on this plug-in and try Homekit instead although I guess that is deprecated, but if it works…

1 Like

Using HA 0.100 the default homekit component worked great for me. After upgrading to 0.101 my thermostat isn’t being discovered at all though.

Bummer. Experiencing the same! Already was wondering why HASS was sometimes not avail for few hours last few days…

@kylerw do you know who is maintaining this component?