[homekit] "No response" error on all openHAB items

hi guys,

I have recently been facing this problem… I have OH 3.1.0 M2 with Homekit addon installed with about 50 accessories exposed via homekit.

I have faced the problem described below three times already:

Nothing helps, only removing the OH bridge from HomeKit and adding it back restores the normal functioning…

Not sure why the issue has been closed on github… it still happens, even on the latest OH

Has anyone been facing the same?

Thanks

1 Like

has adding/remove bridge solved the issue permanently or do you still get this issue after some time?

“No response” can be result of multiple things, bugs in the openHAB homekit binding, this bug with jmdns lib ([homekit] Binding stops working after a couple of days · Issue #9773 · openhab/openhab-addons · GitHub), issue with network connectivity, bugs in home app.

so, if you still experience this issue, please check with discovery app as described here (HomeKit Add-on - System Integrations | openHAB) whether openHAB is visible to the ios device

1 Like

Yes yes, iOS has access to OH. When all accessories are added it works for some time (i.e. 2-4 days) and then suddenly all accessories are unavailable… and only removing the bridge and adding again (with configuring all of them again of course in Home App) helps :frowning:

Thanks

when you get “no response” again, please check with discovery app whether you still see openhab there. if not then it is probably the same issue as reported here

it is an issue of an external library we use

I got the same problem since I update from 3.0.1 to 3.1.0M2.
After the upgrade HomeKit didn‘t work anymore. I re-added it again on my ipad sucessfully.
Everything was working, but for 2 hours only.
Now its not connecting anymore.
Restart didn‘t solve.

Edit: discovery app does find openhab.

have you upgraded only homekit binding or also the core?
do you see anything in the log file? any errors, exceptions? anything related to homekit?

I checked again this even and now the OpenHab entry in _hap._tcp disappeared.

I also enabled the debugging, but do not see any Homekit events.

Is there anything you want me to test, or shall I Clear the pairings, and restart the bundle again?

EDIT: I did some further testing

  1. cleared the pairings, restart bundle - no changes.
  2. removed OpenHAB bridge in Homekit Application - no changes
  3. delete docker container the OH3 is running and create a new - same problem.
  4. deleted the homekit.json file - same problem
  5. deleted the tmp and cache folder, deleted the Docker Container and created a new again.
    Now I can see the OpenHAB listed in _hab._tcp again :slight_smile:

_hap._tcp is not directly related to homekit items, but rather kind of DNS server that tells home app, that openhab offers homekit bridge.

if you dont see it, then it could be 2 kind of issues

  1. network issues. something block the mDNS traffic (it is multicast traffic which is sometime tricky)
  2. it is an issue with DNS implementation openHAB uses.

if it is the issue 2. then restart of openhab should help. restarting of the binding or adding/removing bridge will not solve it.

another option to verify what is the actual issue, is to execute command line tool “mdns-scan” directly in your docker container. it is command line tools that lists all mDNS entries. if you see _hap._tcp in container but not outside, then it is network issue.

Same for me. After updating to Milestone 2 the Homekit items get “no response” after a time (few hours).
Restart homekit in the Karaf helps for a few hours.
bundle:refresh org.openhab.io.homekit

1 Like

have you update the openhab to M2 or only the binding? just to narrow down the potential issues.

Updated Openhab.
Main reason was the “inverted” function for Homekit. Without it I would have stayed stable.

For me a workaround is an exec automation, which starts homekit every 3hours.

Thing exec:command:homekit  [command="openhab-cli console -p habopen bundle:refresh org.openhab.io.homekit", autorun=true]
1 Like

How can do it inside the Container?

root@WeWeNAS-3:/openhab# mdns-scan
bash: mdns-scan: command not found

Restarting OH did solve the problem the last time - even deleting the container didn’t solve the problem - I had to Clear the Pairings, delete the tmp/Cache folder outside the Container to make it work again - However this solved the problem for a few hours only :frowning:

This is the last entry before HomeKit was terminated last night.

2021-03-03 23:32:15.304 [TRACE] [server.impl.http.impl.LoggingHandler] - WRITE PooledUnsafeDirectByteBuf(ridx: 0, widx: 575, cap: 1024) [/192.168.5.134:50912]:

Thats the next entry in the logfile showing the sessions are terminated

2021-03-03 23:34:10.065 [TRACE] [rver.impl.http.impl.AccessoryHandler] - Terminated HomeKit connection from /192.168.5.115:49657
2021-03-03 23:34:10.367 [TRACE] [rver.impl.http.impl.AccessoryHandler] - Terminated HomeKit connection from /192.168.5.192:49477
2021-03-03 23:34:10.800 [TRACE] [rver.impl.http.impl.AccessoryHandler] - Terminated HomeKit connection from /192.168.5.183:50045
2021-03-03 23:34:11.966 [TRACE] [rver.impl.http.impl.AccessoryHandler] - Terminated HomeKit connection from /192.168.5.174:54734
2021-03-03 23:34:16.649 [TRACE] [rver.impl.http.impl.AccessoryHandler] - Terminated HomeKit connection from /192.168.5.139:59952
2021-03-03 23:34:18.396 [TRACE] [rver.impl.http.impl.AccessoryHandler] - Terminated HomeKit connection from /192.168.5.191:59081
2021-03-03 23:34:18.411 [TRACE] [rver.impl.http.impl.AccessoryHandler] - Terminated HomeKit connection from /192.168.5.135:57081
2021-03-03 23:34:57.083 [TRACE] [rver.impl.http.impl.AccessoryHandler] - Terminated HomeKit connection from /192.168.5.185:49417
2021-03-03 23:35:18.245 [DEBUG] [.server.impl.http.impl.BinaryHandler] - Exception in binary handler
java.io.IOException: Connection timed out
	at sun.nio.ch.FileDispatcherImpl.read0(Native Method) ~[?:?]
	at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39) ~[?:?]
	at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:276) ~[?:?]
	at sun.nio.ch.IOUtil.read(IOUtil.java:233) ~[?:?]
	at sun.nio.ch.IOUtil.read(IOUtil.java:223) ~[?:?]
	at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:358) ~[?:?]
	at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:247) ~[bundleFile:4.1.42.Final]
	at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1147) ~[bundleFile:4.1.42.Final]
	at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:347) ~[bundleFile:4.1.42.Final]
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:148) [bundleFile:4.1.42.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:700) [bundleFile:4.1.42.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:635) [bundleFile:4.1.42.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:552) [bundleFile:4.1.42.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:514) [bundleFile:4.1.42.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$6.run(SingleThreadEventExecutor.java:1044) [bundleFile:4.1.42.Final]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [bundleFile:4.1.42.Final]
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [bundleFile:4.1.42.Final]
	at java.lang.Thread.run(Thread.java:834) [?:?]
2021-03-03 23:35:18.246 [DEBUG] [rver.impl.http.impl.AccessoryHandler] - Exception caught in web handler
java.io.IOException: Connection timed out
	at sun.nio.ch.FileDispatcherImpl.read0(Native Method) ~[?:?]
	at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39) ~[?:?]
	at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:276) ~[?:?]
	at sun.nio.ch.IOUtil.read(IOUtil.java:233) ~[?:?]
	at sun.nio.ch.IOUtil.read(IOUtil.java:223) ~[?:?]
	at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:358) ~[?:?]
	at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:247) ~[bundleFile:4.1.42.Final]
	at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1147) ~[bundleFile:4.1.42.Final]
	at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:347) ~[bundleFile:4.1.42.Final]
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:148) ~[bundleFile:4.1.42.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:700) ~[bundleFile:4.1.42.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:635) ~[bundleFile:4.1.42.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:552) ~[bundleFile:4.1.42.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:514) ~[bundleFile:4.1.42.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$6.run(SingleThreadEventExecutor.java:1044) [bundleFile:4.1.42.Final]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [bundleFile:4.1.42.Final]
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [bundleFile:4.1.42.Final]
	at java.lang.Thread.run(Thread.java:834) [?:?]
2021-03-03 23:35:18.250 [TRACE] [rver.impl.http.impl.AccessoryHandler] - Terminated HomeKit connection from /192.168.5.134:50912
2021-03-03 23:36:03.301 [DEBUG] [.server.impl.http.impl.BinaryHandler] - Exception in binary handler
java.io.IOException: Connection timed out
	at sun.nio.ch.FileDispatcherImpl.read0(Native Method) ~[?:?]
	at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39) ~[?:?]
	at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:276) ~[?:?]
	at sun.nio.ch.IOUtil.read(IOUtil.java:233) ~[?:?]
	at sun.nio.ch.IOUtil.read(IOUtil.java:223) ~[?:?]
	at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:358) ~[?:?]
	at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:247) ~[bundleFile:4.1.42.Final]
	at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1147) ~[bundleFile:4.1.42.Final]
	at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:347) ~[bundleFile:4.1.42.Final]
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:148) [bundleFile:4.1.42.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:700) [bundleFile:4.1.42.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:635) [bundleFile:4.1.42.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:552) [bundleFile:4.1.42.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:514) [bundleFile:4.1.42.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$6.run(SingleThreadEventExecutor.java:1044) [bundleFile:4.1.42.Final]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [bundleFile:4.1.42.Final]
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [bundleFile:4.1.42.Final]
	at java.lang.Thread.run(Thread.java:834) [?:?]
2021-03-03 23:36:03.302 [DEBUG] [rver.impl.http.impl.AccessoryHandler] - Exception caught in web handler
java.io.IOException: Connection timed out
	at sun.nio.ch.FileDispatcherImpl.read0(Native Method) ~[?:?]
	at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39) ~[?:?]
	at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:276) ~[?:?]
	at sun.nio.ch.IOUtil.read(IOUtil.java:233) ~[?:?]
	at sun.nio.ch.IOUtil.read(IOUtil.java:223) ~[?:?]
	at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:358) ~[?:?]
	at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:247) ~[bundleFile:4.1.42.Final]
	at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1147) ~[bundleFile:4.1.42.Final]
	at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:347) ~[bundleFile:4.1.42.Final]
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:148) ~[bundleFile:4.1.42.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:700) ~[bundleFile:4.1.42.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:635) ~[bundleFile:4.1.42.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:552) ~[bundleFile:4.1.42.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:514) ~[bundleFile:4.1.42.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$6.run(SingleThreadEventExecutor.java:1044) [bundleFile:4.1.42.Final]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [bundleFile:4.1.42.Final]
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [bundleFile:4.1.42.Final]
	at java.lang.Thread.run(Thread.java:834) [?:?]
2021-03-03 23:36:03.304 [TRACE] [rver.impl.http.impl.AccessoryHandler] - Terminated HomeKit connection from /192.168.5.132:51580

Update: Bundle refresh this work this time as well for me - but not the last time.

bundle:refresh org.openhab.io.homekit

Update 2: It just happened again :frowning:

hm. from log files i cannot say much. especially surprising that you had to re-do pairing, this does not fit to my assumption that it is linked to mDNS issues. but i still think i can mDNS.

i have added namely recently following logic to the binding:

if openHAB and homekit are configured for the same IP address then homekit binding uses the mDNS server of openHAB instead of starting its own mDNS server. this should reduce memory usage and avoid 2 mDNS servers on the same machine. The library used by openHAB and homekit for mDNS is the same.

if you can have multiple IP address for the same docker, you could try to configure one IP for openHAB and another for homeKit binding. this would force homekit binding to start mDNS server as it did before recent changes.

if it is really the issue with that change, i think, i should make this feature configurable

I’m happy to support with further testings if this helps.
However I’m not 100% sure what exactly to setup in the docker container.

  • how can I run the mdns-scan?
  • what do I need to do exactly to use a different IP for Homekit to use a different mDNS server?

Can you tell me what I can do exactly?

I just had to restart the bundle again to get homekit running again.
I have to do it almost every hour :frowning:

Thanks a lot

Update: I had to restart the bundle again this morning and it solved the issue again.

When this happened the first time after Upgrade to OH3.1.0M2 this approach didn‘t work as mentioned before. It seems this was only the case until I deleted tmp/cache and cleared the pairings.
Maybe this was a result of the upgrade process?
Not sure this helps for your investigations.

which version you had before? OH3.0 or 2.5?

OH 3.0.1 stable

i am experiencing a similar issue on Snapshot 3.10. build 2232. I am not sure if this is related. After some time, very random, the connection gets lost. What works with me is to change in openHAB in the HomeKit integration settings the port from e.g. 9123 to 9124 and the items are immediately restored again in the IOS app.

I found maybe the problem - but not sure yet.
port 9124 was never opened in the Docker container to the outside network…
However this was never required in OH2.5 and OH 3.0 was working as well.
I just added this port and restarted the container, and HomeKit connected again automatically.
Maybe this was just be chance - will monitor further and keep you updated.

hmm, i am running in Docker as well ( in host mode ), for me both 9123 and 9124 work well but the issue comes with both ports. As discribed above, i change the port backwards and/or forwards and i suspect this triggers a re-connect and everything is working fine again until connection gets lost again. btw no entry in the log in my case.

Do you publish the ports?
Since I added the port to be published the HomeKit is stable for more than 1 hour.
Will keep monitoring it