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

I decided to dig into custom Zigbee drivers a little bit and was testing two out on my Sengled G2 (E1C-NB7). The recently published Third Reality driver does not support the correct cluster for the power reporting. Then I found out your driver here specifically supports this Sengled plug. After playing with the options a bunch I found out it supports Energy and Power. I don't need Energy so I turned that off. It automatically reports for wattage changes which is I how I had it setup before.

I noticed now that with debug logging on it is reporting energy stats about every 30-60 seconds (which the driver is ignoring because I have it off). I cannot seem to make it stop. Should the driver be disabling this? I do see some "Failed" messages in logs as well when saving settings but not totally sure what is failing. I think the best config will be for it to report on watt changes only, no automatic interval, and no polling.

I am comfortable making changes to the driver but there is so much in this universal driver (and I am new to Zigbee code) its hard to track things down.

This is when saving preferences:

1 Like

Hi @jtp10181 !

This is probably my second Zigbee driver started initially a year and a half ago, and now the code needs serious refactoring, it became rather messy adding new stuff over time... : (

The driver was made for these Tuya plugs that do not report the power and the energy automatically, but require polling. Later I got some Tuya plugs that can be configured for automatic reporting, as well as one Frient plug to test with. I don't have any Sengled plugs, most of the other non-Tuya models fingerprints should be commented out in the code, I have added these while I have searched the net for information on other types of reporting plugs.

If the "Automatic Polling" option is switched off, the 'autoPoll' job should be unscheduled.. I will double check this again in the next days, this may not be working properly as almost all of my plugs require polling.

If you want to automatically report just the power and nothing else, make sure the " Automatic reporting configuration" option is switched on. Only then the reporting configuration command is sent to the device. However, I have not found yet how to disable the automatic reporting, if previously enabled. I will research in the next days, I think that the min/max/delta settings intended to disable the automatic reporting were somewhere in the ZCL specifications documents.

The 'Failed' debug log is for a Tuya specific initialization, that I can try to bypass when using the driver with non-Tuya pugs.

I have made some small changes in the dev.branch version 1.7.3, now if you enable only the power reporting, the Current States must be much cleaner - showing only the healthStatus, switch, and power. You may still see 'ignored voltage' or 'ignored energy' debug logs, as currently the driver refreshes once all the power cluster attributes several seconds after switching the plug on or off even if the periodic polling is disabled - this is to speed up the update of the power readings, as some plugs are too 'lazy' and send the zero power value long time after the plug was switched off.

For my reference later : )

1 Like

Ok, looks like maybe if I turn automatic reporting on, and set both values to 0 it should make it stop. Will give it a try. I think eventually I am going to make a stripped down version for a very basic plug driver that supports my Sengled plugs and two non metering Sonoff plugs. But this gives me lots of sample code to work with!

If I had to start from scratch, I would use Jonathan's driver as a base. Much better and cleaner code .. : )

You can still use this driver for tests - if you set the debug constant to true in the code, you can experiment with different settings for the reporting configuration :


Seems like the different manufacturers have different understandings and different implementations of the standards. You can quickly check whether the Sengled plugs accept disabling of the automatic energy or other attributes reporting or now.

1 Like

Looks like the Configure Reporting command with 65535 did the trick and shut off the energy reporting. Thanks!


I just tried one of the ajax Zignito zigbee plugs, cheap from amazon, only just found this driver in above post (kkossev = cheers) HE C7
It certainly is what I was looking for to monitor a couple of fridges/freezers.


Hey, if these ones don't work what is the best alternative. I want UK / Ireland plugs with power monitoring ideally zigbee

@user3633 the Ajax/Zignito plug from this post seems to be working OK, it should be UK version.

@rixlumb1 can you share the Amazon.co.uk link where you purchased it?

@user3633 @kkossev
This should be it, BUT the last 2 I just purchased from the same seller has bad firmware ID _TZ3000_okaz9tjs which is documented in kkossev driver for tuya ZigBee metering plug.
I sent them back as faulty compared with the previous 2.


So this is the bad firmware code not to get is it?

Thanks for coming back.

Yes, the previous 2 I bought were...and they perform fabulously, lots of features

I bought 4 of these:

and later on 4 from another seller with same description.
All 8 work fine.
No guarantee what's inside them though

Thanks for the suggestion. Seller won’t sell to Ireland :roll_eyes:

I think I found the same one on AliExpress, giving it a go. I'll update if it works.

Tim, you are using an older version of this driver. This Samsung plug does not report Energy, so you can disable the energy processing. It should also report the power, voltage and amperage automatically, so you could probably switch the periodic polling option off. I don't have Samsung plugs, but you can experiment with settings like these :

Can you update to the latest dev. version (the link from the second post) and check whether the automatic reporting configuration ( power change threshold, minimum and maximum automatic reporting periods) works with your Samsung plug? Which model is it (there are at least 3-4 different Samsung models produced during the last years).

sorry it took a bit
i upgraded to ver. 1.7.4 2023-04-22 is that right?
What am I looking for again... and do I need to turn on debug?
in the normal logs is
dev:1302023-05-11 08:27:33.668 AMinfoDryer voltage is 120 V

dev:1302023-05-11 08:12:32.970 AMinfoDryer voltage is 119 V

dev:1302023-05-11 07:40:38.933 AMinfoDryer voltage is 120 V

This is the link to the development branch :
The driver version is ver. 1.7.5 2023-05

You should be able to disable all the reporting that you don't really need ( including voltage ), and configure only the power reporting periods.

The latest dev. branch version 1.76. added support for this DIN rail switch :


and for this 3-phase circuit breaker :

Coming next : Tongou Zigbee Rail Switch (MCB ) MODEL TO-Q-SY2-JZT with a lot of options for tuning the current, voltage, power and temperature protection settings


Just share, I had installed latest driver from the second post of this thread. The device response as follows:

The Product: