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

Hi @DMurphy ,
Unfortunately, this driver does not support parent/child devices.

I have a very similar dual power outlet from Ikuu.
Have you tried the driver HERE ?

Note: The power reporting is COMBINED from both Outlets. You do not get individual Outlet power reporting

Thanks for the clarification

Thanks njanda.

It works somewhat ie it switches both endpoints and reports voltage. It might be enough for me to nut out the power part by trawling the debug logs and comparing to kkossev's driver

:crossed_fingers:

Thanks again,
Dan

1 Like

No, not yet. Send one to Hubitat guys and hopefully they can find a solution to the issue.

The latest developments branch version 1.7.2 was updated with experimental support for Third Reality power reporting plug Model Number: 3RSP02028BZ

If someone has these plugs and can test with this driver whether the automatic reporting works and whether the power-on settings ('last state') works, please comment here.

2 Likes

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 :

image

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!

2 Likes

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.
zignito_socket

2 Likes

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.

https://www.amazon.co.uk/dp/B09N457M8T?psc=1&ref=ppx_yo2ov_dt_b_product_details

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
image

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: