-
-
Notifications
You must be signed in to change notification settings - Fork 28.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 problems with unresponsive device state updates #19021
Comments
Quick update: just tried to load HomeKit component as a custom_component from version 0.81.6 (copied all files to the custom component folder) and problem was still present. Thanks. |
I’m experiencing an issue with HomeKit automations triggered by HA sensors, I wonder if it’s the same or a similar issue. To clarify: HomeKit automations are not triggered anymore by a contact sensor. |
Hello @nikolaykasyanov , yes I believe it is related since no state change updates are pushed to the iOS device. I have to manually close and open the app so it reconnects to the server and request for all devices states, then it shows the correct state. I think this could affect automations that are running on the Home App system. |
Another update: just changed my config settings to a new port and added ip_address, let's see if it helps: auto_start: False
port: 5200
ip_address: 192.168.1.12
filter:
exclude_domains:
- automation
- input_boolean
- remote
- script
- binary_sensor
- device_tracker
- fan
- media_player
- sensor
- alarm_control_panel
- climate
- cover
- light
- lock
- switch
include_entities:
- input_boolean.boa_noite
- input_boolean.bom_dia
- input_boolean.chegar_casa
- input_boolean.visita_casa
- input_boolean.entrar_muvrh
- input_boolean.sair_muvrh
- input_boolean.muvrh_desligar_tudo
- input_boolean.cafe_manha
- input_boolean.chaleira_manha
- device_tracker.antonio
- device_tracker.roberta |
@tatunts interesting, rolling back to 0.82.0 fixed my issue. |
Sorry, closed by mistake. |
Mine was working great on version 81.6 but really don't want to go back since there are breaking changes I made, new Asus WRT component and fast loading lovelace UI, comparing to previous version. |
Not sure if this is related, I get those errors on log:
|
So no, changing port and setting IP address did not solve the problem. Again no state change are replicated to the home app. This problem started about the same time I've got this error on my log:
Maybe related? Thanks. |
And yes, the problem started just after those errors:
Maybe the problem is not HAP-python @cdce8p , do you agree? Many Thanks! |
I think I have the same problem: no HomeKit push notifications but when I open the Home app it all shows correct there. Issue is solved when I restart HA but returns some hours later. I also have these handshake errors in my log but not sure if it is related. |
Yes, I believe that is the same problem. No data is pushed to the iOS device so it cannot send you notifications in real time. If you open the app again, it will connect to HA instance and update states. |
For info, I still have the issue but no longer the SSL errors. Those I think I fixed by tinkering a bit with httpd zs shown below (adding trusted_proxies etc.). So don't assume it's related. http:
...
use_x_forwarded_for: true
cors_allowed_origins:
- https://google.com
- https://www.home-assistant.io
trusted_proxies:
- 127.0.0.1
trusted_networks:
- 127.0.0.1
- 192.168.0.0/24
'''
|
@tatunts I haven't seen the issue before. I don't think that these are related to HAP-python, because it still uses sync networking and not uvloop for it (although not being fully async might be the root of the problems). As for the notification issue, I was wondering if part of the issue is some kind of energy saving measure from iOS to limit communications with accessories. Do you guys have either:
|
Thanks for your reply @cdce8p.
I do have an iPad mounted on the wall set as |
Apple TV as a hub here. As the issue is temporarily solved after restarting HA, I would expect for the issue to remain if it would be on iOS side though. Yesterday I restarted HA in the morning and a few hours later notifications were still working. Few hours later when I got home it was broken. |
Hello @WhiteDogBe. I believe most of the times that this problem happens is when I go out and return home, just like you said. Sometimes it works for ours when I am home and sometimes it does not, very strange. Maybe the problem is related after all to the HAP-python code. The creator of the code used here is already trying to debug this problem: ikalchev/HAP-python#176 What incredible people here... I really appreciate all effort and time spend here to help us mortals. Thanks a lot! |
Thanks for the feedback. |
I too use an Apple TV 4K as a hub . The no response occurs regardless of whether I am on WiFi connection or away from house on cell connection. No response has been occurring since version .74 or so. Please also note that the current version does fix the close wait problem for me and keeps me from having to reboot due to excess close wait tcp links. Regards |
Hi, @tatunts , thanks for raising this issue. I first thought it was my setup, and tried almost everything to try and resolve this to no avail. |
I've checked the logs, and noticed that when the devices stop pushing state updates to the Home App, the following: |
Hello @wasp100! Please try this fix here: ikalchev/HAP-python#176 It worked for me, everything works beautifully for almost a day now. |
@wasp100 , what is your home assistant configuration? hassbian, hassos/hassio, or installed on what OS ? |
@jr3us , I'm on 0.83.3 Hassbian on Raspberry Pi Zero W I'm not experiencing the "No Response" but rather no state updates. If I leave the Home App open and change a switch in Home Assistant, normally, the home app would update immediately. Unfortunately, it doesn't refresh the state... If I reboot, it works for a while, then dies again :( |
HI @tatunts, are you referring to this:? For Hassbian it should be in /srv/homeassistant/lib/python3.x/site-packages/pyhap. In the pyhap folder, you need to replace the hap_server.py file with this one: hap_server.py. Remember to restart Home Assistant afterwards. I navigated to the folder location and there was no hap_server.py to replace. Anyways, downloaded the "new" hap_server.py file and trying it out. |
@tatunts why would I not have the hap_server.py in my config? That's strange... |
@wasp100 : Making sure; you changed directory, you changed to python3.5 instead of python3.x right? /srv/homeassistant/lib/python3.5/site-packages/pyhap |
@jr3us : Ps. I also have all the devices (hub and iPhone) set to static IPs. Don't know whether that helps as well. |
Hello @wasp100 ! That is exactly my problem. It was fixed by replacing that file. I hope it works for you! Good luck! |
the latest is a little newer. the rpi-update program only updates the linux kernel and raspberry pi firmware. If it is working for you don't do the rpi-update until we find out from the home assistant people if that could be the cause of what I am having a problem with. @cdce8p : Would the kernel/firmware updates be causing the problems I am having? based on what @wasp100 is indicating, he and I are running the same thing, except I have done the kernel/firmware updates. The only other difference between our setups is I am using a raspberry pi 3b (not a 3b+) and he is running on a Pi zero w. on the pi3, After the initial boot and hass has stabilized to normal operation, I have never seen load over .5 I may try rebuilding my setup to see if it is fixed by the rebuild once I hear back regarding the above information. Regards |
@jr3us To be honest, I don't have any clue. This seems to one of the most difficult bugs I've encountered so far, just because it's so difficult to debug. |
I'm going to try a different pi with the same sd card, and if that doesn't help, then I will try rebuilding what i have from a fresh hassbian image. I'll report back tomorrow. Thanks for the assistance you have been providing! |
@jr3us : I've updated the kernel/firmware using rpi-update about an hour ago to test whether this would affect my setup. The good news is that the "fix" is still working well... all notifications coming through. @cdce8p : Thanks for your help once again! @tatunts : Replacing the file is working well so far (even with updating the firmware)! Thanks! |
I have the same issue. After a few mins I dont get the notifications just when I open the Home app. I'm using HA on windows. I have replaced the hap_server.py but it does not help. |
Hey guys, any updates on this? Thanks for the great work!! |
Same issue over several updates now. Was hoping it was a bug somewhere that would work itself out. I think I noticed issues starting to arise a little while after there was a retraction of some update that happened. |
Hi all, same issue here. Is anyone using a late version of HA without this issue? |
I have to restore back to 0.82.1 inorder to get state updates. The 0.84.3 also got problems |
Doing the same here , installed SSH add on and downgraded to 0.82..1 using
|
Hello @leonlmf and @monxhy, have you guys tried to change the |
Thanks @tatunts. I’ve seen others trying that file and noticed only those on rPis using Hassio or raspbian seemed to work. For example, someone above using windows said it didn’t work and I vaguely remember the file fixing something specific to rPis? Could be totally wrong.. I’m using HA on docker on my NAS - do you think making this change work on docker? I guess I should just try and see. Not keen on downgrading either for same reasons as someone above - breaking changes.. |
@tatunts Hi I cant find this hap_server.py. I am using hassio. |
I have the same problem, would love to try the new version but am using HASSOS and HASSIO, can't find the file in any of the paths that were mentioned. Assuming they are inside a Docker and not easily accessible? |
Hello! @lockyt: yes, I really believe you should try it, this may solve your problem, just like mine. @leonlmf and @WhiteDogBe: please read carefully the next few posts from the link above. You will see that I was not able to find it to but with help from the devs I did it! You can follow the steps just like me. Good luck! |
For those who are trying to find hap_server.py - mine was in /usr/local/lib/python3.6/site-packages/pyhap/hap_server.py on docker. Just trying the change now. |
... and I can confirm that the new file worked for me. Been about 12 hours now and still updating. @tatunts - Thanks! You were right. and of course, thanks awesome HA community! |
I recognized the same problem since some versions ago... but I will wait for the final productive solution in a future HA version 😊 BTW I am using a Homepod as hub with 2 iPads, one mounted on the wall. |
I did replace the hap_server.py per instructions posted above, but my contact sensor updates (Deconz/Aqara) are still not working properly on Home App. Motion sensors (Deconz/Aqara) does update normally, and everything works as expected in Hassio. Contact sensors are the only device I noticed issues so far. All present the same unresponsive behaviour across my house. |
Nothing to do for me... also rollback to 0.82.1 doesn’t solve the issue :( The only modification to the system (Hassbian) was adding a VLAN where there are all IoT sensors (like Xiaomi). But I’ve also tried to remove the VLAN an no success. Any hints? Homebridge on the same Pi works without problems |
Running Hassio on RPi3 and accessing via macOS Any application that can get more access to it or do I have to ssh into it via the developer side with the 22222 port unlike the ssh addon that uses 22. |
You need to paste the configuration, save it and then start the add-on. You should see it on samba share. |
Paste what configuration? My samba works to access config folder, backups, etc |
Thanks @tatunts for linking to the fix - I was having this issue after moving from homebridge to native HA HomeKit support (& updating from 0.5x). Replacing hap_server.py worked. Running 0.84.6 |
Hello devs! This problem was solved with the release of version 2.4.2. https://github.com/ikalchev/HAP-python/releases/tag/v2.4.2 Hope this gets included on release 85 :) #19776 Thanks! |
Hey @tatunts - have you tried 0.85.0 yet? It includes hap python 2.4.2 but my HomeKit immediately starting having update issues again. Am going to try reinstate the updated hap_server.py again but I was just curious whether you or others are getting the same after 0.85.0? Thanks. |
hmmm perhaps it is fixed. Just checked my version after upgrading and it still says 0.84.6 so it looks like my HA failed to update. Let me get back to you... |
Home Assistant release with the issue:
0.83.x
Last working Home Assistant release (if known):
0.81.6
Operating environment (Hass.io/Docker/Windows/etc.):
Hassio
Component/platform:
https://www.home-assistant.io/components/homekit/
Description of problem:
After updating from version 81.6 to 83, when HA is running for a couple of hours (sometime minutes), all state changes from the HA UI or other device using the Home App, does not update the device change in real time to other iOS devices. For example: I have an iPad Mini fixed on the wall, If I turn of a light on my computer, this entity state does not mirror the change on the iPad Home app. I have to close the app, reconnect to the server then the state will change.
Related issue: https://github.com/home-assistant/home-assistant/issues/15675
Problem-relevant
configuration.yaml
entries and (fill out even if it seems unimportant):Traceback (if applicable):
Additional information:
I believe this problem is related to the HAP-python code that was updated to version 2.4.1 on v83, issue addressed here: https://github.com/ikalchev/HAP-python/issues/176
No errors are show on log, very strange, it is like the connection from the server gets dropped.
The text was updated successfully, but these errors were encountered: