torbennehmer / hacs-e3dc

Homeassistant E3DC Integration
GNU Affero General Public License v3.0
53 stars 8 forks source link

History data polling (today metrics) throw errors at midnight #130

Open torbennehmer opened 3 months ago

torbennehmer commented 3 months ago

System Health details

follow up by maintainer

Checklist

Describe the issue

At midnight, there is a window of a few minutes, where get_db_data_timestamp throws errors for yet unknown reasons. Apparently, this can only be debugged at midnight, making this a pain to solve. 3.6.3 handles these errors gracefully, with the side effect that the daily data is updated a few minutes late. You'll therefore see the previous day's consumption until something like 5 minutes after midnight.

An additional grace period handling should be introduced for the first few minutes into the new day.

Reproduction steps

Just look at the logs at midnight. Examples can be found at

Debug logs

follow up by maintainer

Diagnostics dump

follow up by maintainer

Phoenix-DH commented 3 months ago

Will have a look.

Phoenix-DH commented 3 months ago

No error messages this night at my end! Thanks.

Phoenix-DH commented 3 months ago

Oh what I just saw, no error, but warning:

Logger: custom_components.e3dc_rscp.coordinator Source: custom_components/e3dc_rscp/coordinator.py:225 integration: E3DC Remote Storage Control Protocol (Git) (documentation, issues) First occurred: 12:00:53 AM (2 occurrences) Last logged: 12:02:03 AM

Failed to load daily stats, not updating data: Communication Failure: Failed to send data