Connecting to Homekit (Homebridge) - configuration error

Hi Guys,

I’ve got a problem with pairing my homebridge devices with HA.

I’ve installed HA on my Ubuntu 18.04 machine using this tutorial https://www.home-assistant.io/hassio/installation/

To be more precise, with:

curl -sL https://raw.githubusercontent.com/home-assistant/hassio-build/master/install/hassio_install | bash -s

HA have installed fine. After that I wanted to control my homekit devices (accessible via homebridge) from HA.

In order to do that I’ve added

discovery:
  enable:
    - homekit

to my configuration file, and waited for homebridge to show up in the HA dashboard.

unfortunately I can’t add my homebridge to HA, because after inserting required PIN code, I’m getting an error describing that configurator/configure command have failed.

From the logs I’ve extracted this error log:

2018-12-21 00:04:51 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140314975792712] Error handling message: {‘type’: ‘call_service’, ‘domain’: ‘configurator’, ‘service’: ‘configure’, ‘service_data’: {‘configure_id’: ‘140314944670072-2’, ‘fields’: {‘code’: ‘031-45-154’}}, ‘id’: 15}
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/websocket_api/decorators.py”, line 16, in _handle_async_response
await func(hass, connection, msg)
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/websocket_api/commands.py”, line 148, in handle_call_service
connection.context(msg))
File “/usr/local/lib/python3.6/site-packages/homeassistant/core.py”, line 1121, in async_call
self._execute_service(handler, service_call))
File “/usr/local/lib/python3.6/site-packages/homeassistant/core.py”, line 1143, in _execute_service
await handler.func(service_call)
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/configurator.py”, line 221, in async_handle_service_call
call.data.get(ATTR_FIELDS, {}))
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/homekit_controller/init.py”, line 192, in device_config_callback
pairing_id)
File “/usr/local/lib/python3.6/site-packages/homekit/protocol.py”, line 76, in perform_pair_setup
assert TLV.kTLVType_State in response_tlv, response_tlv
AssertionError: {}

Does anyone here have any idea how to tackle this issue?

I’m having the exact same problem qwhen trying to configure homebridge with the HomeKit controller.
Any ideas?
If you find a solution please reply it here, I’ll do the same if I found.

same here… no idea how to fix :’(

any workarounds to get the homekit controller thing to play???

`Error handling message: {'type': 'call_service', 'domain': 'configurator', 'service': 'configure', 'service_data': {'configure_id': '1886648368-1', 'fields': {'code': '000-00-000'}}, 'id': 22}`
      File "/usr/local/lib/python3.6/site-packages/homeassistant/components/websocket_api/decorators.py", line 17, in _handle_async_response
        await func(hass, connection, msg)
      File "/usr/local/lib/python3.6/site-packages/homeassistant/components/websocket_api/commands.py", line 148, in handle_call_service
        connection.context(msg))
      File "/usr/local/lib/python3.6/site-packages/homeassistant/core.py", line 1129, in async_call
        self._execute_service(handler, service_call))
      File "/usr/local/lib/python3.6/site-packages/homeassistant/core.py", line 1151, in _execute_service
        await handler.func(service_call)
      File "/usr/local/lib/python3.6/site-packages/homeassistant/components/configurator.py", line 221, in async_handle_service_call
        call.data.get(ATTR_FIELDS, {}))
      File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
        result = self.fn(*self.args, **self.kwargs)
      File "/usr/local/lib/python3.6/site-packages/homeassistant/components/homekit_controller/__init__.py", line 138, in device_config_callback
        self.controller.perform_pairing(self.hkid, self.hkid, code)
      File "/usr/local/lib/python3.6/site-packages/homekit/controller.py", line 192, in perform_pairing
        pairing = perform_pair_setup(conn, pin, str(uuid.uuid4()))
      File "/usr/local/lib/python3.6/site-packages/homekit/protocol/__init__.py", line 90, in perform_pair_setup
        assert response_tlv[0][0] == TLV.kTLVType_State and response_tlv[0][1] == TLV.M2, 'perform_pair_setup: State not M2'
    IndexError: list index out of range

Does really no one uses Hassio in combination with homekit?!? I mean the controller thing???
I’m really stucked here :frowning:

Same here. Any ideas?

I am experiencing exactly the same.
I am also stuck.

Any suggestion is welcome!

Unlinking my iphone from the homebridge did the trick!

1 Like

REALLY?! Can you explain what exactly i’ve to do “unklinking”?! :open_mouth:

I might be wrong, but it looks like only one client can simoultanously connect to the homebridge.
You probably paired your iPhone or IPad to the homebridge once (by scanning the QR or manually entering the 8digit code). I just undid that, so removing the connection to the bridge from the Apple Home app. Immediately after that, I was able to succesfully link HASS to the Bridge.

i didn’t try it yet!

I mean, i have a really huge home scenery with about 120 actors and if i remove the hombebridge <-> home link than every rule which is connected with some homebridge device will be deleted

i’m super afraid to try this