core: Unable to add devices to HomeKit Controller

Home Assistant release with the issue: 0.80.3

Last working Home Assistant release (if known): 0.78.0

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

Component/platform: HomeKit controller support (https://www.home-assistant.io/components/homekit_controller/)

Description of problem:

  • Devices show up the Home Assistant Configurator
  • HA accepts the PIN of the device and calls the configurator/configure service
  • HomeKit device does not get setup and no error is shown

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

discovery:
  enable:
    - dlna_dmr
    - homekit

Traceback (if applicable):

Sun Oct 21 2018 11:13:33 GMT-0400 (Eastern Daylight Time)

Error executing service <ServiceCall configurator.configure (c:a393f71515ba4a8b90ffc5708161426c): configure_id=139979180631208-3, fields=code=XXX-XX-XXX>
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 195, in device_config_callback
    pairing_id)
  File "/config/deps/lib/python3.6/site-packages/homekit/protocol.py", line 94, in perform_pair_setup
    resp = connection.getresponse()
  File "/usr/local/lib/python3.6/http/client.py", line 1331, in getresponse
    response.begin()
  File "/usr/local/lib/python3.6/http/client.py", line 297, in begin
    version, status, reason = self._read_status()
  File "/usr/local/lib/python3.6/http/client.py", line 258, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/local/lib/python3.6/socket.py", line 586, in readinto
    return self._sock.recv_into(b)
socket.timeout: timed out

Additional information:

  • PIN was replaced with X for privacy in the traceback.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 18 (6 by maintainers)

Most upvoted comments

Yes I think so - the advice is just out of date and potentially misleading now, and all the reported tracebacks have known fixes. If there are any other remaining issues we need to start from scratch.

Took a little while to test since I was busy migrating HA off of a Pi onto a QNAP 451+ (where I saw the same issue). Changing REQUEST_TIMEOUT = 30 in homekit_controller/__init__.py did resolve the issue for me, and I was able to add all 3 of my ispx6 switches. Thanks!!

Thanks. That directory is empty on my raspberry pi and searching for “monkey_patch.py” found nothing. Based on what I have been reading the configuration directory is in a docker container running on the pi. So it appears that one has to do the work to be able to log in to the docker container.

I was able to copy homekit_controller/__init__.py from GitHub and put the file in the custom_containers directory on the pi, edit a constant in the file, and see it take after I rebooted hassio.