Trouble with HomeKit Setup in 0.66

Having trouble with the updated HomeKit component. Updated to 0.66 this morning after deleting my previous entries in config and removing bridge from my iOS Home App (as suggested in setup). It had been working flawlessly in 0.65.

I believe I have HomeKit running (not getting any config errors), but I don’t see a card that displays the pin code, nor do I see the bridge itself showing up in my Home app as it did before.

How can I check to see that 1) HomeKit is actually running on my Home Assistant, and 2) how do I get the pin code to display?

I have a feeling maybe 2 would be solved with 1, but I need some help! Thanks everyone!

Same problem

For 1), you can try installing Bonjour discovery browser in an iOS device ( and run it connected to the same network as Home Assistant.

If Homekit component is visible by Apple Homekit, it should appear there as a domain.

For me the homekit component not running on HA but I can see that it’s running on my apple TV.

I can’t see why becaus i call the homekit:

Yep I’m in the same boat

I 've config the logger to show the homekit component… everything seems to work fine on HA but it’s not display on the bonjour App.

The pincode configuration variable seems to be removed in .66… ?

In the past, this has helped with homebridge,

Please check if it might help you also:

That’s for Homebridge, not Home Assistant’s HomeKit integration. Do you think it will work?

Indeed, this is now generated automatically and should appear to you as a persistent notification when Homekit starts.

If the persistent notification doesn’t appear to you, try putting in Homekit component configuration:
auto_start: False

and then try running service homekit.start from the frontend.

The fix is on avahi service, which is used both for Homekit component or Homebridge.

In the command line, run netstat -na | grep 51827 (default port for Homekit component - change it to a different one you may have specified in your configuration). If you only see tcp6, that’s probably the issue.

To fix it, you can try editing file /etc/avahi/avahi-daemon.conf (with sudo) and changing use-ipv6 from yes to no and reboot the Pi. It won’t harm you to try, I’d say.

Or, if that doesn’t work, just add ipv6.disable=1 to /boot/cmdline.txt to turn off V6 and reboot the Pi.

1 Like

Yes! That fixed it. Thank you for all your help!

1 Like

I am having the same problem, the code wont appear. I cant seem to find the home.state file that the issue above talks about, so seems like i must have some other issue. How to troubleshoot further?

Make sure you can see Hidden Files in whatever OS you’re using. On my Mac that I access my server in, I had to enable hidden files to find it.

Still busted for me. I’ve removed .home.state, I’ve pulled the pincode out of my yaml, I’ve removed the Bridge from Home app in iOS. It’s – as far as I can tell – back to square one, but every time I start v. 0.66 up, I get an error:

Error during setup of component homekit

Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/”, line 142, in _async_setup_component
result = await component.async_setup(hass, processed_config)
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/homekit/”, line 55, in async_setup
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/homekit/”, line 157, in setup
from .accessories import HomeBridge, HomeDriver
File “/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/homekit/”, line 5, in
from pyhap.accessory_driver import AccessoryDriver
File “/srv/homeassistant/lib/python3.6/site-packages/pyhap/”, line 41, in
from pyhap.hap_server import HAPServer
File “/srv/homeassistant/lib/python3.6/site-packages/pyhap/”, line 18, in
from tlslite.utils.chacha20_poly1305 import CHACHA20_POLY1305
File “/srv/homeassistant/lib/python3.6/site-packages/tlslite/”, line 27, in
from tlslite.api import *
File “/srv/homeassistant/lib/python3.6/site-packages/tlslite/”, line 7, in
from .checker import Checker
File “/srv/homeassistant/lib/python3.6/site-packages/tlslite/”, line 6, in
from .x509 import X509
File “/srv/homeassistant/lib/python3.6/site-packages/tlslite/”, line 10, in
from .utils.cryptomath import *
File “/srv/homeassistant/lib/python3.6/site-packages/tlslite/utils/”, line 50, in
import Crypto.Cipher.AES
File “/srv/homeassistant/lib/python3.6/site-packages/Crypto/Cipher/”, line 83, in
from Crypto.Cipher._mode_openpgp import _create_openpgp_cipher
File “/srv/homeassistant/lib/python3.6/site-packages/Crypto/Cipher/”, line 39, in
from Crypto.Util.number import long_to_bytes, bytes_to_long
File “”, line 961, in _find_and_load
File “”, line 950, in _find_and_load_unlocked
File “”, line 655, in _load_unlocked
File “”, line 674, in exec_module
File “”, line 779, in get_code
File “”, line 487, in _compile_bytecode
ValueError: bad marshal data (invalid reference)

Any clues?

Same here.
Ubuntu 17.10 NOT virtual or docker