Homekit stopped advertising OpenHAB 3.1

Hi, I have been working with Homekit for the past couple of weeks and I am having reliability issues. My system is OpenHAB 3.1 on Ubuntu 18.04 which is hardwired. My Homekit hubs are an iPad and Homepod.

Things started out good, but went downhill. On my iPhone, a couple of Meross smart plugs and Ecobee work fine. The openHAB hub and accessories started not responding. After doing a lot of troubleshooting, Using the Discovery app on my iPhone and mac, I found that my openHAB server stopped advertising it’s homekit services after a minute or so.

Things that I have tried are deleting the bridge on my phone, clearing pairing, uninstalling homekit, deleting homekit json file and backups, reinstalling homekit, rebooting, clearing the cache, rinse and repeat but not in that order. No luck, still and issue with advertising in mDNS. It may stay up long enough to add the bridge to my phone, but doesn’t stay.

I brought up a test server with 3.1, installed homekit and called the bridge “openhab2”. Added it to my phone with a couple of accessories and it seems to work, although I need to restart since yesterday to get it going again.

Just a snippet from my logs.

2021-09-13 14:56:30.441 [TRACE] [rver.impl.http.impl.AccessoryHandler] - Terminated HomeKit connection from /
2021-09-13 14:56:33.034 [TRACE] [rver.impl.http.impl.AccessoryHandler] - Terminated HomeKit connection from /
2021-09-13 15:09:26.629 [TRACE] [impl.connections.SubscriptionManager] - Publishing change for 858216806

I am out of ideas.

Hi Chris,

have you try to run with “Use OpenHAB Service” switched off in the homekit binding settings (available via mainUI) ?
changing of this settings leads to re-publishing of Homekit in mDNS. there are 2 mDNS registries - one from openHAB core and another one from homekit binding. the switch defines which one to use for homekit advertistment

another check - openHAB advertise itself as well, see whether you see it in discovery app. if not, then it is probably more a network issue.

Hi Eugen,

Thank for responding. It looks at this point it is my Homepod. After resetting the homepod I could get homekit working again. Setting the homepod up would take homekit down. After a couple of attempts, I have unplugged the homepod. Since it is new, I will take that up with Apple

Thanks again for your help for me and the community.


Hi Chris,

not sure how it is with homepod but on apple tv and ipad i can set in the setting whether they should act as homekit bridge, i.e. make homekit accessible when your iphone is not connected to home wifi.
bridge as such is a good things and should work with openhab. but i had issue with having 2 bridges at home (ipad and apple tv). after if have switched off homekit on ipad, everything started to work again.

check here for homekit bridge

Apple replaced my homepod, so starting again. Homekit had been working on my production system until I configured the new homepod. Then openhab stopped advertising it homekit services. I am using Discover and looking at _hap._tcp.

Stating again, I removed the openhab bridge from my phone. Disabled hub mode on my iPad. On openhab, uninstalled homekit, deleted the homekit.json file and backup files, stopped openhab, cleaned the cache and rebooted.

Now homekit is reinstalled and advertising it’s services. After a minute or so, services no longer show up. Toggling useOHmDNS, it services advertise again for a minute or so and then drop.

