Another post about pairing with homekit

@gustavofunke, that kind of makes sense with my ultimate conclusion as well: since my last post here, my Spectrum-provided Askey Wave 2 router started behaving strangely… lots of drop-outs, wouldn’t let me into the GUI for configuration (even after a factory reset), etc., so I replaced it. HA had mysteriously started working prior to replacing it, but maybe that was the issue all along. I have a new one now, and although the Nest component isn’t stable and quits about once a day requiring a restart, HA itself is stable.

@cdce8p, given that info, do you still want me to try replacing the driver?

Now I have my RPI2 (wired) with Hassio totally funcional. The iOS device is connected to Wireless (on same router).

@fmon, what is your configuration? RPI and iOS on same wireless network?

@fmon Which version of the accessory_driver.py file are you using, the default one? Personally I don’t think that a changed version contributed to the solution in your case. Would be great if you can confirm that.


So guys, let me try to summarize this topic real quick. With so many different issues open I sometimes lose sight of the current status and the solutions that might work. Please correct me or add info if needed.

The issue

  • Home Assistant Bridge didn’t show in the Home app for pairing

HomeKit component status

  • AccessoryDriver started successfully (Log message)
  • No error because of components -> Filter: demo.demo

What didn’t work

  • Deleting the .homekit.state file => because the Bridge wasn’t paired in the first place
  • Replacing accessory_driver.py => no zeroconf error

Possible solutions

  • Changing router settings / New router
  • The Home Assistant device should use wifi (?)

Unanswered questions

  • Does the operation system matter => If configured correctly (especially Docker), it shouldn’t

Once I find some time, I probably have to rewrite the documentation to include a whole Troubleshooting section, although I wish this wouldn’t be necessary.

Never the less, I’m glad it now works for you two.

After I config my router, both Hassbian and Hassio (i tryed both operation systems) worked fine. I didnt needed none special configuration on RPIs (original accessory_driver.py).

Thanks a lot, @cdce8p! :slight_smile:

1 Like

@cdce8p: I’m still using the driver here
https://raw.githubusercontent.com/cdce8p/HAP-python/5f6f7d4589b5a64b3159475c7701d901a7d01933/pyhap/accessory_driver.py

I agree with you that changing the driver doesn’t seem to have been the issue because it didn’t work for a long time after I changed it. Given all the other issues that I experienced (HA iOS app autodiscovery, Homebridge), I really think I had some kind of basic networking issue. I’ll try unpairing, changing out the driver, and repairing once I get a chance.

Interesting I had the same problem and a fix (but a non typical one)

I was running homekit on my mac (HA V0.75) and it ran fine. I added a new instance on a RPI 3 and was not able to pair with homekit (same symptoms). Stopped the other version and paired immediately.

So any one with this problem running two version of HA it doesn’t work with Homekit

@cn-aus Your issues are unrelated to this topic. Please set the name config option for one of your HA instances. That should solve it. https://www.home-assistant.io/components/homekit/#name

1 Like

Agreed - was just mentioning in case some one like me spent hours chasing now a user error

Thanks for the link - it makes sense

I started with the troubleshooting section in the doc for that reason. Although I have to admitt that I missed your error. Will add it later today. Here’s the link: https://www.home-assistant.io/components/homekit/#troubleshooting

So I have the same problem as many of the other folks posting here - my HA installation is never discovered by the Home app (which is running on an iPad). I have the iPad configured to act as a ‘Home Hub’ and have turned on the keychain in iCloud.

My HA is running on my Mac Media server within a docker container. I’ve read the post regarding “net=host” however this isn’t a valid configuration for Docker on a Mac. I have tried changing Homekit to a different port (rather than the default 51827) however this doesn’t seem to have any impact.

I do see the Homekit id code when I restart HA however Home on the iPad never discovers the Homekit bridge. Has anyone found a successful means of connecting Homekit to HA running in a Docker container? Particularly under Mac OS?

As an update I would note that my Mac is connected to my router via Ethernet while the iPad is obviously connected via wireless. I think I read somewhere that both the HA host and the hub require to be on the same network. Obviously this is the case since they both have 192.168.10 IP addresses however I wonder whether there may be some issue regarding ethernet versus wireless?

has anyone identified a trigger to use for when homekit starts? I am trying to send a notification after restart so I know when the actual service starts. I had one that triggered on the zwave network being completed but that is not a true representation of homekit. Surely there is something that can trigger an automation?

Thanks

@pdobrien3 Check out: https://www.home-assistant.io/components/homekit/#disable-auto-start
Especially the last of the three examples.

Unless I am missing something, that automation actually starts the homekit service. I realize I can just add a notify service to that automation but that is not what I am looking for. I am trying to identify the actual event that happens when homekit starts so I can use it as a trigger to confirm it is actually running.

@pdobrien3 I totaly missread your question :sweat_smile:
At the moment there isn’t any event triggered, the HomeKit component just starts. However you could listen to the first occurence of the homekit_state_change event used for the logbook. Usually it is called within a few seconds after startup, to initialize the correct accessory state.

Awesome. Thank you. So?

platform: event
event_type: homekit_state_change

@pdobrien3 Yeah that should work, although I haven’t tried it personally.

So, it actually works each time someone leaves or comes home (I am using it for presence detection), but not during startup :-(.

Thanks for trying though.

@Texangeek I was wondering if you found a solution for this? I have a similar setup but my docker is on a Synology and my hub is an AppleTV instead of an iPad.

1 Like

I am having similar issues, can scan the QR code but will now add.

Same network, different iPhones tested.

i have same issue here. did anyone come up with the solution?

do i need to do some changes to my unifi network?