Core: Homekit Controller not enrolling devices

Created on 19 Apr 2019  路  8Comments  路  Source: home-assistant/core

Home Assistant release with the issue: 0.91.4

Last working Home Assistant release (if known): N/A

Operating environment (Hass.io/Docker/Windows/etc.): Hass.io

Component/platform: https://www.home-assistant.io/components/homekit_controller

Description of problem:
Cannot get any Homekit devices to enroll under homekit_controller. I reset HA and it finds the devices in lovelace. I click configure the device and add the PIN, then hit the submit. The ring goes around for a few seconds then doesn't do anything more. When I run the command python3 -m homekit.discover --log DEBUG I see that the devices have been paired to something; however, I do not see anything in HA for the device.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

discovery:
  enable:
    - homekit

Traceback (if applicable):


Additional information:

Most helpful comment

So TL;DR -

  • Underlying bug should be fixed in 0.92 if PR is merged (it's more of a temporary band aid as the .homekit folder goes away entirely in 0.94). It's already fixed on dev (which will become 0.93).
  • "Home Assistant iOS" seems to be a red herring. homekit_controller does not currently appear in the "Integrations" panel at all, and is unrelated to "Home Assistant iOS" which is for the HA iOS App, not devices.
  • Pairing is getting overhauled in 0.94 so unlikely to work on pairing UI issues before then.
  • After 0.94 it will show up in "Configuration > Integrations"

In the mean time, creating the folder manually should unblock anyone hitting this.

All 8 comments

I'm having the same issue. Everything works when using the homekit tools, so this must be a bug in the HA component.

Hello - where ever your configuration.yaml file is can you make sure in the same folder there is a folder called .homekit. If it doesn't exist create it. If it does exist, does it have a pairing.json file in it?

If the error logs are reporting something is already paired, can you reset the homekit pairing on the devices side, if pairing.json does exist delete it. Restart HA and try again.

Confirmed that .homekit folder was not in the configuration.yaml folder. Once created, the pairing.json file appeared after successfully pairing a device. Appears that this folder is not created when you add the homekit controller to your configuration.yaml or add the integration in the UI (btw, UI still says I have "no devices" under Configuration > Integrations > Home Assistant IOS). Furthermore, I set the logger to DEBUG mode and didnt catch an error regarding the .homekit folder not being found. Finally, I'm noticing a UI bug in homekit pairing. If you add the pin and it cannot connect, then you exit out and go back to pairing the same device, or different device, the error is still there. I also found pairing devices in the Firefox browser was more reliable than in Chrome.

So TL;DR -

  • Underlying bug should be fixed in 0.92 if PR is merged (it's more of a temporary band aid as the .homekit folder goes away entirely in 0.94). It's already fixed on dev (which will become 0.93).
  • "Home Assistant iOS" seems to be a red herring. homekit_controller does not currently appear in the "Integrations" panel at all, and is unrelated to "Home Assistant iOS" which is for the HA iOS App, not devices.
  • Pairing is getting overhauled in 0.94 so unlikely to work on pairing UI issues before then.
  • After 0.94 it will show up in "Configuration > Integrations"

In the mean time, creating the folder manually should unblock anyone hitting this.

And the longer version:- This is a regression - code to create the folder was lost as part of merging a massive changeset to move to config entries. This changeset is what will let homekit_controller show up in the "Integrations" UI. It was so large we split it over multiple releases. The folder isn't used any more when all the feature is merged, but right now in the released code it still is needed. And the 2 lines of code that ensure it exists were merged early due to sloppy rebasing on my part. So they are missing on 0.91.x, back on dev (0.93), and will hopefully be in 0.92, but will then removed again in 0.94 as the final pieces of config entries support lands. Long running branches. Sigh.

Understood. I've been impressed with the project so far and completely understand that for most this is a second job unpaid job. That said, my only gripe in this process was the lack of error messaging along the process. Looking forward to the next version.

That said, I wanted to bring up another issue regarding ingress. Im running Hassos on an Odroid C2 (ARM 64-bit) and cannot get any add-ons using ingress to work (get a 502: bad gateway). Any tips or do I need to put in a new issue?

Yea error reporting should be better when new pairing code lands.

Best to open separate issues for everything. E.g. I鈥檓 just a user turned contributor not a core dev so I only know about homekit_controller. Messy if I鈥檓 trying to help with homekit and another community member trying to help with ingress.

This is fixed in 0.92. Anyone finding this having issues pairing their homekit devices:

  • If you tried to pair on 0.91.x you might need to reset your HomeKit device (pairing did complete as far as its concerned, so it won't let you pair again). But after upgrading to 0.92 and trying again pairing should work.
  • If you never tried to pair on 0.91.x it is definitely not the same issue - please open a new ticket and @ me.
Was this page helpful?
0 / 5 - 0 ratings