core: homekit_controller: Frequent ConnectionResetError errors with Tado bridge

I’m running HassOS 2.12 and I have a Tadobridge (V50.6) and Tado Thermostats (V54.12). They work for a while and then when i want to change the temperature i get this error in the logs.

2019-09-28 18:07:46 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/homekit_controller/connection.py", line 273, in async_update
    self.pollable_characteristics
  File "/usr/src/homeassistant/homeassistant/components/homekit_controller/connection.py", line 303, in get_characteristics
    self.pairing.get_characteristics, *args, **kwargs
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/homekit/controller/ip_implementation.py", line 172, in get_characteristics
    self.session = IpSession(self.pairing_data)
  File "/usr/local/lib/python3.7/site-packages/homekit/controller/ip_implementation.py", line 441, in __init__
    c2a_key, a2c_key = get_session_keys(conn, pairing_data, write_fun)
  File "/usr/local/lib/python3.7/site-packages/homekit/protocol/__init__.py", line 311, in get_session_keys
    response_tlv = write_fun(request_tlv, step2_expectations)
  File "/usr/local/lib/python3.7/site-packages/homekit/protocol/__init__.py", line 80, in write_http
    resp = connection.getresponse()
  File "/usr/local/lib/python3.7/http/client.py", line 1336, in getresponse
    response.begin()
  File "/usr/local/lib/python3.7/http/client.py", line 306, in begin
    version, status, reason = self._read_status()
  File "/usr/local/lib/python3.7/http/client.py", line 267, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/local/lib/python3.7/socket.py", line 589, in readinto
    return self._sock.recv_into(b)
ConnectionResetError: [Errno 104] Connection reset by peer

Any idea what i could do?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 26 (9 by maintainers)

Most upvoted comments

Thanks everyone. 0.107.0 now uses a different fully asnyc homekit library. So the code that was implicated in those timeouts no longer exists, so it’s going to be hard to do anything more in this ticket until someone gets back in touch. So i’m going to close this for now - but do open a fresh one or reach out if it reappears in a different form.

@jperquin happy to look at warm water if it ever appears in tado’s homekit implementation - let me know if it does!