[RELEASE] Tuya Zigbee Metering Plug (w/ healthStatus)

Thanks for the quick bug fix!

Summary

image


image

Summary

dev:6522022-09-11 01:26:17.975 pminfoKettle voltage is 241 V

dev:6522022-09-11 01:25:18.043 pminfoKettle voltage is 242 V

dev:6522022-09-11 01:24:17.938 pminfoKettle amperage is 0.023 A

dev:6522022-09-11 01:24:17.935 pminfoKettle voltage is 240 V

dev:6522022-09-11 01:24:17.932 pminfoKettle power is 0 W

dev:6522022-09-11 01:23:36.193 pminfoKettle energy is 0.07 kWh energyCost=0.02 (rate=0.282)

dev:6522022-09-11 01:23:23.247 pminfoKettle energy is 0.06 kWh energyCost=0.02 (rate=0.282)

dev:6522022-09-11 01:23:17.922 pminfoKettle amperage is 11.786 A

dev:6522022-09-11 01:23:17.920 pminfoKettle voltage is 236 V

dev:6522022-09-11 01:23:17.917 pminfoKettle power is 2812 W

dev:6522022-09-11 01:23:10.307 pminfoKettle energy is 0.05 kWh energyCost=0.01 (rate=0.282)

dev:6522022-09-11 01:22:58.365 pminfoKettle energy is 0.04 kWh energyCost=0.01 (rate=0.282)

dev:6522022-09-11 01:22:45.438 pminfoKettle energy is 0.03 kWh energyCost=0.01 (rate=0.282)

dev:6522022-09-11 01:22:32.542 pminfoKettle energy is 0.02 kWh energyCost=0.01 (rate=0.282)

dev:6522022-09-11 01:22:23.348 pminfoKettle amperage is 11.949 A

dev:6522022-09-11 01:22:23.345 pminfoKettle voltage is 242 V

dev:6522022-09-11 01:22:23.343 pminfoKettle power is 2850 W

dev:6522022-09-11 01:22:19.561 pminfoKettle energy is 0.01 kWh energyCost=0.0 (rate=0.282)

dev:6522022-09-11 01:22:17.823 pminfoKettle Kettle was turned on [physical]

dev:6522022-09-11 01:22:12.025 pminfoKettle voltage is 240 V

dev:6522022-09-11 12:08:10.174 pminfoKettle voltage is 240 V

dev:6522022-09-11 12:07:10.211 pminfoKettle voltage is 241 V

dev:6522022-09-11 12:01:23.262 pminfoKettle Energy (total:9.1 kWh) was reset on 2022-09-11 12:01:23.244

dev:6522022-09-11 12:01:23.254 pminfoKettle energy is 0.0 kWh energyCost=0.0 (rate=0.282)

dev:6522022-09-11 12:01:21.111 pminfoKettle energy is 9.1 kWh energyCost=1.09 (rate=0.282)

dev:6522022-09-11 12:01:18.789 pminfoKettle refresh()...

dev:6522022-09-11 12:01:15.279 pminfoKettle energy price was set to 0.282 on 2022-09-11 12:01:15.278

dev:6522022-09-11 12:01:11.963 pminfoKettle energy is 9.1 kWh energyCost=1.09 (rate=0.12)

dev:6522022-09-11 12:01:11.768 pminfoKettle voltage is 240 V

dev:6522022-09-11 12:01:09.940 pminfoKettle Kettle switch is off

dev:6522022-09-11 12:01:09.465 pminfoKettle refresh()...

dev:6522022-09-11 12:01:09.460 pminfoKettle configure()..

dev:6522022-09-11 12:01:09.459 pminfoKettle configuring the switch and energy reporting..

dev:6522022-09-11 12:01:09.458 pminfoKettle Auto polling is enabled, polling interval is 60 seconds

dev:6522022-09-11 12:01:09.420 pminfoKettle Debug logging is false Description text logging is true

dev:6522022-09-11 12:01:09.419 pminfoKettle Updating Kettle (Ajax Socket) model TS011F presence: present AlwaysOn is false

dev:6522022-09-11 12:01:09.317 pminfoKettle Initialize()...

1 Like

I really like these energy graphs... but the complex RM5 rules just scare me...
Can someone please share some simple RM5 rules that you are using with the latest development version to show "daily" and "hourly" energy consumption and corresponding costs if possible?
Thanks

If you are not in a hurry, better wait until the next weekend, hopefully then I will have a simpler solution.

