bosch-thermostat / home-assistant-bosch-custom-component

HA custom component for Bosch thermostats
Apache License 2.0
224 stars 45 forks source link

Loosing connection with CT200 after some time #70

Closed gralin closed 3 years ago

gralin commented 3 years ago

Describe the bug

After I start my HA, the integration works fine. I can see valid values for pressure, temperatures, I can set desired temperature etc. However, it stops working at random point in time within 24h from starting HA.

To Reproduce

Steps to reproduce the behavior:

  1. Start/restart HA
  2. Check if integration works
  3. Wait some time (up to 24h)
  4. You should see some errors/warning in longs and the values reported by integration will no longer update
2021-04-25 01:58:08 ERROR (MainThread) [aioxmpp.callbacks] listener attached to signal raised
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/aioxmpp/callbacks.py", line 534, in fire
    keep = wrapper(args, kwargs)
  File "/usr/local/lib/python3.8/site-packages/aioxmpp/callbacks.py", line 468, in _strong_wrapper
    return not f(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/aioxmpp/dispatcher.py", line 287, in _feed
    super()._feed(stanza)
  File "/usr/local/lib/python3.8/site-packages/aioxmpp/dispatcher.py", line 135, in _feed
    cb(stanza)
  File "/usr/local/lib/python3.8/site-packages/bosch_thermostat_client/connectors/xmpp.py", line 161, in main_listener
    listener(body, http_response)
  File "/usr/local/lib/python3.8/site-packages/bosch_thermostat_client/connectors/xmpp.py", line 120, in listener
    future.set_result(recv_body)
asyncio.exceptions.InvalidStateError: invalid state
2021-04-25 02:00:05 ERROR (MainThread) [bosch_thermostat_client.helper] Can't update data for Indoor humidity. Trying uri: /system/sensors/humidity/indoor_h1. Error message: Error requesting data from /system/sensors/humidity/indoor_h1
2021-04-25 02:00:08 ERROR (MainThread) [bosch_thermostat_client.helper] Can't update data for System pressure. Trying uri: /system/appliance/systemPressure. Error message: Error requesting data from /system/appliance/systemPressure
2021-04-25 02:00:11 ERROR (MainThread) [bosch_thermostat_client.helper] Can't update data for Valve position. Trying uri: /zones/zn1/actualValvePosition. Error message: Error requesting data from /zones/zn1/actualValvePosition
2021-04-25 02:03:05 ERROR (MainThread) [bosch_thermostat_client.helper] Can't update data for Indoor humidity. Trying uri: /system/sensors/humidity/indoor_h1. Error message: Error requesting data from /system/sensors/humidity/indoor_h1
2021-04-25 02:03:08 ERROR (MainThread) [bosch_thermostat_client.helper] Can't update data for System pressure. Trying uri: /system/appliance/systemPressure. Error message: Error requesting data from /system/appliance/systemPressure
2021-04-25 02:03:11 ERROR (MainThread) [bosch_thermostat_client.helper] Can't update data for Valve position. Trying uri: /zones/zn1/actualValvePosition. Error message: Error requesting data from /zones/zn1/actualValvePosition
2021-04-25 02:06:05 ERROR (MainThread) [bosch_thermostat_client.helper] Can't update data for Indoor humidity. Trying uri: /system/sensors/humidity/indoor_h1. Error message: Error requesting data from /system/sensors/humidity/indoor_h1
2021-04-25 02:06:08 ERROR (MainThread) [bosch_thermostat_client.helper] Can't update data for System pressure. Trying uri: /system/appliance/systemPressure. Error message: Error requesting data from /system/appliance/systemPressure
2021-04-25 02:06:11 ERROR (MainThread) [bosch_thermostat_client.helper] Can't update data for Valve position. Trying uri: /zones/zn1/actualValvePosition. Error message: Error requesting data from /zones/zn1/actualValvePosition
2021-04-25 02:09:05 ERROR (MainThread) [bosch_thermostat_client.helper] Can't update data for Indoor humidity. Trying uri: /system/sensors/humidity/indoor_h1. Error message: Error requesting data from /system/sensors/humidity/indoor_h1
2021-04-25 02:09:08 ERROR (MainThread) [bosch_thermostat_client.helper] Can't update data for System pressure. Trying uri: /system/appliance/systemPressure. Error message: Error requesting data from /system/appliance/systemPressure
2021-04-25 02:09:11 ERROR (MainThread) [bosch_thermostat_client.helper] Can't update data for Valve position. Trying uri: /zones/zn1/actualValvePosition. Error message: Error requesting data from /zones/zn1/actualValvePosition
2021-04-25 02:09:14 WARNING (MainThread) [custom_components.bosch] Bosch object of entity Bedroom is no longer available. Error requesting data from /programs/list
2021-04-25 02:09:17 WARNING (MainThread) [custom_components.bosch] Bosch object of entity Guest room is no longer available. Error requesting data from /programs/list
2021-04-25 02:09:20 WARNING (MainThread) [custom_components.bosch] Bosch object of entity Cinema is no longer available. Error requesting data from /programs/list
2021-04-25 02:09:23 WARNING (MainThread) [custom_components.bosch] Bosch object of entity Boiler room is no longer available. Error requesting data from /programs/list

Expected behavior

It should not be required to restart HA to bring integration back to life

Version

Debug SCAN

bosch_scan.txt

Additional context

I wasn't able to generate bosch_scan.json while the integration was in this invalid state (generated bosch_scan.json was all empty arrays). After restarting HA I was able to generate it no problem.

gralin commented 3 years ago

Updated to 0.12.0dev4. let's see if it helps.

gralin commented 3 years ago

No issues with connection after 48H šŸ„³