Homekit pairing showing on reboot but disappears

I’m having trouble pairing Homekit to an iPhone (11 latest ios) and iPad (2018 latest ios). The Homekit bridge will show up in the app when restarting Homeassistant but won’t connect with the passcode. If I reopen Home on the device the Homekit Bridge is no longer there, there are other homekit devices showing.

I do have the homeassistant server on a different vlan but was getting the same issue when connecting my device to the same vlan as the server.

My current homekit config is:

logger:
  default: warning
  logs:
    homeassistant.components.homekit: debug
    pyhap: debug

homekit:
  filter:
    include_entities:
      - demo.demo

but I’ve tried other iterations.

The logs when I don’t try to connect are:

2019-12-30 18:19:43 DEBUG (MainThread) [homeassistant.components.homekit] Begin setup HomeKit
2019-12-30 18:19:44 DEBUG (SyncWorker_4) [pyhap.characteristic] set_value: Name to Home Assistant Bridge
2019-12-30 18:19:44 DEBUG (SyncWorker_4) [pyhap.characteristic] set_value: SerialNumber to default
2019-12-30 18:19:44 DEBUG (SyncWorker_4) [pyhap.characteristic] set_value: FirmwareRevision to 0.103.5
2019-12-30 18:19:44 DEBUG (SyncWorker_4) [pyhap.characteristic] set_value: Manufacturer to Home Assistant
2019-12-30 18:19:44 DEBUG (SyncWorker_4) [pyhap.characteristic] set_value: Model to Bridge
2019-12-30 18:19:44 DEBUG (SyncWorker_4) [pyhap.characteristic] set_value: SerialNumber to homekit.bridge
2019-12-30 18:19:46 INFO (SyncWorker_19) [pyhap.accessory_driver] Loading Accessory state from `/config/.homekit.state`
2019-12-30 18:19:46 INFO (SyncWorker_19) [homeassistant.components.homekit.util] Pincode: 211-64-795
2019-12-30 18:19:46 DEBUG (SyncWorker_19) [homeassistant.components.homekit] Driver start
2019-12-30 18:19:46 INFO (SyncWorker_3) [pyhap.accessory_driver] Starting the event loop
2019-12-30 18:19:46 DEBUG (SyncWorker_3) [pyhap.accessory_driver] Not setting a child watcher. Set one if subprocesses will be started outside the main thread.
2019-12-30 18:19:46 INFO (SyncWorker_0) [pyhap.accessory_driver] Starting accessory Home Assistant Bridge on address 10.0.10.100, port 51827.
2019-12-30 18:19:46 DEBUG (SyncWorker_0) [pyhap.accessory_driver] Starting event thread.
2019-12-30 18:19:46 DEBUG (SyncWorker_0) [pyhap.accessory_driver] Starting server.
2019-12-30 18:19:46 DEBUG (SyncWorker_0) [pyhap.accessory_driver] Starting mDNS.
2019-12-30 18:19:46 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] Discovered device Home Assistant Bridge (Home Assistant Bridge - FD:58:E8:DB:6A:FB)
2019-12-30 18:19:47 DEBUG (SyncWorker_0) [pyhap.accessory_driver] Starting accessory.
2019-12-30 18:19:47 DEBUG (SyncWorker_0) [pyhap.accessory_driver] AccessoryDriver started successfully

When I do try to connect with an ios device I get (Where 10.0.0.144 is my ios device):

