jlvaillant / intellicenter

Home Assistant Integration for Pentair Intellicenter
GNU General Public License v3.0
38 stars 13 forks source link

Integration crashes when heartbeat is missed #25

Open dwradcliffe opened 3 years ago

dwradcliffe commented 3 years ago

Log entries:

2021-07-25 22:22:27 ERROR (MainThread) [custom_components.intellicenter.pyintellicenter.protocol] PROTOCOL: heartbeat missed, closing connection
2021-07-25 22:22:27 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback _SelectorSocketTransport._call_connection_lost(None)
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/asyncio/events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/local/lib/python3.8/asyncio/selector_events.py", line 970, in _call_connection_lost
    super()._call_connection_lost(exc)
  File "/usr/local/lib/python3.8/asyncio/selector_events.py", line 728, in _call_connection_lost
    self._protocol.connection_lost(exc)
  File "/config/custom_components/intellicenter/pyintellicenter/protocol.py", line 68, in connection_lost
    self._controller.connection_lost(exc)
  File "/config/custom_components/intellicenter/pyintellicenter/controller.py", line 133, in connection_lost
    self.stop()  # should that be a cleanup instead?
  File "/config/custom_components/intellicenter/pyintellicenter/controller.py", line 165, in stop
    request.cancel()
AttributeError: 'NoneType' object has no attribute 'cancel'

After this, the integration is "dead" and won't pass any values to the controller or receive any updates. I have to restart HA to get it working again. This seems to be happening about once a week for me.

jlvaillant commented 3 years ago

Do you still have that issue? I don’t have much of a way to work on it currently but I can try to help if you need me.

sellison2 commented 2 years ago

I get that error all the time! I also get this one: Logger: custom_components.intellicenter.pyintellicenter.controller Source: custom_components/intellicenter/pyintellicenter/controller.py:480 Integration: Pentair IntelliCenter (documentation, issues) First occurred: February 5, 2022, 6:00:22 PM (38 occurrences) Last logged: 9:36:54 AM

cannot start: [Errno 113] Connect call failed ('192.168.0.181', 6681)

Both of those errors render the integration dead. Most of the time I can reload the integration and that will fix it, but occasionally I have to fully restart HA to get everything back.