-
Notifications
You must be signed in to change notification settings - Fork 9
Description
Describe the bug
Domoticz registers a negative energy usage for the Shelly 1PM after a power outage in my home. This also occurs after a firmware update of the Shelly or very rarely because of unknown reasons. I encounter this issue with 4 shelly's.
It seems the internal counter of the Shelly resets. The symptoms seem logical with that in mind, but the Shelly App on the other hand will register the correct usage without a problem.
To Reproduce
Steps to reproduce the behavior:
- Register usage in Domoticz for a day. All will be fine.
- Turn off the power supply of the Shelly
- Turn on the power supply
- Domoticz will show a negative usage for the day of the outage
Expected behavior
Since the app knows the correct usage, you might expect the plugin might handle it as well. Maybe we can keep a separate counter in the plugin instead of trusting solely on the counter of the Shelly? Detecting a reset of the counter to 0 seems possible.
Screenshots
Negative usage in Domoticz:

Normal usage via Shelly App on Android:

Desktop (please complete the following information):
- 4x Shelly 1PM
- Domoticz 2021.1
- ShellyCloudPlugin v1.0.1
Additional context
If no possibilities for the plugin exist to workaround this issue, what might be the best solution in Domoticz to prevent this data from polluting the diagrams and statistics?