core: Wemo power consumption sensors not being reported when insight switch off
The problem
I was testing the new power related sensors feature for wemo switches (im using a couple insights) in the new 108.0 release… actually im using 108.1. When the switch is on, the power is reported correctly in the sensor. However when the switch is off, the sensor holds the last value and doesnt reset to 0 or whatever. I assume this is because of what im seeing in the wemo IOS app. When the switch is off, the app shows ‘–’ for current power consumption. Not sure what this translates to in the API, but its not ‘0’. So i think there needs to be some sort of interpretation that says if the switch is still present but is off AND switch not reporting power consumption, assume 0 or something like that. Its inaccurate to only hold and report the previous value (which was full power).
What is version of Home Assistant Core has the issue?
core-2021.8.1
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Core
Integration causing the issue
wemo
Link to integration documentation on our website
https://www.home-assistant.io/integrations/wemo/
Example YAML snippet
No response
Anything in the logs that might be useful for us?
no log messages related to this
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 83 (35 by maintainers)
I can confirm all my wemo plugs reset between 00:00:02 and 00:00:25 for the last even if they were in off state Great thanks for the fix!
Oh excellent, i will install it and let you know… greatly appreciated
Awesome news. Thanks for working on this with me!
It worked!! Right at midnight (with time zone set to -7) the today counters reset to 0!!! Want to see it Happen one more time but this is fantastic!!
I will stay right on 2021.8.8
Some more info… ive started working with some tuya-compatible topgreener plugs… using tuya convert you can easily put tasmota on there. These plugs also measure power AND they are the smaller single outlet format so they dont block the second plug. So far so good. Just throwing this out there because the wemo devices are not performing properly and wemo doesnt seem to have a solution so far.
Another interesting development. With the timesync timezone set to 0, both of them reset today at 5pm PST. So i figure. 5 plus 7h offset from UTC gets me to UTC time of midnight… so I may be on to something here. Maybe its the way the timezone thing is entered. Im going to leave it for another day and see if they reset at 5pm again and then play with the settings. Wemo is still helping out but havent come back with much yet.
So things did not reset when i expected them to… but i tweaked a couple more things and still testing… will report back
Thanks very much for that! That’s really helpful… Well i think i have everything set properly on my insight so let’s see if the counters reset at midnight tonight. Thanks for that.
A bit more… Seems you can read the time through both urn:Belkin:service:deviceinfo:1#GetInformation and urn:Belkin:service:metainfo:1#GetExtMetaInfo. You can set the time using both urn:Belkin:service:deviceinfo:1#GetDeviceInformation (notice this is different than first one, ‘getdeviceinformation’ vs ‘get information’, and you can also set the time with urn:Belkin:service:timesync:1#TimeSync.
The timesync action takes the following format:
The action GetDeviceInformation accepts the same format:
I think that would work great… just as an update, we are past 7pm PST here and the aggregate total daily power usage has NOT reset… so we’ll see if it does it at midnight… fingers crossed.
Might have gotten a little further. Im using the deviceinfoservices services and did this POST:
I got this back:
you can see the current time in there… and when i convert that time to human readable i get this:
And this is the correct time and timezone adjusted time. So perhaps that setting i did in the timesync service actually properly set the time and timezone.
ok some findings… i am using this POST call:
and its working… im only playing with the dst and timezone settings… but when do this, it seems to reset the daily power consumption value… check this graph out from home assistant… i just seemed to have reset it:
So i set some variables… and it took it but there is an odd catch… first off i sent this:
the first UTC value is epoch time in seconds where i am… the second timezone setting is PST (guessing here, its an INT value) and dst 0 (off)… it takes this… but there was one point where i had to set UTC first with timezone blank, and then set timezone.