Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HomeKit Thermostat Not Communicating Properly With Home Assistant after 2024.8 #123963

Closed
agk1190 opened this issue Aug 15, 2024 · 12 comments · Fixed by #124115
Closed

HomeKit Thermostat Not Communicating Properly With Home Assistant after 2024.8 #123963

agk1190 opened this issue Aug 15, 2024 · 12 comments · Fixed by #124115

Comments

@agk1190
Copy link

agk1190 commented Aug 15, 2024

The problem

Instantly after updating to Home Assistant 2024.8, all Mysa thermostats controlled via HomeKit stopped reporting their temperature live. Currently, the temperature updates every 0.5°C where previously it updated every 0.1°C. Retrieving the set temperature also sometimes fails after changing it.

I have rebooted HA and the thermostats with no luck. The thermostats still behave normally in the native app.

It almost seems like after 2024.8.0, HA is subscribing to updates from the thermostat and the thermostat is only providing occasional updates.

image

What version of Home Assistant Core has the issue?

core-2024.8.0

What was the last working version of Home Assistant Core?

core-2024.7.4

What type of installation are you running?

Home Assistant OS

Integration causing the issue

homekit_controller

Link to integration documentation on our website

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

Diagnostics information

homekit_controller-a6a60571538ca51b32e2a54d328980c0-Mysa-6febe8-f5327fb1e2f71046880ba271f699393d.json

Example YAML snippet

No response

Anything in the logs that might be useful for us?

The log has this message for each thermostat every minute

2024-08-14 19:59:57.382 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Accessory is reachable, skip polling: 77:86:56:45:94:FE
2024-08-14 19:59:57.393 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Accessory is reachable, skip polling: 5E:77:1E:1C:34:84
2024-08-14 19:59:57.393 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Accessory is reachable, skip polling: D8:9A:2C:FE:19:6C
2024-08-14 19:59:57.393 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Accessory is reachable, skip polling: 2C:CF:4C:96:2C:07
2024-08-14 19:59:57.395 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Accessory is reachable, skip polling: EC:87:A4:33:2E:74
2024-08-14 19:59:57.398 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Accessory is reachable, skip polling: 76:17:6E:0D:02:3D
2024-08-14 19:59:57.401 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Accessory is reachable, skip polling: F9:AD:32:EC:A3:F7
2024-08-14 19:59:57.405 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Accessory is reachable, skip polling: 2B:1A:F4:3B:80:3E
2024-08-14 19:59:57.408 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Accessory is reachable, skip polling: D3:35:D7:04:25:F3
2024-08-14 19:59:57.410 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Accessory is reachable, skip polling: DE:51:E6:BD:5B:DE
2024-08-14 20:00:57.384 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Accessory is reachable, skip polling: 77:86:56:45:94:FE
2024-08-14 20:00:57.395 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Accessory is reachable, skip polling: 5E:77:1E:1C:34:84
2024-08-14 20:00:57.395 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Accessory is reachable, skip polling: D8:9A:2C:FE:19:6C
2024-08-14 20:00:57.395 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Accessory is reachable, skip polling: 2C:CF:4C:96:2C:07
2024-08-14 20:00:57.395 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Accessory is reachable, skip polling: EC:87:A4:33:2E:74
2024-08-14 20:00:57.399 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Accessory is reachable, skip polling: 76:17:6E:0D:02:3D
2024-08-14 20:00:57.402 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Accessory is reachable, skip polling: F9:AD:32:EC:A3:F7
2024-08-14 20:00:57.405 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Accessory is reachable, skip polling: 2B:1A:F4:3B:80:3E
2024-08-14 20:00:57.409 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Accessory is reachable, skip polling: D3:35:D7:04:25:F3
2024-08-14 20:00:57.411 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Accessory is reachable, skip polling: DE:51:E6:BD:5B:DE
2024-08-14 20:01:57.384 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Accessory is reachable, skip polling: 77:86:56:45:94:FE
2024-08-14 20:01:57.395 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Accessory is reachable, skip polling: 5E:77:1E:1C:34:84
2024-08-14 20:01:57.395 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Accessory is reachable, skip polling: D8:9A:2C:FE:19:6C
2024-08-14 20:01:57.395 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Accessory is reachable, skip polling: 2C:CF:4C:96:2C:07
2024-08-14 20:01:57.396 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Accessory is reachable, skip polling: EC:87:A4:33:2E:74
2024-08-14 20:01:57.400 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Accessory is reachable, skip polling: 76:17:6E:0D:02:3D
2024-08-14 20:01:57.404 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Accessory is reachable, skip polling: F9:AD:32:EC:A3:F7
2024-08-14 20:01:57.406 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Accessory is reachable, skip polling: 2B:1A:F4:3B:80:3E
2024-08-14 20:01:57.409 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Accessory is reachable, skip polling: D3:35:D7:04:25:F3
2024-08-14 20:01:57.411 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Accessory is reachable, skip polling: DE:51:E6:BD:5B:DE


This message also shows up every so often

