Honeywell Lyric Thermostat

Figured out how to cheat, for a for a small price, to get my “instant” notice when the system comes on. Decided to just throw a $12-ish Tamosta flashed Sonoff S31 at it! LOL! Since all I care about is when the system is actually running (I manually put it to cool and heat, so no need to know that), this works instantly and perfectly. I’m only using these on the Evaporator/Blower modules inside the house (in my case the garage & attic), since that uses a standard outlet and only pulls about 650W. Here’s an example of the Tasmota console rules I’m using:

rule1 on Energy#Power>100 do publish PLUG_AC_DOWN/AC ON endon

rule1 5
rule1 1

rule2 on Energy#Power<100 do publish PLUG_AC_DOWN/AC OFF endon

rule2 5
rule2 1

Rule “5” for those that have never seen it turns on the “Once” rule command for each trigger… keeps it from firing over and over again from consecutive identical triggers. Might not be a perfect “all software” integrated solution, but for $25 off Ebay for two S31 Plugs, it solves all my headaches and accomplishes exactly what I needed for my automations! LOL!

Hi All. New to Home Assistant and trying to setup all my devices. I was able to connect to my Lyric but I keep seeing an error in the log.

Log Details (WARNING)
Logger: homeassistant.util.async_
Source: util/async_.py:120
First occurred: 9:42:11 PM (2 occurrences)
Last logged: 9:42:11 PM

Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for lyric doing I/O at custom_components/lyric/__init__.py, line 92: if not lyric.locations:

I am not sure how to modify the code to clear this issue. Anyone have any ideas?

I recently got a T6 Pro WiFi unit installed with a new AC. Want to keep it local so I was looking down the HomeKit Controller route and saw the previous issues about not being able to set the temp. Well after giving it a try myself I found the same issue but found it interesting you could do other things like turn on/off, so this tells me we are not “locked” out of the device so I got digging. I turned on logging for a number of things I thought related to it and watched the logs while firing off service calls to set temp

2020-06-24 21:59:18 DEBUG (MainThread) [aiohomekit.controller.ip.connection] REDACTED: raw request: b'PUT /characteristics HTTP/1.1\r\nHost: REDACTED\r\nContent-Type: application/hap+json\r\nContent-Length: 66\r\n\r\n{"characteristics":[{"aid":1,"iid":13,"value":22.22222222222222}]}'
2020-06-24 21:59:18 DEBUG (MainThread) [aiohomekit.controller.ip.connection] REDACTED: raw response: bytearray(b'{"characteristics": [ {"aid":1,"iid":13,"status":-70410}]}')

This is the send/response so I googled the status code and found this https://github.com/apple/HomeKitADK/blob/1632ccca9dc5fee7344556c7bac8daa2fbe0e20e/HAP/HAPIPAccessoryServer.c#L59
which made me look for what looked like bad values, well the temp of 22.22222222 was my only red flag. so I tried using 77 degrees F which converts to 25 even

>>> (77 - 32.0) / 1.8
25.0

log output

2020-06-24 21:59:47 DEBUG (MainThread) [aiohomekit.controller.ip.connection] REDACTED: raw request: b'PUT /characteristics HTTP/1.1\r\nHost: REDACTED\r\nContent-Type: application/hap+json\r\nContent-Length: 53\r\n\r\n{"characteristics":[{"aid":1,"iid":13,"value":25.0}]}'
2020-06-24 21:59:47 DEBUG (MainThread) [aiohomekit.controller.ip.connection] REDACTED: raw response: bytearray(b'')

empty return with status code and it worked! Not shown but when I sent on/off commands that work they also had empty responses. Just joined the discord to see what I can do but at least we know what the issue with HomeKit Controller! Will try and report back but if anyone is a dev on this team let me know.

Edit: tried to redact IPs but I guess there is a history anyway… they are internal anyway so whatever

1 Like

Nice.

So let me try to understand it a bit. So the integration is converting F to Celsius behind the scenes? and 22.22222222222222 is a bad value. hmm

ha/lib/python3.7/site-packages/homekit/protocol/statuscodes.py

line: 32
INVALID_VALUE = -70410

line: 48
_HapStatusCodes.INVALID_VALUE: ‘Accessory received an invalid value in a write request.’,

So your on the right track forsure.

do some digging in /lib/python3.7/site-packages/homekit/ might find the problem!

I’ll look around some more and try to figure out why the value is incorrect. I an not a Dev and I dont know python but I can definitely spot a duck when I see one LOL

1 Like

Filed a GitHub issue for it last night, hopefully we can get this taken care of! @fiftys It is probably in the code of the Lyric it self that accepts the PUT request, just can de-serialize the JSON correctly for its setting.

1 Like

Hi all,
Since i’ve updated recently i can’t get the t6 to work anymore.
My last hope is to try with homekit, i’ve reset the homekit on the t6 but on reboot HA doesn’t seem to find it. It is however detected by “known_devices” so I’m pretty sure it’s on the same network.
I have a feeling something in HA from an old config is still there, anyone got an idea where to look?
And what version of the custom modules is confirmed working? i’ve found so many that i don’t know anymore :smiley:

You might need to reset Homekit settings on the thermostat itself. But the current problem with using Homekit (at least on my T5) is that you can’t change temperature settings…but sounds like another poster has potentially found why that issue is happening.

Yeah, I did that like 5 times already but HA founds nothing, and i’m having problems with the custom components. I’m probably gonna buy another thermostat.

Just an update to the temp setting issue for the T6 Pro, unverified against T5 but I would bet it is the same issue, was not so much a json parsing issue as I stated before but the non adherence to the minStep property which is part of the Homekit Accessory Protocol. The T6, and you can verify this against the T5 if you have one, has a minStep of 0.5 so it only takes values 20.0 20.5 21.0 21.5... take a look at the GitHub issue for more detail. @Jc2k did a bunch of work getting that logic in along with some refactoring and I was able to verify it. Possibly missed the cutoff for the next release, at the time of writing this stable is 0.111.4 but be on the look out! If you want to verify T5 minStep check out config/.storage/homekit_controller-entity-map and look for the characteristic with the type UUID of 00000035-0000-1000-8000-0026BB765291 that should be the temp property and should have some associated meta.

@Mikomi do you have other HomeKit devices already using the HomeKit Controller integration in HA? If not, are you firing off the integration to find HomeKit devices, my T6 was not auto discovered at HA boot but when I went to the integrations tab, add integration, add HomeKit Controller and that is when it searched the network for HomeKit devices. Though this was my first device so maybe it is different if you already have the HomeKit Controller setup…

2 Likes

Hi
thanks for the info. I have no other homekit devices using HA.I can’t seem to find “HomeKit Controller” under: settings - integrations - +
only got “homekit” and “homekit accessories”
I tought homekit was enabled by default in HA but I’m not sure.
EDIT: Solved: it was “Homekit Accesoires” for me to add it, works like a charm! ty so much!
ty
H

I have the good fortune of owning a T5 and T6. The T6 now works with Homekit!!! Thank you, guys. Great job figuring this out.

Unfortunately, we’re not quite there yet on the T5. Still can’t adjust that one from the HA.

Bummer about the T5. Could you provide the entity map for the T5 device? It should be in config/.storage/home_controller-entity-map this file should look like a JSON structure that includes pairings of different devices and if you can identify the T5 pairing and just grab the characteristics array that are in the thermostat accessory of the pairing, there should be some model indication somewhere in the blob.

I put a small snippet of my T6 below to show what it looks like and we only need that 2nd and even more specifically there should be a characteristic in there with the UUID of 00000035-0000-1000-8000-0026BB765291 which has the metadata around setting the target temp, but more info is always helpful. Also if you could turn on debug logging for aiohomekit and capture the logs when you try to issue a climate.set_temperature service.

