rcasula / kostalpiko-homeassistant

19 stars 15 forks source link

Issues wirth Piko 5.5 #28

Open pergolafabio opened 10 months ago

pergolafabio commented 10 months ago

Hi @rcasula , i used this one for a long while, never had issues with it, except, for the "status" sensor, is has a wrong device class https://github.com/DjFabFab/kostalpiko-hacs

Now using yours since yesterday on my piko 5.5 , but got a lof ot issues with it?

Yesterday, on restart HA, i had this below, restarted HA again, and all good


[2023-08-07 20:13:46.088 ERROR (MainThread) [homeassistant.util.logging] Exception in async_add_sensors when dispatching 'kostal_init_sensors': (['current_power', 'total_energy', 'daily_energy', 'status', 'string1_voltage', 'string1_current', 'string2_voltage', 'string2_current', 'l1_voltage', 'l1_power', 'l2_voltage', 'l2_power', 'l3_voltage', 'l3_power'], <custom_components.kostal.piko_holder.PikoHolder object at 0x7f8bba7bcb10>)
Traceback (most recent call last):
  File "/config/custom_components/kostal/sensor.py", line 43, in async_add_sensors
    _sensors.append(PikoSensor(hass, piko, sensor, info, entry.title))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/kostal/sensor.py", line 71, in __init__
    self.serial_number = info[0]
                         ~~~~^^^
TypeError: 'NoneType' object is not subscriptable](url)

Now, this morning, all my entities are idle again, and i see again this in logs

