-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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 integration occasionally has stale accessory state since 2022.11.x #81990
Comments
Hey there @bdraco, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) homekit documentation |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
I've made a mess of this issue. The desync / late sync issue happens for all sorts of devices (for example zwave lights in another room). The issues with the Eve light switch is compounded by Thread/coap problems. |
I suppose I should mention all my Apple devices are running the latest public stable release (so iOS 16.1.1, equivalent ATV version, and latest Ventura on macOS). It's quite possible these is an issue on Apple's side, and maybe I can devise a test methodology to discern that. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
There is a lot to unpack here so I'm going to try to give you information about what has changed in the hopes that it can get you to a resolution.
|
What's the procedure for re-pairing or resetting a HA HomeKit bridge? Something like
|
|
Actually the ID will probably not change unless you delete it and recreate it. But you could also modify the |
I followed my procedure and made a brand new bridge. Going to see how the system behaves over the weekend. I'll open a new issue specifically for the Thread devices. They all do seem to go unavailable in HA after some time. |
The problem has just occurred again. Went into the Apple Home app and I had a very stale turned on lights count and light states across the home which did not update after waiting idle in the app for 10 seconds or so. I went out of the app back to the home screen, waiting a few seconds, went back into Apple Home and that triggered a refresh. I never observed this behavior in the recent past (a month ago). |
If you enable debug logs for |
The ends? In any case, debug logging is enabled and I'll keep an eye out for the problem again so I have a time region to look at in the logs. I don't have a good sense of when the problem occurs. It may be when I leave home and the phone goes on cellular, it could be a lapse of time w/o going into the Apple Home app, or something else entirely. |
Autocorrect fail: should have been "events" |
Also check in the Home app which Apple device is the home hub. You'll likely find in the
|
I use a wired AppleTV as my only HomeKit hub (do not own any HomePods). Apple Home on my phone and Mac shows it as connected. However, I just remembered that some of my accessories (WeMo lights) are directly paired to my HomeKit home. I'll pay extra attention the next time the issue occurs, but I believe some of those lights also had stale state. If that's the case, the issue is on the ATV HomeKit hub, not in HA. I don't know if there would be indication that the hub stopped responding in the pyhap logs. |
If its network is down you'll see it stop getting events. If its network is up it could still be receiving the events but not processing them |
Glad we can rule that out as that one is always nearly impossible to resolve if its wifi Which version of TvOS and AppleTV hardware do you have? |
Apple TV 4K 2nd gen (AppleTV11,1). It's currently on tvOS 16.1. |
I've got almost the same setup for my production except I'm using a 4k gen3 I haven't had any luck replicating this yet, but I'll keep watching. |
I have radically simplified my prod network over the weekend. No more VLANs, everything on the default LAN. I have not observed the issue again yet, but will keep open a few more days. A Unifi OS 1.x network with VLANs + Unifi OS 1.x's mdns reflector may have reliability problems. I did reboot my ATV and a lot of other devices however (as part of the network arch change), so it is also possible I "flushed out the badness" just by rebooting devices. |
This is still ongoing. I have a feeling it's an issue with Apple Home app and not strictly related to the HomeKit integration, though of course there could be an interaction (would be very difficult to prove w/o ripping apart most of my HomeKit home). |
Might be best to wait for iOS 16.2 and see if the new architecture fixes it since whatever time we invest in digging through this is likely going to be wasted effort when everything changes again shortly. |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
The problem
With 2022.11.x, the HomeKit integration feels somewhat less reliable. Specifically, accessory state is sometimes stale. Switching to a different view in the Home app or re-opening the Home app usually updates the state. I do not remember this behavior with 2022.10.x. Nothing has changed on my network (no hardware, software, or configuration change).
I bridge a mix of accessories via the HomeKit integration, including Z-Wave devices (deadbolts, scene controllers, light switches, LED strip controllers, sensors), HomeKit Bridge devices (light switches). I use a YAML configuration for my main bridge integration in order to associate battery sensors with some of the bridged accessories.
Home Assistant 2022.11.2
Supervisor 2022.10.2
Operating System 9.3
Frontend 20221108.0 - latest
What version of Home Assistant Core has the issue?
2022.11.2
What was the last working version of Home Assistant Core?
2022.10
What type of installation are you running?
Home Assistant OS
Integration causing the issue
HomeKit
Link to integration documentation on our website
https://www.home-assistant.io/integrations/homekit
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: