filipvh / hass-nhc2

Niko Home Control II Home Assistant Integration
MIT License
36 stars 26 forks source link

integration stops working #29

Closed J1Buskens closed 2 years ago

J1Buskens commented 3 years ago

The integration works fine in the first few hours after restart, then suddenly stops working. After restarting, everything works fine again for a few hours.

Allbruce commented 2 years ago

I have the same issue...hope it will be fixed in an update of the integration.

threster commented 2 years ago

Can confirm, same here

J1Buskens commented 2 years ago

I have found the source of the problem, but no solution yet:

`Logger: nhc2_coco.coco Source: /usr/local/lib/python3.9/site-packages/nhc2_coco/coco.py:118 First occurred: 8:14:31 PM (1 occurrences) Last logged: 8:14:31 PM

Disconnected

Logger: root Source: /usr/src/homeassistant/homeassistant/bootstrap.py:319 First occurred: 8:14:31 PM (1 occurrences) Last logged: 8:14:31 PM

Uncaught thread exception Traceback (most recent call last): File "/usr/local/lib/python3.9/threading.py", line 973, in _bootstrap_inner self.run() File "/usr/local/lib/python3.9/threading.py", line 910, in run self._target(*self._args, **self._kwargs) File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3591, in _thread_main self.loop_forever(retry_first_connection=True) File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1756, in loop_forever rc = self._loop(timeout) File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1185, in _loop return self.loop_misc() File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1610, in loop_misc self._check_keepalive() File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 2560, in _check_keepalive self._do_on_disconnect(rc) File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3475, in _do_on_disconnect on_disconnect(self, self._userdata, rc) File "/usr/local/lib/python3.9/site-packages/nhc2_coco/coco.py", line 121, in _on_disconnect device_callbackINTERNAL_KEY_CALLBACK TypeError: 'NoneType' object is not callable`

J1Buskens commented 2 years ago

Factory resetting the niko hub fixes the problem.