openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.88k stars 3.59k forks source link

[homekit] out of a sudden "no response" #15348

Closed Stefan300381 closed 2 months ago

Stefan300381 commented 1 year ago

Hi,

Using latest OH 4.0 Milestone inside docker with homekit integration enabled. I'm facing unexpected "no response" messages inside Apple Home app, as described in this community thread: https://community.openhab.org/t/homekit-no-response-error-on-all-openhab-items/118200/202

The container is configured to use the host network (which support ipv4 and ipv6).

Unfortunately I don't know what triggers this behavior and I haven't found a way to reproduce the issue. I just know how to fix it temporarily:

It helps to open OH main UI and edit the homekit integration settings, turning mDNS on or off. This means, whenever it's ON and I turn it OFF, homekit items can be controlled again. Same if the setting was turned off and I turn it on.

Is this a known issue? Anything I can do/provide in order to troubleshoot the issue?

best regards

Stefan

lsiepel commented 1 year ago

Have it once in a while. After some time it is back to normal. Also never found the cause. It used to be much more unstable with earlier versions.

you might consider logging debug level to separate file. And as soon as you encounter the issue, make a copy and analyse it. Not sure if it helps, maybe worth the try?

yfre commented 1 year ago

this issue is typically linked to fast changes on network interface. e.g. network interface get disconnected/down and connected/up again within seconds. on disconnect event, openHAB homekit addon stops advertising itself and as result, home app cannot find it anymore. normally, homekit addon would re-start advertising itself once the network interface is up again, but if it happens too quickly it might miss it. switching mDNS on/off forces addon to advertise itself

some more technical details are provided here https://community.openhab.org/t/homekit-stops-working-after-some-hours-openhab-3-4-0/142502/43

ideally, you should try to fix the root cause, i.e. network disconnection, but im not sure how to troubleshoot and fix it on docker.

lsiepel commented 1 year ago

In my case openHAB is hosted on a dedicated intel nuc, connected by Ethernet cable. The network connection is rock solid. I would be very surprised if this is the cause for the problem I experience once in a while.

Stefan300381 commented 1 year ago

do we have in common, that we run openHAB inside a Docker container?

lsiepel commented 1 year ago

do we have in common, that we run openHAB inside a Docker container?

No, mine is not in some sort of container

yfre commented 1 year ago

it is not like physical network connection gets distributed but more kind of dhcp lease / ip / mac address update causing for a short network interface restart. this what i have observed on my side. maybe it is something else in your case. i would suggest to enable more logging and also check linux/os system logs.. but if it is not reproducible it can create a lot of log before it happens again

lsiepel commented 1 year ago

Will do, thanks

lsiepel commented 2 months ago

Never had these transient problems again. Will close this for now.