home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.14k stars 29.81k forks source link

Homekit Device (Honeywell T10) – inconsistent responses to HA commands (temperatures being inappropriately rounded up) #122092

Open comdty opened 1 month ago

comdty commented 1 month ago

The problem

I have a Honeywell T10 connected to HA as a HomeKit Device that I’m having issues changing the target temperatures for and I’m wondering if anyone’s encountered this and what the solution might be.

I’ve added the entity to a dashboard for control (using the standard thermostat control). As I attempt to change target temperatures, the thermostat doesn’t always respect the temperature I’ve selected in HA.

For example:

Selecting 71F in HA results in 71F on the thermostat
Selecting 72F in HA results in 72F on the thermostat
Selecting 73F in HA results in 74F on the thermostat
Selecting 74F in HA results in 74F on the thermostat
Selecting 75F in HA results in 75F on the thermostat

In the above example, 73F is the “problem” temperature but the temperature that’s “the problem” seems to change over time. For example, over the weekend, it was 73 but now it’s 74.

Thinking the issue might be with the dashboard thermostat control element, I’ve also created a button-driven automation that changes the target temperature… with identical (unsuccessful) results. Other users have indicated elsewhere that this problem isn’t limited to my environment but I’m still not sure what’s causing the issue or what the solution is (other than potentially using non-integer temperature calls which sounds a bit hacky).

What version of Home Assistant Core has the issue?

core-2024.7.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Homekit - Thermostats

Link to integration documentation on our website

https://www.home-assistant.io/integrations/homekit_controller/

Diagnostics information

