weltenwort / home-assistant-rct-power-integration

A Home Assistant custom component to integrate with RCT Power inverters.
MIT License
67 stars 15 forks source link

Set entities to unavailable when data fetching fails repeatedly #360

Open weltenwort opened 7 months ago

weltenwort commented 7 months ago

:notebook: Summary

Currently the entities will stay available once the coordinator has fetched the data successfully at least once. That means there's no way to tell if there's a persistent connection problem and the value is out of date. The coordinator and entity could keep track of the last successful fetch time and become "unavailable" when it failed repeatedly.

:heavy_check_mark: Acceptance criteria

3xo commented 7 months ago

Also related to #228 The option to choose whether to treat an unreachable device as an error or not would be helpful as well.

Pythonaire commented 6 months ago

One word to "data fetching fails". I using a python script to read data continuously in 10 minutes interval from the inverter unit (on local network). For testing purpose i configured the RCT Power Portal (cloud), that reads along the same TCP 8899 the data too. Then i'm facing massive data read failures on my local script. Only the deletion of the Power Portal account leds again to an error-free execution of the local script. However - The Power Portal and a local script don't work in parallel. I know, that's not the problem here, but can help. Maybe the TCP Stack on the inverter unit is limited.