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

ZHA plugs smartenergy_metering_summation not updated #59081

Closed
juhanjuku opened this issue Nov 4, 2021 · 20 comments
Closed

ZHA plugs smartenergy_metering_summation not updated #59081

juhanjuku opened this issue Nov 4, 2021 · 20 comments
Assignees

Comments

@juhanjuku
Copy link

The problem

Lately added smartenergy_metering_summation entity is updated only once after restart.
electrical_measurement works correctly. I have 5 different smart plugs and only Lonsonho updates energy entity normally. Shwaiger, Innr SP 120, BlitzWolf, Salus plugs are freezed (electrical_measurement updates correctly)
Same reported also by #34090 (comment)

What version of Home Assistant Core has the issue?

core-2021.10.6

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

ZHA

Link to integration documentation on our website

https://www.home-assistant.io/integrations/zha

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No errors or warning in logs

Additional information

image

@probot-home-assistant
Copy link

zha documentation
zha source
(message by IssueLinks)

@probot-home-assistant
Copy link

Hey there @dmulcahey, @Adminiuga, mind taking a look at this issue as it has been labeled with an integration (zha) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@Adminiuga
Copy link
Contributor

In ZHA device panel, press on reconfigure button for the affected devices.

Submit debug logs while it's reconfiguring

@juhanjuku
Copy link
Author

I got errors on reconfigure
CoreLog.txt

@juhanjuku
Copy link
Author

BlitzWolf
image
CoreLog_BlitzWolf.txt

@juhanjuku
Copy link
Author

image
CoreLog_Innr.txt

@erkr
Copy link

erkr commented Nov 4, 2021

Hi,
Reconfigure for SP120 gives for me exactly the same result as the previous comment.
The nice thing is that since I upgraded to core v2021.11.0. two new sensors where added for the SP120; volt and amp
AND these sensors now periodically update their values (not only after a restart)!
One issue still; two sensors report the wrong value (marked yellow in my picture):
sp120 sensors
The totaal value is counted in increments of 10Watts not kWatts,
The current seems to count in ca 0,6mA increments

@juhanjuku
Copy link
Author

Current multipliers seems to be problem for some plugs (sorry, it's not related to this thread)
Inkedscreen_LI

@erkr
Copy link

erkr commented Nov 4, 2021

Hi
Are you still on core-2021.10.6?
My metering sensors started to update periodically since I updated HA to core-2021.11.0.
The total counter of my SP120 updates every 30 minutes

@juhanjuku
Copy link
Author

I'm also now on latest core-2021.11.0
Not sure about update. Maybe it updates in steps and as I have now low current, energy counter is not increased enough?

image

@erkr
Copy link

erkr commented Nov 4, 2021

Hi
I see you have one metering sensor that is not available. I had the same in a previous update where the summation one was added. I then removed the old one.
Anyway in my case, since I updated to 2021.11.0 around 18h today, my new summation sensor started to periodically update. But I have a load of ca 30 watts:
image
I will check if it pauses updating without load and report you back on that.

@erkr
Copy link

erkr commented Nov 4, 2021

Confirmed: No update without load either

@erkr
Copy link

erkr commented Nov 5, 2021

Current multipliers seems to be problem for some plugs (sorry, it's not related to this thread)

Agreed, unless the reason for the wrong multipliers is related to the failures during reconfiguration.
I'm very happy with the progress made so far:

  • Metering Sensor now updates
  • Two missing sensors now added

@Adminiuga
Copy link
Contributor

No, divisor and multiplier are not related to reconfiguration errors. Device manufacturers are cheaping out implementing those correct

@erkr
Copy link

erkr commented Nov 5, 2021

Thx for clarifying. Let's hope for a zha quirk. Very happy the sensors are working now. Will fix the values with a template for now.

@github-actions github-actions bot added the stale label Dec 5, 2021
@goxlur
Copy link

goxlur commented Dec 10, 2021

I have tested the Blitzwolf plug (Tuya TS0121) with success using the upcoming zha quirks release. I have also added a quirk to fix the current and energy multipliers of the Innr SP120 plug.

@erkr
Copy link

erkr commented Dec 26, 2021

Innr SP120 has the correct multipliers with the latest quirk (core 2021.12.5)👍👍
My blitzwolf shp15 (tuya type ts011f) works fine, except for updating the total usage (metering summation in kWh). That only happens when restarting HA.

@juhanjuku
Copy link
Author

juhanjuku commented Dec 26, 2021

Seems that update problem is not only in zha. For Tasmota proposed solution is polling every minute.
Probably something similar will help also in zha. Unfortunately I don't know how to do this.
I asked new feature for such workaround 'https://community.home-assistant.io/t/zha-read-cluster-attributes-programatically/277958/3' but devs don't like this idea.
image

@erkr
Copy link

erkr commented Dec 28, 2021

The SP120 did originally not update the summation and I think that was fixed somehow via a quirk or ZHA update. Hopefully the same Fix can be applied for these tuya based plugs

@dmulcahey
Copy link
Contributor

dmulcahey commented Dec 29, 2021

please open individual issues on the zha device handler repo: https://github.com/zigpy/zha-device-handlers/issues for any plugs that remain affected by divisor / multiplier issues and ensure you provide all of the data requested in the issue template.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants