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
72.61k stars 30.37k forks source link

HomeKit unreliable after upgrade to new Home architecture (16.2) #84102

Closed farmio closed 1 year ago

farmio commented 1 year ago

The problem

After the update to the new apple home architecture (from the Home App) the homekit integration is unreliable. My system is 1 apple Tv, 2 Homepod mini, 1 Hue bridge and Home Assistant.

When I try to toggle eg. a light exposed to HK via the HA integration it sometimes works, but most of the times it doesn't react (despite showing the new state in Home app). When I repeat toggling a few times it shows "Updating" ("Aktualisieren" in german, not sure about the correct used term in english) for a couple of seconds until it turns "Unavailable" / "No response" ("Gerät antwortet nicht"). After a few minutes it starts working again until it doesn't 🤷

I have power cycled my 3 Apple devices. I have restarted HA a couple of times. I have not yet tried to unpair or repair.

What version of Home Assistant Core has the issue?

2022.12.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

homekit

Link to integration documentation on our website

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

Diagnostics information

config_entry-homekit-856749f3943eae99c0299169e397d8d5.json.txt

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Client 824938fe-5d4e-410a-9b62-18c36e031695 attempted pair verify without being paired to HASS Bridge first.

find the debug logs below

After update to HA 2022.12.6 still same issue. Here I have tried 3 times - every time first light toggles didn't yield result in light, then unavailable, then it worked again for some dimming, until it stopped.

2022-12-16 15:08:35.328 INFO (MainThread) [pyhap.hap_protocol] ('10.1.1.71', 49242): Connection made to HASS Bridge
2022-12-16 15:09:21.472 INFO (MainThread) [pyhap.hap_protocol] ('10.1.1.71', 49243): Connection made to HASS Bridge
2022-12-16 15:10:56.050 INFO (MainThread) [pyhap.hap_protocol] ('10.1.1.71', 49244): Connection made to HASS Bridge
2022-12-16 15:11:16.774 INFO (MainThread) [pyhap.hap_protocol] ('10.1.1.71', 49245): Connection made to HASS Bridge

Additional information

home-assistant_homekit_2022-12-16T13-36-39.309Z.log

I'm happy to provide more logs etc. as needed, just let me know.

home-assistant[bot] commented 1 year ago

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

Code owner commands Code owners of `homekit` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Change the title of the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign homekit` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


homekit documentation homekit source (message by IssueLinks)

bdraco commented 1 year ago

Client 824938fe-5d4e-410a-9b62-18c36e031695 attempted pair verify without being paired to HASS Bridge first. usually means the client is missing the keys to talk to HomeKit

Sometimes you can solve this by signing out of iCloud, rebooting the iOS device, signing back into iCloud, and than rebooting again

If that doesn't work, you'll likely need to delete the bridge and recreate it to force new keys.

If that still doesn't work you are probably in for a full reset: https://www.reddit.com/r/HomeKit/comments/yy2oy7/apple_has_a_downloadable_profile_to_really_clear/?utm_source=share&utm_medium=ios_app&utm_name=iossmf

farmio commented 1 year ago

Ok thanks. I guess I start by deleting the bridge and set it up again. It's not a big deal - I have no HK automations anyway. Will report how it went soon 🤣

farmio commented 1 year ago

Allright, deleting the integration and setting it up again seems to have fixed it. Works like a charm again. Re-adding wasn't fun though, the Home app asks for a room (and other stuff) for every entity - even if it's in the name 🙃

Thanks for your quick help bdraco!

AQ-Official commented 1 year ago

I have the same problem. I've tried deleting the integration and setting it up again. At first this would work, but later on he would have the same problem again. I tried to reload this integration after successful pairing with Homekit and the pairing code popped up differently each time.

Fenrikur commented 1 year ago

Having faced other issues after upgrading to 16.2 (mostly shades being turned into windows by HomeKit and presence detection no longer working at all), I today went through all the steps of resetting HomeKit (including using the device profile) and removed the homekit integration configured in YAML before restarting Home Assistant in order to get a new barcode for adding it to the new home. After having gone through the entire setup process, all devices added via the integration still show as not responding even after restarting the hub (Apple TV 4K (2nd generation)) and the Home Assistant instance.

I'll try to gather some logs and open a new issue.

Edit: Seems that the reset of HomeKit was somewhat incomplete and even though all our devices were on 16.2/Ventura, the old home startet showing up every now and then. Removing it again on all devices and also signing out of the Apple TV helped resolve the issue so that now all HA devices are shown as reachable again. Let's see if this lasts. (=

superczar commented 1 year ago

Same problem.

Here is what I have been able to discover so far.

The root cause of the issue seems to be that the pairing code for hass bridge / homekit integration on HA changes after some time causing an authentication issue for the bridge that was originally added to Home Assistant.

Rationale:

PeterTWP commented 1 year ago

Same issue. Same rough time frames as superczar. Though mine initially all worked great for about 48-72 hrs. I have not tried a re-pair yet.

I can add that even without an attempted re-pair NOR adding any new devices, I am now seeing my second new pairing code and PIN in HA (as a notification). The first occurred at the time of the HomeKit upgrade. This one, about 3-4 days later. All devices are "no response"

I also have Homebridge running (for cameras only) and it has remained rock solid since the upgrade. Just as more info.

simonepittis commented 1 year ago

Same issue here. reset all two times but no changes. note: if I add the Netatmo Weather station, no errors. the issue stay only on HASS

vitaliy-kozlov commented 1 year ago

Hi, Having the same issue!! No response after updating to 16.2. Deleting and repairing hub with 100 + Accessories is not working, after first reboot all devices became not responsible again! damn this is so bad! What can we do with this? Is there any working solution? I cant take a hours of mi life to fix this. All my devices connected to homekit using home assistant.! This is fail of century!

fdegier commented 1 year ago

Same issue here. Scrypted and HomeBridge are unaffected.