"accessories": [
                    {
                        "aid": 1,
                        "services": [
                            {
                                "characteristics": [<bunch stuff> ],
                                "iid": 1,
                                "stype": "accessory-information",
                                "type": "0000003E-0000-1000-8000-0026BB765291"
                            },
                            {
                                "characteristics": [<bunch of stuff>],
                                "iid": 9,
                                "stype": "thermostat",
                                "type": "0000004A-0000-1000-8000-0026BB765291"
                            }
                        ]
                    }

I got this integration working partially. I followed the instructions fiftys linked on May 6, added the lyric entries in my configuration.yaml and then edited the URI on the Honeywell Developer App. I was able the authenticate and both of my two T6 Pro (TH6320WF2003) thermostats show up. However, my first floor thermostat entity climate.upstairs is showing unavailable. The upstairs works as expected and I can add cards to control it. Any ideas would be appreciated.

Edit: After restarting and waiting several minutes, both Thermostats are showing up now.

1 Like

new HA user here. I’ve got the Honeywell Lyric integration installed from HACS, an API key setup on https://developer.honeywellhome.com/, and the configuration.yaml setup to use the Honeywell Consumer Key and Consumer Secret. Good so far! After changing the Callback URL to use http (and not https), I am able to get the Lyric configuration to go to the correct page when clicking the Request Authorizationlink. After entering my normal Honeywell Home creds, the site correctly shows the (3) thermostats (D6 Pro) in my house. After clicking Connect I get a 500 Internal server error.

Does anyone know how to correct this or is it just a matter of praying to the Honeywell devops to fix it?

I’m new as well, just started with HA this week. I read through this thread and it seems that the custom integration that was started by Bram has not been updated in quite some time. That is the version I was using and got the exact same error. I removed that integration and then followed the instructions from the link that fiftys linked (it goes to a repository that is different) and was able to get it working just fine. You do need to update your URI redirect in the Honeywell App you created.

2 Likes

thanks for pointing me in the right direction @dbs179. I think its going to work now and it appears to at least add my D6 Pro devices. I’ll spend some time later this week making sure I can read and set temps.

(edit) The integration is able to read and write temperature settings for the D6 pro thermostat (Split duct HVAC)

BTW a buddy of mine told me about wget that made this a lot easier with regard to copying the files. You can get the raw files in URL form by clicking the RAW button on github.
Here’s a full write up on what I did, hope it helps someone else!

**Setup Honeywell API creds**
* Go to developer.honeywellhome.com and create an account
* Go to My Apps and click Create new App
* Give it a name like `Home Assistant`
* Callback URL `http:<local_ip>:<local_port>`
 * Consumer Key becomes the lyric username 
 * Consumer Secret becomes the lyric password 

**Setup configuration.yaml and secrets.yaml**

* Record the Key and Secret in your HA secrets.yaml (accessed by File Editor > /config/secrets.yaml)
lyric_username: <Consumer Key>
lyric_password: <Consumer Secret>

* In your HA configuration.yaml add this: (accessed by File Editor > /config/configuration.yaml)

lyric:
  client_id: !secret lyric_username
  client_secret: !secret lyric_password

**Remove/uninstall any previous lyric integrations**
* Under HACS> Integrations click any Honeywell lyric integration and on the three dots go to Uninstall
* Reboot for safety

**Install working Lyric integration from @fiftys [post here](https://community.home-assistant.io/t/honeywell-lyric-thermostat/3520/804?u=raggnard)**  
* Make sure you have Supervisor > Add- on for Terminal & SSH installed
* Click Terminal in the left sidebar

* cd config/custom_components/
* mkdir lyric
* cd lyric

* wget https://raw.githubusercontent.com/home-assistant/core/92082b687a46c17a9a94a598b245728a8832b179/homeassistant/components/lyric/__init__.py

* wget https://raw.githubusercontent.com/home-assistant/core/92082b687a46c17a9a94a598b245728a8832b179/homeassistant/components/lyric/climate.py

* wget https://raw.githubusercontent.com/home-assistant/core/92082b687a46c17a9a94a598b245728a8832b179/homeassistant/components/lyric/config_flow.py

* wget https://raw.githubusercontent.com/home-assistant/core/92082b687a46c17a9a94a598b245728a8832b179/homeassistant/components/lyric/const.py

* wget https://raw.githubusercontent.com/home-assistant/core/92082b687a46c17a9a94a598b245728a8832b179/homeassistant/components/lyric/manifest.json

* wget https://raw.githubusercontent.com/home-assistant/core/92082b687a46c17a9a94a598b245728a8832b179/homeassistant/components/lyric/sensor.py

* wget https://raw.githubusercontent.com/home-assistant/core/92082b687a46c17a9a94a598b245728a8832b179/homeassistant/components/lyric/services.yaml

* wget https://raw.githubusercontent.com/home-assistant/core/92082b687a46c17a9a94a598b245728a8832b179/homeassistant/components/lyric/strings.json

* mkdir .translations

* cd .translations/

* wget https://raw.githubusercontent.com/home-assistant/core/92082b687a46c17a9a94a598b245728a8832b179/homeassistant/components/lyric/.translations/en.json

* Reboot/restart HA from Configuration > Server controls > Server management

**Add new custom integration to HA**
* Go to Configuration > Integrations and click the “+” button in the lower right 
* Search “Honeywell Lyric” and install it
 * It will open a webpage to the Honeywell site where you will need to log into Honeywell using your username and password that the iOS app uses. It should find the devices.

Profit…
4 Likes

Thanks. Two things:

  1. Today, we’re back to neither thermostat accepting Lovelace inputs. :face_with_symbols_over_mouth:
  2. I’m sending the entire homekit_controller file so that folks can see the T5 and T6 next to each other.

No logs til tomorrow.

{
    "data": {
        "pairings": {
            "02:39:8D:XX:XX:XX": {
                "accessories": [
                    {
                        "aid": 1,
                        "services": [
                            {
                                "characteristics": [
                                    {
                                        "format": "bool",
                                        "iid": 2,
                                        "perms": [
                                            "pw"
                                        ],
                                        "type": "00000014-0000-1000-8000-0026BB765291"
                                    },
                                    {
                                        "format": "string",
                                        "iid": 3,
                                        "perms": [
                                            "pr"
                                        ],
                                        "type": "00000020-0000-1000-8000-0026BB765291",
                                        "value": "Honeywell"
                                    },
                                    {
                                        "format": "string",
                                        "iid": 4,
                                        "perms": [
                                            "pr"
                                        ],
                                        "type": "00000021-0000-1000-8000-0026BB765291",
                                        "value": "RCHT8612WF2005"
                                    },
                                    {
                                        "format": "string",
                                        "iid": 5,
                                        "perms": [
                                            "pr"
                                        ],
                                        "type": "00000023-0000-1000-8000-0026BB765291",
                                        "value": "Tstat-105156"
                                    },
                                    {
                                        "format": "string",
                                        "iid": 6,
                                        "perms": [
                                            "pr"
                                        ],
                                        "type": "00000030-0000-1000-8000-0026BB765291",
                                        "value": "C7464AD0003820"
                                    },
                                    {
                                        "format": "string",
                                        "iid": 7,
                                        "perms": [
                                            "pr"
                                        ],
                                        "type": "00000052-0000-1000-8000-0026BB765291",
                                        "value": "2.6.8"
                                    },
                                    {
                                        "format": "uint32",
                                        "iid": 8,
                                        "perms": [
                                            "pr",
                                            "ev"
                                        ],
                                        "type": "000000A6-0000-1000-8000-0026BB765291",
                                        "value": 0
                                    }
                                ],
                                "iid": 1,
                                "stype": "accessory-information",
                                "type": "0000003E-0000-1000-8000-0026BB765291"
                            },
                            {
                                "characteristics": [
                                    {
                                        "format": "uint8",
                                        "iid": 10,
                                        "maxValue": 2,
                                        "minStep": 1,
                                        "minValue": 0,
                                        "perms": [
                                            "pr",
                                            "ev"
                                        ],
                                        "type": "0000000F-0000-1000-8000-0026BB765291",
                                        "value": 0
                                    },
                                    {
                                        "format": "uint8",
                                        "iid": 11,
                                        "maxValue": 3,
                                        "minStep": 1,
                                        "minValue": 0,
                                        "perms": [
                                            "pr",
                                            "pw",
                                            "ev"
                                        ],
                                        "type": "00000033-0000-1000-8000-0026BB765291",
                                        "value": 3
                                    },
                                    {
                                        "format": "float",
                                        "iid": 12,
                                        "maxValue": 100,
                                        "minStep": 0.5,
                                        "minValue": 0,
                                        "perms": [
                                            "pr",
                                            "ev"
                                        ],
                                        "type": "00000011-0000-1000-8000-0026BB765291",
                                        "unit": "celsius",
                                        "value": 23.5
                                    },
                                    {
                                        "format": "float",
                                        "iid": 13,
                                        "maxValue": 32,
                                        "minStep": 0.5,
                                        "minValue": 10,
                                        "perms": [
                                            "pr",
                                            "pw",
                                            "ev"
                                        ],
                                        "type": "00000035-0000-1000-8000-0026BB765291",
                                        "unit": "celsius",
                                        "value": 23.5
                                    },
                                    {
                                        "format": "uint8",
                                        "iid": 14,
                                        "maxValue": 1,
                                        "minStep": 1,
                                        "minValue": 0,
                                        "perms": [
                                            "pr",
                                            "pw",
                                            "ev"
                                        ],
                                        "type": "00000036-0000-1000-8000-0026BB765291",
                                        "value": 1
                                    },
                                    {
                                        "format": "string",
                                        "iid": 15,
                                        "perms": [
                                            "pr"
                                        ],
                                        "type": "00000023-0000-1000-8000-0026BB765291",
                                        "value": "T5 Thermostat"
                                    },
                                    {
                                        "format": "float",
                                        "iid": 20,
                                        "maxValue": 2.5,
                                        "minStep": 0.5,
                                        "minValue": 0,
                                        "perms": [
                                            "pr",
                                            "pw",
                                            "ev"
                                        ],
                                        "type": "DA2B20B8-6055-4742-B086-2C753CC9F215",
                                        "unit": "celsius",
                                        "value": 0
                                    }
                                ],
                                "iid": 9,
                                "stype": "thermostat",
                                "type": "0000004A-0000-1000-8000-0026BB765291"
                            }
                        ]
                    }
                ],
                "config_num": 0
            },
            "02:CA:79:XX:XX:XX": {
                "accessories": [
                    {
                        "aid": 1,
                        "services": [
                            {
                                "characteristics": [
                                    {
                                        "format": "bool",
                                        "iid": 2,
                                        "perms": [
                                            "pw"
                                        ],
                                        "type": "00000014-0000-1000-8000-0026BB765291"
                                    },
                                    {
                                        "format": "string",
                                        "iid": 3,
                                        "perms": [
                                            "pr"
                                        ],
                                        "type": "00000020-0000-1000-8000-0026BB765291",
                                        "value": "Honeywell"
                                    },
                                    {
                                        "format": "string",
                                        "iid": 4,
                                        "perms": [
                                            "pr"
                                        ],
                                        "type": "00000021-0000-1000-8000-0026BB765291",
                                        "value": "TH6320WF2003"
                                    },
                                    {
                                        "format": "string",
                                        "iid": 5,
                                        "perms": [
                                            "pr"
                                        ],
                                        "type": "00000023-0000-1000-8000-0026BB765291",
                                        "value": "Lyric-00609A"
                                    },
                                    {
                                        "format": "string",
                                        "iid": 6,
                                        "perms": [
                                            "pr"
                                        ],
                                        "type": "00000030-0000-1000-8000-0026BB765291",
                                        "value": "A01746D0068530"
                                    },
                                    {
                                        "format": "string",
                                        "iid": 7,
                                        "perms": [
                                            "pr"
                                        ],
                                        "type": "00000052-0000-1000-8000-0026BB765291",
                                        "value": "2.6.7"
                                    },
                                    {
                                        "format": "uint32",
                                        "iid": 8,
                                        "perms": [
                                            "pr",
                                            "ev"
                                        ],
                                        "type": "000000A6-0000-1000-8000-0026BB765291",
                                        "value": 0
                                    }
                                ],
                                "iid": 1,
                                "stype": "accessory-information",
                                "type": "0000003E-0000-1000-8000-0026BB765291"
                            },
                            {
                                "characteristics": [
                                    {
                                        "format": "uint8",
                                        "iid": 10,
                                        "maxValue": 2,
                                        "minStep": 1,
                                        "minValue": 0,
                                        "perms": [
                                            "pr",
                                            "ev"
                                        ],
                                        "type": "0000000F-0000-1000-8000-0026BB765291",
                                        "value": 2
                                    },
                                    {
                                        "format": "uint8",
                                        "iid": 11,
                                        "maxValue": 3,
                                        "minStep": 1,
                                        "minValue": 0,
                                        "perms": [
                                            "pr",
                                            "pw",
                                            "ev"
                                        ],
                                        "type": "00000033-0000-1000-8000-0026BB765291",
                                        "value": 3
                                    },
                                    {
                                        "format": "float",
                                        "iid": 12,
                                        "maxValue": 100,
                                        "minStep": 0.5,
                                        "minValue": 0,
                                        "perms": [
                                            "pr",
                                            "ev"
                                        ],
                                        "type": "00000011-0000-1000-8000-0026BB765291",
                                        "unit": "celsius",
                                        "value": 23.5
                                    },
                                    {
                                        "format": "float",
                                        "iid": 13,
                                        "maxValue": 32,
                                        "minStep": 0.5,
                                        "minValue": 10,
                                        "perms": [
                                            "pr",
                                            "pw",
                                            "ev"
                                        ],
                                        "type": "00000035-0000-1000-8000-0026BB765291",
                                        "unit": "celsius",
                                        "value": 23.5
                                    },
                                    {
                                        "format": "uint8",
                                        "iid": 14,
                                        "maxValue": 1,
                                        "minStep": 1,
                                        "minValue": 0,
                                        "perms": [
                                            "pr",
                                            "pw",
                                            "ev"
                                        ],
                                        "type": "00000036-0000-1000-8000-0026BB765291",
                                        "value": 1
                                    },
                                    {
                                        "format": "string",
                                        "iid": 15,
                                        "perms": [
                                            "pr"
                                        ],
                                        "type": "00000023-0000-1000-8000-0026BB765291",
                                        "value": "Lyric T6 Pro Thermostat"
                                    },
                                    {
                                        "format": "float",
                                        "iid": 20,
                                        "maxValue": 2.5,
                                        "minStep": 0.5,
                                        "minValue": 0,
                                        "perms": [
                                            "pr",
                                            "pw",
                                            "ev"
                                        ],
                                        "type": "DA2B20B8-6055-4742-B086-2C753CC9F215",
                                        "unit": "celsius",
                                        "value": 0
                                    }
                                ],
                                "iid": 9,
                                "stype": "thermostat",
                                "type": "0000004A-0000-1000-8000-0026BB765291"
                            }
                        ]
                    }
                ],
                "config_num": 0
            }
        }
    },
    "key": "homekit_controller-entity-map",
    "version": 1
}

@tarheelz
So both are the same minStep of 0.5 so should be good with current fix. The fix should be in the 0.113 release which is currently dev/beta, what is your current version? Current official release is 0.112.4.

1 Like

So I’m still having issues. I used the process @fiftys linked above and that @raggnarD outlined as well. The integration installs just fine and my upstairs T6 Pro works fine. My downstairs T6 Pro doesn’t show up. The error seems to point to the fact that the TStat is in “Auto” mode. From quick testing if I put it in manual mode (like the upstairs is) it works fine. Error message below. Any thoughts?

Logger: homeassistant.components.climate
Source: custom_components/lyric/climate.py:161
Integration: Climate (documentation, issues)
First occurred: 3:21:11 PM (1 occurrences)
Last logged: 3:21:11 PM

Error while setting up lyric platform for climate

Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 186, in _async_setup_platform
await asyncio.gather(*pending)
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 292, in async_add_entities
await asyncio.gather(*tasks)
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 451, in _async_add_entity
entity.async_write_ha_state()
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 290, in async_write_ha_state
self._async_write_ha_state()
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 314, in _async_write_ha_state
sstate = self.state
File “/usr/src/homeassistant/homeassistant/components/climate/init.py”, line 173, in state
return self.hvac_mode
File “/config/custom_components/lyric/climate.py”, line 161, in hvac_mode
return HVAC_MODES[self._mode]
KeyError: ‘AUTO’

@ruffasdagut did you ever get this sorted? I have the exact same issue. I keep my T6 on the first floor in Auto most of the time but my upstairs is usually in manual heat or cool. I get the same errors on my first floor tstat when in auto.