HomeKit's Home app, 'Couldn't add Home Assistant'

I’ve been trying to setup the native HomeKit component over the last few releases (try to set it up, fail, try again with the next release…).

I’ve added it to configuration.yaml

homekit:
  auto_start: True

and also added an automation for when Home Assistant starts (just to try anything to get it working)
- alias: HomeKit  Startup"
  trigger:
    platform: homeassistant
    event: start
  action:
    - service: homekit.start

When I open the iOS Home app and tap on Add Accessory it shows Home Assistant as an accessory, I type in the code shown on my HA’s frontend, but then after a while it always shows this error


I've been running Homebridge before this and it's been working fine, but I've turned it off while trying to set up Home Assistant's HomeKit component, in case Homebridge was interfering with this.

I’m running the latest version of Home Assistant in a Docker container on an Intel NUC (if that makes any difference). I haven’t needed to do it in the past with Homebridge, but should I open up any ports or anything?

Anyone know what the problem could be, and how I could get this up and running?

I am having the very same problem for several releases now. I am running HASS in Docker which may have something to do with it? I have Homebridge running just fine in Docker.

I managed to fix it by adding/changing the default port number in configuration.yaml

Thanks @jono I tried that but still seeing the same issue. I tried a few different ports. Also tried adding another matching port on the hass docker image. No dice…

1 Like

Hmmm, not sure then :neutral_face:

I experienced this once with Homebridge, because I had to many entities being added to Homekit. I think the maximum is 100 pr. hub. Could be your problem.

I solved this by only including the devices I needed in homekit.

That could be right, as when I changed the port number I also added a filter to the code to only include the entities I wanted.

What port did you use? I can’t seem to get the Homekit platforms to do anything really…

I used port 51829

hmm… tried that… tried specifying my HA IP address, adding filter, include domain light as suggested, disabled autostart, turned off discovery, delete .homekit.state, reboot, reboot, reboot. Can’t get it to accept HA after entering the HomeKit code. It always sees it on the (wired) network.

Has anyone gotten this to work on a non-flat (with VLAN) networks? Where the Hass.IO pi is on wired Ethernet? I can’t imagine why this is so much trouble… I see all kinds of videos where it just pairs right up…

I don’t know about Hass.io, but remember with Docker I had to either use ‘–net=host’ or specify the port number, not both.

I’m also on a wired connection. Maybe you’d have more luck posting in the Hass.io section?

…just took another look at my config. I also have auto start turned on.

auto_start: true
port: 51829
filter:
  include_entities:
    - script.everything_off
    - switch.all_the_lights
    - switch.upstairs_lights
    - switch.downstairs_lights

Maybe try that too? (If you haven't already)
1 Like