[BUG] Smart plug metering information only updated on HA restart
See original GitHub issueDescribe the bug I got some Aubess EU power plugs with the capability of measuring electricity usage. They all work fine, except for one thing. Information for the sensor “smartenergy_metering_summation_delivered” is only updated on every restart of HA. All other sensors electrical_measurement, electrical_measurement_rms_voltage and electrical_measurement_rms_current are updated in real time as expected.
To Reproduce Add the device in HA and have a device plugged in to this socket use some energy. The sensor will not update. Restart HA and wait a couple of minutes then then the sensor does update once, until the next restart of HA
Expected behavior I expect the sensor to update in (near) real-time
Additional context Zigbee device signature:
{
"node_descriptor": "NodeDescriptor(logical_type=<LogicalType.Router: 1>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 142>, manufacturer_code=4417, maximum_buffer_size=66, maximum_incoming_transfer_size=66, server_mask=10752, maximum_outgoing_transfer_size=66, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)",
"endpoints": {
"1": {
"profile_id": 260,
"device_type": "0x010a",
"in_clusters": [
"0x0000",
"0x0003",
"0x0004",
"0x0005",
"0x0006",
"0x0702",
"0x0b04",
"0xe000",
"0xe001"
],
"out_clusters": [
"0x000a",
"0x0019"
]
}
},
"manufacturer": "_TZ3000_gjnozsaz",
"model": "TS011F",
"class": "zhaquirks.tuya.ts011f_plug.Plug"
}
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:32
Top Results From Across the Web
Smart plug metering information only updated on HA restart
Hi,. I got some Aubess EU power plugs with the capability of measuring electricity usage. They all work fine, except for one thing....
Read more >Reset Your Amazon Smart Plug - Amazon Customer Service
If you have restarted your device and it still isn't working, reset your Amazon Smart Plug: Press and hold the button on the...
Read more >FAQ - Tasmota
I entered wrong Wi-Fi information~ · s1 is your first AP SSID · p1 is the first AP password · s2 and p2...
Read more >I can't establish a Wi-Fi connection to my Chromecast
Chromecast is powered on and plugged into a wall outlet. ... iOS or Android device, make sure you're using the most recent version...
Read more >Energy monitoring in Home Assistant - with or without power ...
We'll have to provide the power info since the smart plug does ... My Sonoff power meter only created sensor.xxxx_power and my UPS...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi,
Ok, I’d love to try it with the firmware upgrade, but I’m afraid I’m unable to do that. ZHA currently does not support this and if you want Tuya to take care of it, you need a Tuya zigbee hub, which I don’t have.
Having said that, the frustrating thing is that I found that a fix for this issue actually exists since December 2021: Add support for Polled clusters and use it for ts011f plug Metering
Unfortunately this pull request still isn’t merged, so we’re stuck with the non working TS011F plugs. (Well for power metering that is). I wouldn’t mind manually updateing the zigpy code but I can’t seem to find where it resides.
Then again, in this threade someone actually provided a workaround that works for me. This workaround makes use of the “ZHA Toolkit” so you need to install that first. (It’s in HACS). Having done that you can create automations to just do the pulling for you. Below is what I have for my 5 plugs:
Just change the name of your sensors and you’re good to go. Also, pulling every minute like I do in this examle may be a bit overkill, so maybe I’ll change it to every 5 minutes or so. But for now It doesn’t seem to have a negative impact on the network.
I will give it a try 👍 Update: @lpwevers yes this works for my Innr plus 🙏