2024-08-14 20:30:20.728 DEBUG (MainThread) [aiohomekit.zeroconf] de:51:e6:bd:5b:de: Notifying pairing of description update: HomeKitService(name='Mysa-8b19e4', id='de:51:e6:bd:5b:de', model='Mysa-8b19e4', feature_flags=<FeatureFlags.SUPPORTS_APPLE_AUTHENTICATION_COPROCESSOR: 1>, status_flags=<StatusFlags: 0>, config_num=21, state_num=1, category=<Categories.THERMOSTAT: 9>, protocol_version='1.1', type='_hap._tcp.local.', address='192.168.1.138', addresses=['192.168.1.138'], port=57959)

Additional information

No response

@home-assistant
Copy link

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)

@User873902
Copy link

User873902 commented Aug 16, 2024

I have a HomeKit connected thermostat and haven't noticed this issue with interval temperature reporting. I have noticed, however, that the thermostat will be "unavailable" when I submit set-temperature and on/off requests via Google Assistant. Google will intermittently report, “Sorry, I couldn’t reach the home assistant,” just for this device, but respond to all other HA inquiries, indicating, to me, that there may indeed be a problem with HomeKit Thermostat communication.

@bdraco bdraco mentioned this issue Aug 17, 2024
19 tasks
@bdraco
Copy link
Member

bdraco commented Aug 17, 2024

@agk1190 Can you try #124115?

cd /config
curl -o- -sSL https://gist.githubusercontent.com/bdraco/43f8043cb04b9838383fd71353e99b18/raw/core_integration_pr | bash /dev/stdin -d homekit_controller -p 124115

@bdraco
Copy link
Member

bdraco commented Aug 17, 2024

#124115 is very likely to fix the issue but without debug logs I can't be sure.

This issue will close when #124115 merged. Please do report back though either way so we know if its fixed or not.

@agk1190
Copy link
Author

agk1190 commented Aug 18, 2024

@bdraco Unfortunately no change in behavior with #124115. Below are the logs and diagnostics again.
home-assistant_homekit_controller_2024-08-18T02-58-46.542Z.log
homekit_controller-a6a60571538ca51b32e2a54d328980c0-Mysa-6febe8-f5327fb1e2f71046880ba271f699393d (1).json

Did homekit_controller poll all characteristics every minute prior to the 2024.8.0 update? I wonder if the thermostat is not loosing connection but rather is programmed to only send the temp and humidity values after a certain amount of change has occurred (0.5°C and 2% humidity).

@bdraco
Copy link
Member

bdraco commented Aug 18, 2024

@bdraco Unfortunately no change in behavior with #124115. Below are the logs and diagnostics again. home-assistant_homekit_controller_2024-08-18T02-58-46.542Z.log homekit_controller-a6a60571538ca51b32e2a54d328980c0-Mysa-6febe8-f5327fb1e2f71046880ba271f699393d (1).json

Did homekit_controller poll all characteristics every minute prior to the 2024.8.0 update? I wonder if the thermostat is not loosing connection but rather is programmed to only send the temp and humidity values after a certain amount of change has occurred (0.5°C and 2% humidity).

Yes it used to poll every 30s but since that caused crashes on devices and was not in line with what the Home app did in iOS so we removed the polling for characteristics that are marked as push (evented) and and let the device decide when to send the data. We only poll characteristics that are marked poll only now

@bdraco bdraco reopened this Aug 18, 2024
@bdraco
Copy link
Member

bdraco commented Aug 18, 2024

If you need to poll more frequently than the device sends updates, if we don’t have the generic entity update service wired up to be able to poll on demand from an automation I can look into adding support for that next week

@bdraco
Copy link
Member

bdraco commented Aug 18, 2024

alias: Force Update
description: 'Update the position of defined shades'
mode: single
trigger:
  - platform: time_pattern
    hours: '1'
action:
  - action: homeassistant.update_entity
    target:
      entity_id:
        - cover.family_right
        - cover.family_left
        - cover.kitchen_roller
        

Here is an automation for polling shades more frequently that could likely be adapted. I’m not sure that’s hooked up in homekit_controller though so it might not work without some changes. I’m traveling this weekend so I’m not in a position to check

@bdraco
Copy link
Member

bdraco commented Aug 18, 2024

It looks like that’s not wired up to override and poll. That’s going to require some refactoring. I’ll look into implementing it next week if travel goes ok

@bdraco
Copy link
Member

bdraco commented Aug 25, 2024

#124582 will allow you to create an automation to poll as frequently as you like

balloob pushed a commit that referenced this issue Aug 25, 2024
@agk1190
Copy link
Author

agk1190 commented Aug 26, 2024

PR #124582 has fixed this issue. Thanks @bdraco!

@zaquirius
Copy link

I use homekit for an Ariston boiler that is compatible and in addition to a sampling frequency problem it lacks precision, now it only shows integer data but no decimals. But the decimals are taken into account, that is, round the temperature but do not truncate the decimal.
screen / HA
23.2 / 23
23.8 / 24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants