Native Homekit custom pincode trouble

Hey All,

I’ve just upgraded to HASSIO 0.65 and it seems the new HomeKit component is finally ready to start using with the addition of switch integration.

I can get the integration running if I simply add

homekit:

to my config but as soon as I try and add a custom pin code as per the docs… nothing.

Even with a direct copy/paste out of the docs:

homekit:
  pincode: '123-45-678' 

The home app simply won’t find my accessory.

I’ve tried various combinations of codes and zero/single/double quote marks to try and get something.

Has anyone successfully added their own pin code in 0.64+?
I didn’t try to do native HomeKit in 0.64 before 0.65

any help would be great thank you

Cheers,

Linton

1 Like

Push - same problem here!

I am having trouble seeing any components with either homekit: only and with pincode:. I did try last month and it worked but I removed it as it didn’t have switches yet.

I’m seeing similar issue, HA just isn’t showing up in the Home iOS app.

1 Like

just saw this pop up in the logs

 Error doing job: Future exception was never retrieved
 Traceback (most recent call last):
File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.5/dist-packages/homeassistant/components/homekit/__init__.py", line 134, in     start_driver
from pyhap.accessory_driver import AccessoryDriver
File "/root/.homeassistant/deps/lib/python3.5/site-packages/pyhap/accessory_driver.py", line 41, in <module>
from pyhap.hap_server import HAPServer
File "/root/.homeassistant/deps/lib/python3.5/site-packages/pyhap/hap_server.py", line 19, in <module>
from Crypto.Protocol.KDF import HKDF
ImportError: cannot import name 'HKDF'

I’ve solved this by running
pip3 install pycryptodome

apparently the pycrypto (2.6.1) package is old and insecure, and pycryptodome is the replacement for it.

1 Like

Well that’s a shame. Guess us Hassio users will just have to wait then. Good find though

I had to delete .homekit.state to get it to work.

1 Like

Yep between deleting that file and the 0.65.2 update we’re good to go :slight_smile: Cheers Rob

I’m running hassio. I removed the add in to use the native Homekit. I’ve followed the instructions on stopping hassio and remove the file. When hassio starts up, I see the code that I need to enter on my IOS devices. On the IOS devices it sees the home assistant bridge. I enter the code, it hangs for a while then fails. I try it again and the home assistant bridge fails to show up again… Anyone know whats happening? Last thing to note, I also delayed the home kit service from starting until my z wave devices have loaded. I’m running 0.77.3

Thans a lot.You are great.How do you find it?