Homekit device traceback

Hi all,
I have just updated to the latest stable: [0.81.6] but have since lost connectivity to my WifiPlug.

I can get the device to appear back in Home Assistant to where it requires joining to Homekit, but it says it’s succesful but the ‘configurator’ part remains.

Within the homeassistant.log I am getting a python traceback:

    2018-11-06 13:05:14 ERROR (MainThread) [homeassistant.core] Error executing service <ServiceCall configurator.configure (c:1b46f3420874471691bff2a9133a6e56): configure_id=140217668050336-2, fields=code=659-61-660>
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/core.py", line 1177, in _event_to_service_call
    await service_handler.func(service_call)
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/configurator.py", line 221, in async_handle_service_call
    call.data.get(ATTR_FIELDS, {}))
File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/homekit_controller/__init__.py", line 191, in device_config_callback
    pairing_id)
File "/srv/homeassistant/lib/python3.6/site-packages/homekit/protocol.py", line 70, in perform_pair_setup
    resp = connection.getresponse()
File "/usr/lib/python3.6/http/client.py", line 1331, in getresponse
    response.begin()
File "/usr/lib/python3.6/http/client.py", line 297, in begin
    version, status, reason = self._read_status()
File "/usr/lib/python3.6/http/client.py", line 258, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.6/socket.py", line 586, in readinto
    return self._sock.recv_into(b)
socket.timeout: timed out

I’ve tried upping again to the beta release but it still persists. Does anyone have any ideas? Thanks

I haven’t seen it before, regarding HomeKit.

  • Have you tried a restart of your system?
  • Do other accessories still work?
  • Which setup are you using?

I’ve restarted the server as well as deploying a new server.

Other modules appear to work OK, and I can add the homebridge to my iOS devices. Just adding a homekit device into Home Assistant doesn’t seem to work.

I am using Ubuntu 18 with HA provisioned within a virtualenv configured in the standard way outlined in the docs.

The homekit device appears in HA and I enter thecode and it sits but then fails.

I’m tempted to redeploy within a Docker container to see if it’s the build though.

Edit Just deployed a new CentOS 7 VM with Docker.
I’m still getting a traceback error:

2018-11-07 20:33:40 ERROR (MainThread) [homeassistant.core] Error executing service <ServiceCall configurator.configure (c:614e0675624a4af6be66313bd8bc8fbb): configure_id=140681872549144-2, fields=code=659-61-660>
Traceback (most recent call last):
File "/usr/src/app/homeassistant/core.py", line 1177, in _event_to_service_call
    await service_handler.func(service_call)
File "/usr/src/app/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/src/app/homeassistant/components/homekit_controller/__init__.py", line 191, in device_config_callback
    pairing_id)
File "/config/deps/lib/python3.6/site-packages/homekit/protocol.py", line 69, in perform_pair_setup
    connection.request('POST', '/pair-setup', request_tlv, headers)
File "/usr/local/lib/python3.6/http/client.py", line 1239, in request
    self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.6/http/client.py", line 1285, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.6/http/client.py", line 1234, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/src/app/homeassistant/components/homekit_controller/__init__.py", line 63, in homekit_http_send
    self.send(msg)
File "/usr/local/lib/python3.6/http/client.py", line 964, in send
    self.connect()
File "/usr/local/lib/python3.6/http/client.py", line 936, in connect
    (self.host,self.port), self.timeout, self.source_address)
File "/usr/local/lib/python3.6/socket.py", line 724, in create_connection
    raise err
File "/usr/local/lib/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
socket.timeout: timed out

This a default deployment with only the discovery enabled in the configuration file.

Just realized that you were writing about an issue with the homekit_controller component. Since I only maintain the homekit component, I now know why I haven’t seen this before. Unfortunately that also means that I won’t be able to help you, maybe somebody else can? (even better with a changed headline)