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

Worked like a charm, driver updates without issue and is active on the metering plugs almost instantaneous

2 Likes

Any luck whith getting those to work?

I have a blue ring Tuya Zigbee 3.0 variant that works well, but for the sake of helping others out and testing i am willing to buy a NEO orange ring? Would that help?

1 Like

Question about whether this driver can be applied to a multi-endpoint double GPO like this:

s-l500
https://www.ebay.com.au/itm/165782692508

Device info:

Manufacturer: _TZ3000_dd8wwzcy
Endpoint 01 application: 43
Endpoint 01 endpointId: 01
Endpoint 01 idAsInt: 1
Endpoint 01 inClusters: 0004,0005,0006,0702,0B04,E001,0000
Endpoint 01 initialized: true
Endpoint 01 manufacturer: _TZ3000_dd8wwzcy
Endpoint 01 model: TS011F
Endpoint 01 outClusters: 0019,000A
Endpoint 01 profileId: 0104
Endpoint 01 stage: 4
Endpoint 02 application: unknown
Endpoint 02 endpointId: 02
Endpoint 02 idAsInt: 2
Endpoint 02 inClusters: 0004,0005,0006
Endpoint 02 initialized: true
Endpoint 02 manufacturer: unknown
Endpoint 02 model: unknown
Endpoint 02 profileId: 0104
Endpoint 02 stage: 4
Endpoint F2 application: unknown
Endpoint F2 endpointId: F2
Endpoint F2 idAsInt: 242
Endpoint F2 initialized: true
Endpoint F2 manufacturer: unknown
Endpoint F2 model: unknown
Endpoint F2 outClusters: 0021
Endpoint F2 profileId: A1E0
Endpoint F2 stage: 4

It is functional using "Generic Zigbee Multi-Endpoint Switch" built-in driver, in so far as that I can turn each switch on/off separately, but it does not report power usage.

It has inClusters 0702 and 0B04 which I believe is related to power usage statistics and I am see text related to these clusters in the debugging logs:

dev:6892023-02-04 15:37:47.970debugdescMap:[raw:993601070212000025B10300000000, dni:9936, endpoint:01, cluster:0702, size:12, attrId:0000, encoding:25, command:0A, value:0000000003B1, clusterInt:1794, attrInt:0]

...

dev:6892023-02-05 11:57:25.301debugdescMap:[raw:9936010B041E050521F10008052100000B05290000, dni:9936, endpoint:01, cluster:0B04, size:1E, attrId:0505, encoding:21, command:0A, value:00F1, clusterInt:2820, attrInt:1285, additionalAttrs:[[value:0000, encoding:21, attrId:0508, consumedBytes:5, attrInt:1288], [value:0000, encoding:29, attrId:050B, consumedBytes:5, attrInt:1291]]]

I tried changing the parent and child driver to " Tuya Zigbee Metering Plug" (previously installed and working for other devices) but this did not work for the Double GPO.

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