2023-08-08 06:04:22.399 ERROR (SyncWorker_2) [kostalpiko.kostalpiko] HTTPConnectionPool(host='192.168.0.40', port=80): Max retries exceeded with url: /index.fhtml (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f50719bf4d0>, 'Connection to 192.168.0.40 timed out. (connect timeout=15)'))
2023-08-08 06:04:37.372 WARNING (MainThread) [homeassistant.components.sensor] Updating kostal sensor took longer than the scheduled update interval 0:00:30
2023-08-08 06:05:17.378 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.kostal_piko_current_power is taking over 10 seconds
2023-08-08 06:05:22.400 ERROR (SyncWorker_2) [kostalpiko.kostalpiko] HTTPConnectionPool(host='192.168.0.40', port=80): Max retries exceeded with url: /index.fhtml (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f5070a62410>, 'Connection to 192.168.0.40 timed out. (connect timeout=15)'))
2023-08-08 06:05:37.374 WARNING (MainThread) [homeassistant.components.sensor] Updating kostal sensor took longer than the scheduled update interval 0:00:30
2023-08-08 06:06:17.381 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.kostal_piko_current_power is taking over 10 seconds
2023-08-08 06:06:22.400 ERROR (SyncWorker_6) [kostalpiko.kostalpiko] HTTPConnectionPool(host='192.168.0.40', port=80): Max retries exceeded with url: /index.fhtml (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f506b55b450>, 'Connection to 192.168.0.40 timed out. (connect timeout=15)'))
2023-08-08 06:06:37.375 WARNING (MainThread) [homeassistant.components.sensor] Updating kostal sensor took longer than the scheduled update interval 0:00:30
2023-08-08 06:07:17.382 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.kostal_piko_current_power is taking over 10 seconds
2023-08-08 06:07:22.401 ERROR (SyncWorker_11) [kostalpiko.kostalpiko] HTTPConnectionPool(host='192.168.0.40', port=80): Max retries exceeded with url: /index.fhtml (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f506bfb90d0>, 'Connection to 192.168.0.40 timed out. (connect timeout=15)'))
2023-08-08 06:07:37.377 WARNING (MainThread) [homeassistant.components.sensor] Updating kostal sensor took longer than the scheduled update interval 0:00:30
2023-08-08 06:08:17.383 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.kostal_piko_current_power is taking over 10 seconds
2023-08-08 06:08:22.399 ERROR (SyncWorker_16) [kostalpiko.kostalpiko] HTTPConnectionPool(host='192.168.0.40', port=80): Max retries exceeded with url: /index.fhtml (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f5073e73bd0>, 'Connection to 192.168.0.40 timed out. (connect timeout=15)'))
2023-08-08 06:08:37.379 WARNING (MainThread) [homeassistant.components.sensor] Updating kostal sensor took longer than the scheduled update interval 0:00:30
2023-08-08 06:09:17.385 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.kostal_piko_current_power is taking over 10 seconds
2023-08-08 06:09:22.405 ERROR (SyncWorker_11) [kostalpiko.kostalpiko] HTTPConnectionPool(host='192.168.0.40', port=80): Max retries exceeded with url: /index.fhtml (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f506b6baa90>, 'Connection to 192.168.0.40 timed out. (connect timeout=15)'))
2023-08-08 06:09:37.380 WARNING (MainThread) [homeassistant.components.sensor] Updating kostal sensor took longer than the scheduled update interval 0:00:30
2023-08-08 06:10:17.386 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.kostal_piko_current_power is taking over 10 seconds
2023-08-08 06:10:22.413 ERROR (SyncWorker_3) [kostalpiko.kostalpiko] HTTPConnectionPool(host='192.168.0.40', port=80): Max retries exceeded with url: /index.fhtml (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f506b6fb410>, 'Connection to 192.168.0.40 timed out. (connect timeout=15)'))
2023-08-08 06:10:37.381 WARNING (MainThread) [homeassistant.components.sensor] Updating kostal sensor took longer than the scheduled update interval 0:00:30
2023-08-08 06:11:17.389 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.kostal_piko_current_power is taking over 10 seconds
2023-08-08 06:11:22.404 ERROR (SyncWorker_5) [kostalpiko.kostalpiko] HTTPConnectionPool(host='192.168.0.40', port=80): Max retries exceeded with url: /index.fhtml (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f507359d6d0>, 'Connection to 192.168.0.40 timed out. (connect timeout=15)'))
2023-08-08 06:11:37.383 WARNING (MainThread) [homeassistant.components.sensor] Updating kostal sensor took longer than the scheduled update interval 0:00:30
2023-08-08 06:12:17.388 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.kostal_piko_current_power is taking over 10 seconds
2023-08-08 06:12:22.404 ERROR (SyncWorker_4) [kostalpiko.kostalpiko] HTTPConnectionPool(host='192.168.0.40', port=80): Max retries exceeded with url: /index.fhtml (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f5073b8f210>, 'Connection to 192.168.0.40 timed out. (connect timeout=15)'))
2023-08-08 06:12:37.385 WARNING (MainThread) [homeassistant.components.sensor] Updating kostal sensor took longer than the scheduled update interval 0:00:30
2023-08-08 06:13:17.390 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.kostal_piko_current_power is taking over 10 seconds
2023-08-08 06:13:22.413 ERROR (SyncWorker_3) [kostalpiko.kostalpiko] HTTPConnectionPool(host='192.168.0.40', port=80): Max retries exceeded with url: /index.fhtml (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f5070c54850>, 'Connection to 192.168.0.40 timed out. (connect timeout=15)'))
2023-08-08 06:13:37.386 WARNING (MainThread) [homeassistant.components.sensor] Updating kostal sensor took longer than the scheduled update interval 0:00:30
2023-08-08 06:14:17.393 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.kostal_piko_current_power is taking over 10 seconds
2023-08-08 06:14:22.418 ERROR (SyncWorker_4) [kostalpiko.kostalpiko] HTTPConnectionPool(host='192.168.0.40', port=80): Max retries exceeded with url: /index.fhtml (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f506b6fae10>, 'Connection to 192.168.0.40 timed out. (connect timeout=15)'))
2023-08-08 06:14:37.388 WARNING (MainThread) [homeassistant.components.sensor] Updating kostal sensor took longer than the scheduled update interval 0:00:30
2023-08-08 06:14:56.352 WARNING (SyncWorker_11) [custom_components.localtuya.sensor] [bfa...dek] Entity sensor.petfeeder_201 is requesting unknown DPS index 201
2023-08-08 06:15:17.394 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.kostal_piko_current_power is taking over 10 seconds
2023-08-08 06:15:22.415 ERROR (SyncWorker_13) [kostalpiko.kostalpiko] HTTPConnectionPool(host='192.168.0.40', port=80): Max retries exceeded with url: /index.fhtml (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f5070c56190>, 'Connection to 192.168.0.40 timed out. (connect timeout=15)'))
2023-08-08 06:15:37.391 WARNING (MainThread) [homeassistant.components.sensor] Updating kostal sensor took longer than the scheduled update interval 0:00:30
2023-08-08 06:16:17.399 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.kostal_piko_current_power is taking over 10 seconds
2023-08-08 06:16:22.422 ERROR (SyncWorker_0) [kostalpiko.kostalpiko] HTTPConnectionPool(host='192.168.0.40', port=80): Max retries exceeded with url: /index.fhtml (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f506b6b8090>, 'Connection to 192.168.0.40 timed out. (connect timeout=15)'))
2023-08-08 06:16:37.394 WARNING (MainThread) [homeassistant.components.sensor] Updating kostal sensor took longer than the scheduled update interval 0:00:30
2023-08-08 06:17:17.400 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.kostal_piko_current_power is taking over 10 seconds
2023-08-08 06:17:22.420 ERROR (SyncWorker_2) [kostalpiko.kostalpiko] HTTPConnectionPool(host='192.168.0.40', port=80): Max retries exceeded with url: /index.fhtml (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f506bbd82d0>, 'Connection to 192.168.0.40 timed out. (connect timeout=15)'))
2023-08-08 06:17:37.395 WARNING (MainThread) [homeassistant.components.sensor] Updating kostal sensor took longer than the scheduled update interval 0:00:30
2023-08-08 06:18:17.402 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.kostal_piko_current_power is taking over 10 seconds
2023-08-08 06:18:22.422 ERROR (SyncWorker_6) [kostalpiko.kostalpiko] HTTPConnectionPool(host='192.168.0.40', port=80): Max retries exceeded with url: /index.fhtml (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f506bb3b150>, 'Connection to 192.168.0.40 timed out. (connect timeout=15)'))
2023-08-08 06:18:37.397 WARNING (MainThread) [homeassistant.components.sensor] Updating kostal sensor took longer than the scheduled update interval 0:00:30
2023-08-08 06:19:17.403 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.kostal_piko_current_power is taking over 10 seconds
2023-08-08 06:19:22.424 ERROR (SyncWorker_1) [kostalpiko.kostalpiko] HTTPConnectionPool(host='192.168.0.40', port=80): Max retries exceeded with url: /index.fhtml (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f50942b9050>, 'Connection to 192.168.0.40 timed out. (connect timeout=15)'))
2023-08-08 06:19:37.398 WARNING (MainThread) [homeassistant.components.sensor] Updating kostal sensor took longer than the scheduled update interval 0:00:30
2023-08-08 06:20:17.407 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.kostal_piko_current_power is taking over 10 seconds
2023-08-08 06:20:22.423 ERROR (SyncWorker_3) [kostalpiko.kostalpiko] HTTPConnectionPool(host='192.168.0.40', port=80): Max retries exceeded with url: /index.fhtml (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f509405b090>, 'Connection to 192.168.0.40 timed out. (connect timeout=15)'))
2023-08-08 06:20:37.400 WARNING (MainThread) [homeassistant.components.sensor] Updating kostal sensor took longer than the scheduled update interval 0:00:30
pergolafabio commented 10 months ago

With the other integration, i sometimes see this:

2023-08-08 18:49:21.335 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.kostal_piko_current_power is taking over 10 seconds

Maybe a timeout or something, but it doesnt fail next time? I think your integration crashes when sometkind of timeout fails?