As expected the your log doesn’t show anything unusual regarding HomeKit.
Router: Port forwarding shouldn’t be necessary. Important is that you’re on the same local network when trying to pair.
Docker: Unfortunately I haven’t use it up till now, so my knowledge about that is limited, but I have read about setting the network_mode before in this context. It seems to have helped.
I’m best familiar with Hassbian. If by any chance you have a free Raspberry, you could try that. At least in my case I know that it didn’t require any specific parameters to be set for me to work. That’s why I’m recommending it for testing.
I was ready to start trying new routers. But first, I restored the RPi micro SD card back to its state running HA in a venv from a clone on my laptop (I had wiped it to install Hass.io as suggested earlier in this string by cdce8p). Imagine my surprise when I opened the add accessory dialog in the Home app and there was the HA bridge. I’ve now successfully added it. I did NOT intentionally update anything; my HA instance is still on 0.79.3. No idea what made the difference. Interestingly, several things that weren’t present before now show up in the HA front end (idevices switches, ATV4 listed as “remote”), and for the first time the HA iOS app autodiscovers HA.
Now on to figure out how to finally tell Siri to change the temp on my Nest… woohoo!! Thanks again for the help cdce8p!!!
@gustavofunke, I tried everything at some point, but in the recent past I’ve been using an RPi 3b+ connected wirelessly. My best advice is clone the card and then re-flash it… I can’t imagine why, but that’s the step that seemed to work for me. One note: I’m still using the modified accessory_driver.py file unless updating HA (I’m now on 0.80) replaced it.
Once you get it working, remember to remove demo.demo from the included HomeKit entities because otherwise nothing show up. Good luck!
@fmon Great to here. Just to clarify, are you using Hass.io or Hassbian? It doesn’t matter if it’s working, just net to know.
Regarding the accessory_driver.py file. It didn’t change with the update to (0.80) so you should still be running the modified version. Would you like to try if paring would work with the original version as well? The steps to do would be:
Unpair, maybe change the filter config (to demo.demo)
Stop Home Assistant
Rename current file to accessory_driver-working.py or sth similar
Download the original one here: link or use the local one if you still have that
After reinstall Home Assistant about 15 times… Sometimes RPI1 with Hassos, other times RPI2 with Hassos, other times RPI1 with Hassbian, and etc. I try every combination 2 times at least.
But never works…
After this marathon, I tryed to factory reset my router, and tryed some RPIs and OS, but never works too!
But the strange was I had Home Assistant working on my RPI3 (with raspbian) some months ago…
Then I had a idea: My RPI3 used wireless connection. But all new tests I used wired connection on RPI1 and RPI2… And I remember other people with same problem used wired connection on RPI too.
After some new tests, I have good news.
CONCLUSION: If iOS device has wifi connection and RPI used wired connection, the Home app didnt see the Homekit component on Home Assistant. I tryed some configuration on my router, because, probably, the router dont permits multicast between wired and wireless connection!!!
SOLUTION: You may put RPI on same wireless connection, or may configure your router.
Footnote: Now I have a RPI2 with Hassbian, and homekit is working.
@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?
@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).
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
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?
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.