root@otis:~# tail -f /var/log/openhab/openhab.log
2021-09-18 11:05:54.897 [TRACE] [thub.hapjava.server.impl.HomekitRoot] - Added accessory java.util.concurrent.CompletableFuture@129d8c3a[Completed normally]
2021-09-18 11:05:54.898 [TRACE] [thub.hapjava.server.impl.HomekitRoot] - Added accessory java.util.concurrent.CompletableFuture@a45254c[Completed normally]
2021-09-18 11:05:54.899 [TRACE] [thub.hapjava.server.impl.HomekitRoot] - Added accessory java.util.concurrent.CompletableFuture@1a3d70d5[Completed normally]
2021-09-18 11:05:54.899 [TRACE] [thub.hapjava.server.impl.HomekitRoot] - Added accessory java.util.concurrent.CompletableFuture@2dd283ee[Completed normally]
2021-09-18 11:05:54.900 [TRACE] [thub.hapjava.server.impl.HomekitRoot] - Added accessory java.util.concurrent.CompletableFuture@53502632[Completed normally]
2021-09-18 11:05:54.901 [TRACE] [thub.hapjava.server.impl.HomekitRoot] - Added accessory java.util.concurrent.CompletableFuture@701c0651[Completed normally]
2021-09-18 11:05:54.914 [TRACE] [pl.http.impl.NettyHomekitHttpService] - Bound homekit listener to /
2021-09-18 11:05:54.916 [TRACE] [er.impl.jmdns.JmdnsHomekitAdvertiser] - Advertising accessory openHAB
2021-09-18 11:05:54.917 [INFO ] [er.impl.jmdns.JmdnsHomekitAdvertiser] - Registering _hap._tcp.local. on port 9124
2021-09-18 11:05:54.917 [TRACE] [er.impl.jmdns.JmdnsHomekitAdvertiser] - MAC:86:bf:9:2d:76:3a Setup Id:D58L
2021-09-18 11:09:46.189 [TRACE] [thub.hapjava.server.impl.HomekitRoot] - Removed accessory java.util.concurrent.CompletableFuture@4d4f75b9[Completed normally]
2021-09-18 11:09:46.194 [TRACE] [pl.http.impl.NettyHomekitHttpService] - Resetting connections
2021-09-18 11:09:46.195 [TRACE] [thub.hapjava.server.impl.HomekitRoot] - Removed accessory java.util.concurrent.CompletableFuture@3eecb4cc[Completed normally]
2021-09-18 11:09:46.209 [TRACE] [pl.http.impl.NettyHomekitHttpService] - Resetting connections
2021-09-18 11:09:46.210 [TRACE] [thub.hapjava.server.impl.HomekitRoot] - Removed accessory java.util.concurrent.CompletableFuture@71c10aea[Completed normally]
2021-09-18 11:09:46.212 [TRACE] [pl.http.impl.NettyHomekitHttpService] - Resetting connections
2021-09-18 11:09:46.213 [TRACE] [thub.hapjava.server.impl.HomekitRoot] - Removed accessory java.util.concurrent.CompletableFuture@310641e5[Completed normally]
2021-09-18 11:09:46.215 [TRACE] [pl.http.impl.NettyHomekitHttpService] - Resetting connections
2021-09-18 11:09:46.216 [TRACE] [thub.hapjava.server.impl.HomekitRoot] - Removed accessory java.util.concurrent.CompletableFuture@7d218c1[Completed normally]
2021-09-18 11:09:46.218 [TRACE] [pl.http.impl.NettyHomekitHttpService] - Resetting connections
2021-09-18 11:09:46.219 [TRACE] [thub.hapjava.server.impl.HomekitRoot] - Removed accessory java.util.concurrent.CompletableFuture@5cc38623[Completed normally]
2021-09-18 11:09:46.220 [TRACE] [pl.http.impl.NettyHomekitHttpService] - Resetting connections
2021-09-18 11:09:48.232 [TRACE] [impl.connections.SubscriptionManager] - Removing 0 reverse connections from subscription manager
2021-09-18 11:09:48.233 [TRACE] [impl.connections.SubscriptionManager] - Subscription sizes are 0 and 0
2021-09-18 11:09:48.244 [TRACE] [thub.hapjava.server.impl.HomekitRoot] - Added accessory java.util.concurrent.CompletableFuture@26a63532[Completed normally]
2021-09-18 11:09:48.244 [TRACE] [thub.hapjava.server.impl.HomekitRoot] - Added accessory java.util.concurrent.CompletableFuture@31252537[Completed normally]
2021-09-18 11:09:48.245 [TRACE] [thub.hapjava.server.impl.HomekitRoot] - Added accessory java.util.concurrent.CompletableFuture@71974fae[Completed normally]
2021-09-18 11:09:48.245 [TRACE] [thub.hapjava.server.impl.HomekitRoot] - Added accessory java.util.concurrent.CompletableFuture@36f4fc8e[Completed normally]
2021-09-18 11:09:48.246 [TRACE] [thub.hapjava.server.impl.HomekitRoot] - Added accessory java.util.concurrent.CompletableFuture@216c40c7[Completed normally]
2021-09-18 11:09:48.246 [TRACE] [thub.hapjava.server.impl.HomekitRoot] - Added accessory java.util.concurrent.CompletableFuture@3978d540[Completed normally]
2021-09-18 11:09:48.247 [TRACE] [thub.hapjava.server.impl.HomekitRoot] - Added accessory java.util.concurrent.CompletableFuture@725907fe[Completed normally]
2021-09-18 11:09:48.261 [TRACE] [pl.http.impl.NettyHomekitHttpService] - Bound homekit listener to /
2021-09-18 11:09:48.263 [TRACE] [er.impl.jmdns.JmdnsHomekitAdvertiser] - Advertising accessory openHAB
2021-09-18 11:09:48.264 [INFO ] [er.impl.jmdns.JmdnsHomekitAdvertiser] - Registering _hap._tcp.local. on port 9124
2021-09-18 11:09:48.265 [TRACE] [er.impl.jmdns.JmdnsHomekitAdvertiser] - MAC:86:bf:9:2d:76:3a Setup Id:D58L
2021-09-18 11:11:42.529 [TRACE] [thub.hapjava.server.impl.HomekitRoot] - Removed accessory java.util.concurrent.CompletableFuture@62ee415c[Completed normally]
2021-09-18 11:11:42.533 [TRACE] [pl.http.impl.NettyHomekitHttpService] - Resetting connections
2021-09-18 11:11:42.534 [TRACE] [thub.hapjava.server.impl.HomekitRoot] - Removed accessory java.util.concurrent.CompletableFuture@103dbea3[Completed normally]
2021-09-18 11:11:42.536 [TRACE] [pl.http.impl.NettyHomekitHttpService] - Resetting connections
2021-09-18 11:11:42.537 [TRACE] [thub.hapjava.server.impl.HomekitRoot] - Removed accessory java.util.concurrent.CompletableFuture@2115fca6[Completed normally]
2021-09-18 11:11:42.546 [TRACE] [pl.http.impl.NettyHomekitHttpService] - Resetting connections
2021-09-18 11:11:42.547 [TRACE] [thub.hapjava.server.impl.HomekitRoot] - Removed accessory java.util.concurrent.CompletableFuture@184507a2[Completed normally]
2021-09-18 11:11:42.549 [TRACE] [pl.http.impl.NettyHomekitHttpService] - Resetting connections
2021-09-18 11:11:42.550 [TRACE] [thub.hapjava.server.impl.HomekitRoot] - Removed accessory java.util.concurrent.CompletableFuture@8b15157[Completed normally]
2021-09-18 11:11:42.551 [TRACE] [pl.http.impl.NettyHomekitHttpService] - Resetting connections
2021-09-18 11:11:42.552 [TRACE] [thub.hapjava.server.impl.HomekitRoot] - Removed accessory java.util.concurrent.CompletableFuture@75042e44[Completed normally]
2021-09-18 11:11:42.554 [TRACE] [pl.http.impl.NettyHomekitHttpService] - Resetting connections
2021-09-18 11:11:44.564 [TRACE] [impl.connections.SubscriptionManager] - Removing 0 reverse connections from subscription manager
2021-09-18 11:11:44.566 [TRACE] [impl.connections.SubscriptionManager] - Subscription sizes are 0 and 0
2021-09-18 11:11:44.569 [TRACE] [thub.hapjava.server.impl.HomekitRoot] - Added accessory java.util.concurrent.CompletableFuture@7bfa0c8e[Completed normally]
2021-09-18 11:11:44.570 [TRACE] [thub.hapjava.server.impl.HomekitRoot] - Added accessory java.util.concurrent.CompletableFuture@4b327c44[Completed normally]
2021-09-18 11:11:44.570 [TRACE] [thub.hapjava.server.impl.HomekitRoot] - Added accessory java.util.concurrent.CompletableFuture@490ba79c[Completed normally]
2021-09-18 11:11:44.571 [TRACE] [thub.hapjava.server.impl.HomekitRoot] - Added accessory java.util.concurrent.CompletableFuture@1da9d6f7[Completed normally]
2021-09-18 11:11:44.571 [TRACE] [thub.hapjava.server.impl.HomekitRoot] - Added accessory java.util.concurrent.CompletableFuture@361c27b0[Completed normally]
2021-09-18 11:11:44.572 [TRACE] [thub.hapjava.server.impl.HomekitRoot] - Added accessory java.util.concurrent.CompletableFuture@6e14bd6b[Completed normally]
2021-09-18 11:11:44.572 [TRACE] [thub.hapjava.server.impl.HomekitRoot] - Added accessory java.util.concurrent.CompletableFuture@7a37c072[Completed normally]
2021-09-18 11:11:44.584 [TRACE] [pl.http.impl.NettyHomekitHttpService] - Bound homekit listener to /
2021-09-18 11:11:44.586 [TRACE] [er.impl.jmdns.JmdnsHomekitAdvertiser] - Advertising accessory openHAB
2021-09-18 11:11:44.587 [INFO ] [er.impl.jmdns.JmdnsHomekitAdvertiser] - Registering _hap._tcp.local. on port 9124
2021-09-18 11:11:44.587 [TRACE] [er.impl.jmdns.JmdnsHomekitAdvertiser] - MAC:86:bf:9:2d:76:3a Setup Id:D58L

Meanwhile, my test server running homekit has stayed up for days. It makes me think that something is stuck in my productions original configuration of homekit that I have not cleared, but I don’t know what, or what else to try.


I think I have this working, finally. Doing a netstat -a on my test server shows connections on tcp6 on port 9123, while the production server is on tcp on port 9124. Earlier on, I disabled ipv6 on my production server thinking that was an issue. Re-enabling ipv6 has my production server running. Hopefully it stays that way.


1 Like