Skip to content

Plugin cannot handle the reset of the internal counter of Shelly #25

@sauermouth

Description

@sauermouth

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:

  1. Register usage in Domoticz for a day. All will be fine.
  2. Turn off the power supply of the Shelly
  3. Turn on the power supply
  4. 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:
image

Normal usage via Shelly App on Android:
image

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions