Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] total_consumption is wrong for shelly 2.5 on rolling mode with CoAP/mDns #575

Open
GoNzCiD opened this issue Aug 26, 2021 · 6 comments
Assignees
Labels
bug Something isn't working fixed

Comments

@GoNzCiD
Copy link

GoNzCiD commented Aug 26, 2021

Environment

  • ShellyForHASS release with the issue: 0.2.2
  • Last working ShellyForHASS release (if known): is the first time I use it.
  • Home Assistant Core release with the issue: core-2021.8.8
  • Operating environment (Home Assistant/Supervised/Docker/venv): docker

Describe the bug

Working devices with CoAP/mDns in the same LAN, with a Shelly 2.5 in roller mode, the total_consumption attribute is swapping the value constantly (with 2/3 seconds frequency).

For instance, it swaps constantly between 0.006 kWh and 0.015 kWh meanwhile the cover is stopped.

Steps to Reproduce

Just add a Shelly 2.5 device in roller mode and add the total_consumption sensor, just watch the sensor value.
A copy of the YAML shelly config:

discovery: false
version: false 
username: !secret shelly_username
password: !secret shelly_userpassword
id_prefix: ''
igmp_fix: true
additional_information: true
power_decimals: 2
scan_interval: 5
upgrade_switch: false
settings:
  total_consumption: { decimals: 3 , div: 1000, unit: 'kWh' }
attributes:
  - has_firmware_update
devices:
  - id: 66A512 
    entity_id: living_cover
    sensors:
      - current_consumption
      - total_consumption

Expected behavior

The value should be the same (or grow slowly when the cover works and consume more energy).

Screenshots

Traceback/Error logs

No errors in logs

Additional context

I also try to make a clean installation in develop environment (running into a ubuntu VM) running the HA solution (stable version) and just add the minimal config to setup the cover.
Since it is in a sepparate VLAN and force the discovery by the IP (discover_by_ip) the value doesn't change and seems OK, so I suppose it only happens with the CoAP/mDns use mode.

@Arman-GeDon
Copy link

+1 for this request

@d3m3trius
Copy link

In roller mode shelly API return a two meter values that present the consumption of each relay separately, as shown in the following json that represent the status:
immagine

As you can see the two values are different between the two channels. The component should take the sum of the two "total" field to calculate the total consumption of the roller, but it probably it just get the value alternatively from one or the other channel, returning this kind of data that is totally wrong and useless.

immagine

@hakana hakana self-assigned this Apr 30, 2022
@hakana hakana added bug Something isn't working fixed labels Apr 30, 2022
@hakana hakana added this to the 1.0.0 (Beta 2) milestone Apr 30, 2022
@Arman-GeDon
Copy link

The bug is still in 1.0.0 beta 2

@t-solak
Copy link

t-solak commented Jun 8, 2022

same here unfortunately, in 1.0.0 as well as 1.0.0 b2.

@d3m3trius
Copy link

the bug is marked as fixed but it is not!

@germanotero
Copy link

2024, still same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed
Projects
None yet
Development

No branches or pull requests

6 participants