"Accessory not found" error with Homekit

Tags: #<Tag:0x00007fc4014c4ad8>

Hello,

I’ve been struggling to try and figure out what is happening with the Homekit integration on my Home Assistant Supervised install. I have Home Assistant Supervised running as docker containers on a Linux machine, and in order to debug the Homekit issue, I have the following minimum configuration added to my configuration.yml:

homekit:
  - name: HASS
    ip_address: 192.168.104.125
    filter:
        include_domains:
            - demo

I have used the ip_address option as my server has multiple interfaces, and I wanted to ensure that the Homekit server would listen on the IP address that my iOS clients are on.

I also have the following lines in the configuration.yml for logging:

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

When I start the Homekit integration, I see the following entries in the logs:

2021-05-01 20:39:23 DEBUG (MainThread) [homeassistant.components.homekit] Begin setup HomeKit for HASS
2021-05-01 20:39:23 DEBUG (MainThread) [pyhap.characteristic] set_value: Name to HASS
2021-05-01 20:39:23 DEBUG (MainThread) [pyhap.characteristic] set_value: SerialNumber to default
2021-05-01 20:39:23 DEBUG (MainThread) [pyhap.characteristic] set_value: FirmwareRevision to 2021.4.6
2021-05-01 20:39:23 DEBUG (MainThread) [pyhap.characteristic] set_value: Manufacturer to Home Assistant
2021-05-01 20:39:23 DEBUG (MainThread) [pyhap.characteristic] set_value: Model to Bridge
2021-05-01 20:39:23 DEBUG (MainThread) [pyhap.characteristic] set_value: SerialNumber to homekit.bridge
2021-05-01 20:39:23 INFO (SyncWorker_4) [pyhap.accessory_driver] Loading Accessory state from `/config/.storage/homekit.8bfb9d35447a9a3927793d48356dae2e.state`
2021-05-01 20:39:23 DEBUG (MainThread) [homeassistant.components.homekit] Driver start for HASS
2021-05-01 20:39:23 INFO (MainThread) [pyhap.accessory_driver] Starting accessory HASS on address 192.168.104.125, port 21063.
2021-05-01 20:39:23 DEBUG (MainThread) [pyhap.accessory_driver] Starting server.
2021-05-01 20:39:23 DEBUG (MainThread) [pyhap.accessory_driver] Starting mDNS.
2021-05-01 20:39:24 DEBUG (MainThread) [pyhap.accessory_driver] Starting accessory HASS
2021-05-01 20:39:24 DEBUG (MainThread) [pyhap.accessory_driver] AccessoryDriver for HASS started successfully
2021-05-01 20:39:24 INFO (MainThread) [homeassistant.components.homekit.util] Pincode: 279-86-312

When I scan the QR Code in the Home app on my iPhone, it spins on “Trying to add bridge” before eventually timing out with an “Accessory not found” error.

One problem I have noticed though - I have run a mDNS browser app on my Phone and on my Mac and in both apps, I cannot see any mDNS entries for _hap._tcp against the hassio host.

I’ve tried the usual other things - restarting the core service, restarting the HA host etc. I’ve verified that my Unifi devices have the “Enable IGMPv3 enhancement” option switched off as well.

Appreciate any suggestions/help on this!

Are you running HA Container? Hassio as a name has been dead for over a year, please don’t use that naming convention which just confuses others.

Is your container setup for host networking or port mapping?

I have DHCP snooping, IGMP snooping and IGMPv3 enhancement all enabled on my UniFi gear and I don’t have any issues with HomeKit connecting. However, my mDNS reflector service is turned off (one network/VLAN with a couple wireless networks). Though, not sure mDNS makes a difference for me as all it does it broadcasts from the originating network to all interfaces.

Are you running HA Container? Hassio as a name has been dead for over a year, please don’t use that naming convention which just confuses others.

Sorry about that. I am running Home Assistant Supervised, which is the manual installation of the Supervisor. I have updated my original post as well to reflect that.

Is your container setup for host networking or port mapping?

It’s setup for host networking. I’ve just gotten started with HA so my configuration is a fairly stock install.

However, my mDNS reflector service is turned off (one network/VLAN with a couple wireless networks)

I do have a mDNS reflector running on a separate machine, as I do not have a Unifi router - just the AP’s and switches.

Well now things are even more inconsistent:

  • Ran a Bonjour Browser app on a Windows PC on the same network as my HA host. That shows an entry for _hap._tcp
  • Shut down my Phone. Then disabled Homekit integration and removed the homekit.*.state file. Powered on my phone. Re-enabled the Homekit integration and scanned the QR code. Still got a “Accessory not found” error.

Was this ever resolved? Lots of versions of this issue posted… But I haven’t seem to find any solutions. Thanks.

I could never find a fix for it with my setup. My HA host which was a SBC like a Raspberry Pi died on me few weeks back so I’ve kinda shelved digging into HA till I’m able to move my install to a NUC with more reliable hardware in a few weeks.

Will try to figure out this problem again at that time but I’m not confident I’ll find a solution. When it comes to networking gremlins, xkcd: Networking Problems comes to mind.

xkcd again ftw.

I found a couple of suggestions to make this change to make it work… and several folks were able to replicate the results.

Will try soon and report back.