config_entry-homekit_controller-01J2MSC565ZNRGG472PXTTX4ZJ.json

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2024-07-17 09:54:02.098 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Starting HomeKit device update: 6E:AD:F2:50:BB:B5
2024-07-17 09:54:02.098 DEBUG (MainThread) [aiohomekit.controller.ip.connection] 10.0.50.15: raw request: b'GET /characteristics?id=2.43,2.36,2.39,2.35,2.38,2.41,2.37,2.44 HTTP/1.1\r\nHost: 10.0.50.15\r\n\r\n'
2024-07-17 09:54:02.098 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Starting HomeKit device update: B9:FA:78:ED:C3:E1
2024-07-17 09:54:02.099 DEBUG (MainThread) [aiohomekit.controller.ip.connection] 10.0.50.14: raw request: b'GET /characteristics?id=2.43,2.36,2.39,2.35,2.38,2.41,2.37,2.44 HTTP/1.1\r\nHost: 10.0.50.14\r\n\r\n'
2024-07-17 09:54:02.714 DEBUG (MainThread) [aiohomekit.controller.ip.connection] 10.0.50.15: raw response: bytearray(b'{"characteristics":[{"aid":2,"iid":43,"value":25.5},{"aid":2,"iid":36,"value":3},{"aid":2,"iid":39,"value":1},{"aid":2,"iid":35,"value":0},{"aid":2,"iid":38,"value":22},{"aid":2,"iid":41,"value":70},{"aid":2,"iid":37,"value":23},{"aid":2,"iid":44,"value":18.5}]}')
2024-07-17 09:54:02.714 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Called async_set_available_state with True for 6E:AD:F2:50:BB:B5
2024-07-17 09:54:02.714 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Finished HomeKit device update: 6E:AD:F2:50:BB:B5
2024-07-17 09:54:02.826 DEBUG (MainThread) [aiohomekit.controller.ip.connection] 10.0.50.14: raw response: bytearray(b'{"characteristics":[{"aid":2,"iid":43,"value":24.5},{"aid":2,"iid":36,"value":3},{"aid":2,"iid":39,"value":1},{"aid":2,"iid":35,"value":0},{"aid":2,"iid":38,"value":22},{"aid":2,"iid":41,"value":68},{"aid":2,"iid":37,"value":23},{"aid":2,"iid":44,"value":19}]}')
2024-07-17 09:54:02.826 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Called async_set_available_state with True for B9:FA:78:ED:C3:E1
2024-07-17 09:54:02.826 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Finished HomeKit device update: B9:FA:78:ED:C3:E1
2024-07-17 09:54:11.270 DEBUG (MainThread) [aiohomekit.controller.ip.connection] 10.0.50.14: raw request: b'PUT /characteristics HTTP/1.1\r\nHost: 10.0.50.14\r\nContent-Length: 117\r\nContent-Type: application/hap+json\r\n\r\n{"characteristics":[{"aid":2,"iid":44,"value":19.0},{"aid":2,"iid":43,"value":24.0},{"aid":2,"iid":38,"value":21.5}]}'
2024-07-17 09:54:11.845 DEBUG (MainThread) [aiohomekit.controller.ip.connection] 10.0.50.14: raw response: bytearray(b'')
2024-07-17 09:54:11.846 DEBUG (MainThread) [aiohomekit.controller.abstract] callback ev:{(2, 44): {'value': 19.0}, (2, 43): {'value': 24.0}, (2, 38): {'value': 21.5}}
2024-07-17 09:54:11.846 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Called async_set_available_state with True for B9:FA:78:ED:C3:E1
2024-07-17 09:54:15.715 DEBUG (MainThread) [aiohomekit.controller.ip.connection] 10.0.50.14: raw request: b'PUT /characteristics HTTP/1.1\r\nHost: 10.0.50.14\r\nContent-Length: 117\r\nContent-Type: application/hap+json\r\n\r\n{"characteristics":[{"aid":2,"iid":44,"value":19.0},{"aid":2,"iid":43,"value":23.5},{"aid":2,"iid":38,"value":21.0}]}'
2024-07-17 09:54:16.352 DEBUG (MainThread) [aiohomekit.controller.ip.connection] 10.0.50.14: raw response: bytearray(b'')
2024-07-17 09:54:16.352 DEBUG (MainThread) [aiohomekit.controller.abstract] callback ev:{(2, 44): {'value': 19.0}, (2, 43): {'value': 23.5}, (2, 38): {'value': 21.0}}
2024-07-17 09:54:16.352 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Called async_set_available_state with True for B9:FA:78:ED:C3:E1
2024-07-17 09:54:16.507 DEBUG (MainThread) [aiohomekit.controller.abstract] callback ev:{(2, 43): {'value': 24}}
2024-07-17 09:54:16.507 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Called async_set_available_state with True for B9:FA:78:ED:C3:E1
2024-07-17 09:54:18.748 DEBUG (MainThread) [aiohomekit.controller.ip.connection] 10.0.50.14: raw request: b'PUT /characteristics HTTP/1.1\r\nHost: 10.0.50.14\r\nContent-Length: 117\r\nContent-Type: application/hap+json\r\n\r\n{"characteristics":[{"aid":2,"iid":44,"value":19.0},{"aid":2,"iid":43,"value":23.0},{"aid":2,"iid":38,"value":21.0}]}'
2024-07-17 09:54:19.317 DEBUG (MainThread) [aiohomekit.controller.ip.connection] 10.0.50.14: raw response: bytearray(b'')
2024-07-17 09:54:19.317 DEBUG (MainThread) [aiohomekit.controller.abstract] callback ev:{(2, 44): {'value': 19.0}, (2, 43): {'value': 23.0}, (2, 38): {'value': 21.0}}
2024-07-17 09:54:19.317 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Called async_set_available_state with True for B9:FA:78:ED:C3:E1
2024-07-17 09:54:19.560 DEBUG (MainThread) [aiohomekit.controller.abstract] callback ev:{(2, 43): {'value': 23.5}, (2, 38): {'value': 21.5}}
2024-07-17 09:54:19.560 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Called async_set_available_state with True for B9:FA:78:ED:C3:E1
2024-07-17 09:54:21.667 DEBUG (MainThread) [aiohomekit.controller.ip.connection] 10.0.50.14: raw request: b'PUT /characteristics HTTP/1.1\r\nHost: 10.0.50.14\r\nContent-Length: 117\r\nContent-Type: application/hap+json\r\n\r\n{"characteristics":[{"aid":2,"iid":44,"value":19.0},{"aid":2,"iid":43,"value":22.0},{"aid":2,"iid":38,"value":20.5}]}'
2024-07-17 09:54:22.290 DEBUG (MainThread) [aiohomekit.controller.ip.connection] 10.0.50.14: raw response: bytearray(b'')
2024-07-17 09:54:22.290 DEBUG (MainThread) [aiohomekit.controller.abstract] callback ev:{(2, 44): {'value': 19.0}, (2, 43): {'value': 22.0}, (2, 38): {'value': 20.5}}
2024-07-17 09:54:22.290 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Called async_set_available_state with True for B9:FA:78:ED:C3:E1
2024-07-17 09:54:23.327 DEBUG (MainThread) [aiohomekit.controller.abstract] callback ev:{(2, 35): {'value': 2}}
2024-07-17 09:54:23.327 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Called async_set_available_state with True for B9:FA:78:ED:C3:E1
2024-07-17 09:54:25.546 DEBUG (MainThread) [aiohomekit.controller.ip.connection] 10.0.50.14: raw request: b'PUT /characteristics HTTP/1.1\r\nHost: 10.0.50.14\r\nContent-Length: 117\r\nContent-Type: application/hap+json\r\n\r\n{"characteristics":[{"aid":2,"iid":44,"value":19.0},{"aid":2,"iid":43,"value":23.0},{"aid":2,"iid":38,"value":21.0}]}'
2024-07-17 09:54:26.181 DEBUG (MainThread) [aiohomekit.controller.ip.connection] 10.0.50.14: raw response: bytearray(b'')
2024-07-17 09:54:26.181 DEBUG (MainThread) [aiohomekit.controller.abstract] callback ev:{(2, 44): {'value': 19.0}, (2, 43): {'value': 23.0}, (2, 38): {'value': 21.0}}
2024-07-17 09:54:26.181 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Called async_set_available_state with True for B9:FA:78:ED:C3:E1
2024-07-17 09:54:26.407 DEBUG (MainThread) [aiohomekit.controller.abstract] callback ev:{(2, 37): {'value': 22}}
2024-07-17 09:54:26.407 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Called async_set_available_state with True for B9:FA:78:ED:C3:E1
2024-07-17 09:54:27.502 DEBUG (MainThread) [aiohomekit.controller.abstract] callback ev:{(2, 43): {'value': 23.5}, (2, 35): {'value': 0}, (2, 38): {'value': 21.5}}
2024-07-17 09:54:27.502 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Called async_set_available_state with True for B9:FA:78:ED:C3:E1
2024-07-17 09:54:29.979 DEBUG (MainThread) [aiohomekit.controller.ip.connection] 10.0.50.14: raw request: b'PUT /characteristics HTTP/1.1\r\nHost: 10.0.50.14\r\nContent-Length: 117\r\nContent-Type: application/hap+json\r\n\r\n{"characteristics":[{"aid":2,"iid":44,"value":19.0},{"aid":2,"iid":43,"value":24.0},{"aid":2,"iid":38,"value":21.5}]}'
2024-07-17 09:54:30.578 DEBUG (MainThread) [aiohomekit.controller.ip.connection] 10.0.50.14: raw response: bytearray(b'')
2024-07-17 09:54:30.578 DEBUG (MainThread) [aiohomekit.controller.abstract] callback ev:{(2, 44): {'value': 19.0}, (2, 43): {'value': 24.0}, (2, 38): {'value': 21.5}}
2024-07-17 09:54:30.578 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Called async_set_available_state with True for B9:FA:78:ED:C3:E1
2024-07-17 09:54:33.172 DEBUG (MainThread) [aiohomekit.controller.ip.connection] 10.0.50.14: raw request: b'PUT /characteristics HTTP/1.1\r\nHost: 10.0.50.14\r\nContent-Length: 117\r\nContent-Type: application/hap+json\r\n\r\n{"characteristics":[{"aid":2,"iid":44,"value":19.0},{"aid":2,"iid":43,"value":23.5},{"aid":2,"iid":38,"value":21.0}]}'
2024-07-17 09:54:33.866 DEBUG (MainThread) [aiohomekit.controller.ip.connection] 10.0.50.14: raw response: bytearray(b'')
2024-07-17 09:54:33.866 DEBUG (MainThread) [aiohomekit.controller.abstract] callback ev:{(2, 44): {'value': 19.0}, (2, 43): {'value': 23.5}, (2, 38): {'value': 21.0}}
2024-07-17 09:54:33.866 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Called async_set_available_state with True for B9:FA:78:ED:C3:E1
2024-07-17 09:54:34.021 DEBUG (MainThread) [aiohomekit.controller.abstract] callback ev:{(2, 43): {'value': 24}}
2024-07-17 09:54:34.021 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Called async_set_available_state with True for B9:FA:78:ED:C3:E1
2024-07-17 09:54:46.281 DEBUG (MainThread) [aiohomekit.controller.abstract] callback ev:{(2, 37): {'value': 23}}
2024-07-17 09:54:46.281 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Called async_set_available_state with True for B9:FA:78:ED:C3:E1

Additional information

No response

home-assistant[bot] commented 1 month ago

Hey there @jc2k, @bdraco, mind taking a look at this issue as it has been labeled with an integration (homekit_controller) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `homekit_controller` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign homekit_controller` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


homekit_controller documentation homekit_controller source (message by IssueLinks)

Jc2k commented 1 month ago

Under the hood homekit works exclusively in C. We have seen problems with thermostats that natively work in F but implement homekit when connected to HA running in F. Every temperature gets a lossy F -> C -> F double conversion. To paper over implementation bugs in some devices, we also have to do some fairly aggressive clamping after converting to C (some thermostats don't like floats).

comdty commented 1 month ago

Thanks for the feedback. In light of your experience with this, do you recommend utilizing C (instead of F) within HA to limit the number of conversions? Is that likely the most reliable?

Jc2k commented 1 month ago

It might be worth testing to see if it helps.

kevinhaas commented 2 weeks ago

You can use an automation to work around the unfriendly attitude towards Fahrenheit. I essentially skip over those values to the next one when they are hit. Otherwise you'll get stuck.

Many other platforms handle both C/F just fine. This is an implementation decision.