2019-12-30 18:48:19 DEBUG (MainThread) [homeassistant.components.homekit] Begin setup HomeKit
2019-12-30 18:48:20 DEBUG (SyncWorker_12) [pyhap.characteristic] set_value: Name to Home Assistant Bridge
2019-12-30 18:48:20 DEBUG (SyncWorker_12) [pyhap.characteristic] set_value: SerialNumber to default
2019-12-30 18:48:20 DEBUG (SyncWorker_12) [pyhap.characteristic] set_value: FirmwareRevision to 0.103.5
2019-12-30 18:48:20 DEBUG (SyncWorker_12) [pyhap.characteristic] set_value: Manufacturer to Home Assistant
2019-12-30 18:48:20 DEBUG (SyncWorker_12) [pyhap.characteristic] set_value: Model to Bridge
2019-12-30 18:48:20 DEBUG (SyncWorker_12) [pyhap.characteristic] set_value: SerialNumber to homekit.bridge
2019-12-30 18:48:21 INFO (SyncWorker_19) [pyhap.accessory_driver] Loading Accessory state from `/config/.homekit.state`
2019-12-30 18:48:21 INFO (SyncWorker_19) [homeassistant.components.homekit.util] Pincode: 365-47-568
2019-12-30 18:48:21 DEBUG (SyncWorker_19) [homeassistant.components.homekit] Driver start
2019-12-30 18:48:21 INFO (SyncWorker_15) [pyhap.accessory_driver] Starting the event loop
2019-12-30 18:48:21 DEBUG (SyncWorker_15) [pyhap.accessory_driver] Not setting a child watcher. Set one if subprocesses will be started outside the main thread.
2019-12-30 18:48:21 INFO (SyncWorker_0) [pyhap.accessory_driver] Starting accessory Home Assistant Bridge on address 10.0.10.100, port 51827.
2019-12-30 18:48:21 DEBUG (SyncWorker_0) [pyhap.accessory_driver] Starting event thread.
2019-12-30 18:48:21 DEBUG (SyncWorker_0) [pyhap.accessory_driver] Starting server.
2019-12-30 18:48:21 DEBUG (SyncWorker_0) [pyhap.accessory_driver] Starting mDNS.
2019-12-30 18:48:22 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] Discovered device Home Assistant Bridge (Home Assistant Bridge - FD:58:E8:DB:6A:FB)
2019-12-30 18:48:22 DEBUG (SyncWorker_0) [pyhap.accessory_driver] Starting accessory.
2019-12-30 18:48:22 DEBUG (SyncWorker_0) [pyhap.accessory_driver] AccessoryDriver started successfully
2019-12-30 18:48:25 INFO (Thread-4) [pyhap.hap_server] Got connection with ('10.0.0.144', 52857).
2019-12-30 18:48:25 DEBUG (Thread-5) [pyhap.hap_server] Request POST from address '('10.0.0.144', 52857)' for path '/pair-setup'.
2019-12-30 18:48:25 DEBUG (Thread-5) [pyhap.hap_server] Pairing [1/5]
2019-12-30 18:48:25 INFO (Thread-5) [pyhap.hap_server] 10.0.0.144 - "POST /pair-setup HTTP/1.1" 200 -
2019-12-30 18:48:30 DEBUG (Thread-5) [pyhap.hap_server] Cleaning connection to ('10.0.0.144', 52857)

Another thing to note, I notice a similar thing when running mdns-scan from a computer. The Home Assistant Bridge doesn’t show up until a restart and then shows up as “Home Assistant Bridge._hap._tcp.local” and “Home._home-assistant._tcp.local”

I forgot to add, I am running HASSOS (HassOS 3.7) in a VM with the latest version of HA installed (Home Assistant 0.103.5)

@mehuman same happens to me. did you figure this out?
HomeKit shows up fine and configures if I run Home Assistant on my mac but this happens to me when running HassOS on my RPI3.

thanks

I haven’t found a solution yet but I’m glad it’s not just me. Was waiting a couple of days before filing a bug report. I think filing it with HassOS would be the place to start, since you see the same issue but have it working on a Mac. I’ll link to the issue when I file it.

What router you using? mesh network?

It’s all Unifi equipment

I’m using an Huawei Q2 Pro mesh router. Tried with my ISP router and all works so I guess it’s more a network issue than an HassOS issue. I alão noticed that when my rpi hassio is connect to the Huawei router I can’t access it on hassio.local:8123 but connected to my ISP router I can. Dont know much about this but I think its an MDNS problem.

Is your hassio connected to the main router or to One ou the unifi AP’s?

It connected to a switch connected to the router. My install is on it’s own vlan but I’ve also also connected my ios devices to the vlan I have HassOS on and get the same issue. I have a light bulb that has Homekit on a 3rd vlan and that is showing up just fine in the Home app.

Got it working? If not try disabling IGMP snooping if you have that options available.

1 Like

Thanks for this tip! I was struggling to understand why my HomeKit had stopped working properly recently. Only after searching around and seeing your post did I put the fact together that it started happening after I recently replaced the switch my kit is connected to.

Low and behold, there was a IGMP snooping setting there which was enabled. So far after disabling it’s not dropped. Interesting how other forums / post recommend to have this Enabled for HomeKit.