2 Likes

No rush, take your time.
I think, with this good news I will order a few more Ajax Zignito Zigbee Plugs as they seem to be the way forward with your drivers, and get rid of my WiFi plugs!

1 Like

A sneak peek of the next version :

image image

4 Likes

I've been running version 1.6.0 (which includes the energy calculation) for several days now, no issues have been observed so I have updated the main branch code on Github now. I haven't triggered the automatic HPM updates yet, I will do it after finishing the testing of the next version.

The development branch (link in the second post) was updated to version 1.6.1 which includes the option to generate an html attribute, ready to be displayed on the HE dashboard as in the picture above. The presence and the switch (on/off) attributes are always shown, the inclusion of the rest (voltage, amperage, power, energy, cost) depend on whether the corresponding attribute individual switches are enabled or disabled.

The generation of the HTML attribute is disabled by default. It is enabled from a new switch in the Preferences section:
image

All credits for the HTML formatting code 'borrowed' by me from an earlier version of the excellent Hub Information driver go to @thebearmay ! :slight_smile:

3 Likes

Thanks for adding the HTML attributes to the driver; there is no need to create separate apps for the HTML attributes now!


I just need some nice graphs now to display the hourly and daily energy usage.
EDIT: events page looks cool as well!

1 Like

Gutted that my plugs don't work.
.
Great work here though.

1 Like

I took the risk and purchased two more plugs from Amazon.
Will see how it goes!

3 Likes

FYI...the outlet that didn't work from AliExpress, I requested a refund and provided details, the seller then asked me to provide a video which I did ...but what was really cool is that AliExpress stepped in and forced a refund. So the great thing is you can try these inexpensive devices and AliExpress will get you a refund if it doesn't work. I've since ordered 2 more for a total of $15 (amazing) from a different supplier (based on the link provided at the top)- should have done that the first time : )
Anxious to try the new driver with Energy costs although it takes a long time to get these

BTW, this driver should work with any Zigbee plugs which report power and energy using the standard Zigbee clusters.

Has anyone tried using it with devices different than Tuya?

I can't find many Zigbee reporting/metering plugs available at a reasonable price from Europe / UK. 'Reasonable price' for me is something that is up to 50% more expensive than the AliExpress stuff..

Anything else than the Samsung Zigbee plug?

Unfortunately, I'm continuing to think that this may a wifi route.

https://www.amazon.co.uk/Tenda-SP9-Monitoring-Control-Required/dp/B09TW3T914/ref=mp_s_a_1_18?crid=Q1DLFQIUQWXW&keywords=zwave%2Benergy%2Bmonitor&qid=1663221464&sprefix=Z%2Bwave%2Bener%2Caps%2C146&sr=8-18&th=1&psc=1

This WiFi metering plug is Tuya again.

And so, same problems?

Just changed my Innr SP222 over to this driver - it appears to work the same as it did with the generic. It's not power reporting but then I am not sure it ever did.

With the Frient Smart Cable it does everything - power, voltage, amperage, presence etc

Ikea Tradfri it works but just turns it on and off, nothing extra.

In conclusion I will leave the Frient on your driver for the time being but change the other two back to generic.

1 Like

Thank you for the test - the Frient Plug Mini at a price of 35 Euro FOB Germany is something that I will consider to buy. For one of my applications I need a smart socket that I can trust, when the specs say "10A Constant Charge".

@djh_wolf I am not aware of random shut-off problems with Tuya WiFi sockets. I can't say they will not switch off if the mains voltage exceeds 250V, but at least the other reason of the random shut-offs (due to the Zigbee module specific batch) does not apply for the WiFi Tuya plugs. But the WiFi models are of no interest for me.

@Kkosev

Noted. As such, would you know if these wifi plugs would work, or would they potentially require.another driver?

If they'll work with this, I'm likely just to purchase due to cost

@kkossev your metering driver seems to at first glance work with the zigbee portion of these old but power reporting Iris plugs. Their zwave piece was not very good to begin with and not worth the trouble to use.

Their big downside from my experience was they don't play well with Xiaomi\Aquara devices.

Summary

image

1 Like

I tried it on the US Samsung plug that comes in the kits... I'm not home so i cant start the dryer but the voltage seems off by 10x
image

and with dryer on
image

I think the power is high due to the order of 10 on voltage

Here is the data for the device
image

I've posted here to avoid a thread derailment

1 Like