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

Hey @kkossev,

I recently bought a Zemismart SPM02 3-phase smart energy sensor. Looks like I could have chosen better, wish I’d seen this thread earlier.

I see the device listed in your driver, but unfortunately, I got mine from a different manufacturer: _TZE284_dikb3dp6. Most of the readings don’t make sense.

It looks like zigbee2mqtt already supports this variant, but I have no idea how to adapt that to your driver.

Would be great if you could add support for it too!
Here’s the device data:

Application 4A
Endpoint ID 01
In Clusters 0000,0004,0005,EF00,0000,ED00
Manufacturer _TZE284_dikb3dp6
Model TS0601
Out Clusters 0019,000A

Thanks in advance!

kkossev had posted that he would not be available for several months due to a private project. Although he may chime in.

I have limited knowledge of his drivers but have had some success in adding fingerprints to some of his drivers so I will try to help.

Open the drivers code for this driver add goto around line 181 and insert the fingerprint below and save the code.

Switch your device to this driver and press the configure/initialize button and see if it works.

I don't see the incluster 'ED00' used in any other fingerprint/device so that may present a problem as his driver may not support any data that is reported in that cluster.

fingerprint profileId:'0104', endpointId:'01', inClusters:'0000,0004,0005,EF00,0000,ED00', outClusters:'0019,000A', model:'TS0601', manufacturer:'_TZE284_dikb3dp6', deviceJoinName: 'Zemismart Real-time Smart Energy Monitor'  // SPM02

Thanks for the reply.

I already tried adding the fingerprint. The device is now recognized by the driver after re-pairing, but otherwise not much has changed. I’m getting null values, warnings, and energy cost readings in the hundreds of thousands of dollars. Energy usage also jumps up and down.

If @kkossev is unavailable, I’ll dig deeper into the driver myself. I’ve had some success before, although with smaller, simpler drivers.

Good luck, I use other Tuya ecosystem devices and helped kkossev to tweak his drivers.

In the meantime you could use Zigbee2MQTT, Node-Red and Node Red Nodes for Hubitat to bring the values into Hubitat.

You could run Linux/Node-Red on a Raspberry Pi3 or greater or any intel based pc (running Linux or Windows). I use used/refurb small form factor Dell/HP/Lenovo desktop pcs (any 3rd+ gen intel/8Gb/250Gb SSD) Can be had on Ebay for less then $100 and will run Linux fine. I would not use Windows though as Win10 is EOL and Win11 requires 8th gen or later, more $$$.

All you would need is a Zigbee dongle. The Sonoff Zigbee Dongle-P is well regarded.

Plus if you ever run into a device that is not supported by Hubitat it most likely will be supported by Zigbee2MQTT.

Hi @kkossev, first of all, thanks for this driver. I'm using it with a TS011F plug (_TZ3000_cehuw1lw) and it works fine except for the Google Home integration. It always appears off in Google Home, even when you turn it on from Google because it turns off after a few seconds. However, this doesn't happen in Hubitat or physically. Has anyone else had the same problem? Is there a solution? Thanks.

Has anyone got succesfully working Frient second gen Metering device EMIZB-141? With this driver device is found, it shows some kind of power usage, but mine has 400 value, i'm unable to find menu to change it. First gen worked like a champ, untul device itself stopped working.

Could you please provide more details about the specific device you have?

Firmware MT 1015-03D0-00030001
Manufacturer frient A/S
Model EMIZB-141

Product page: Electricity Meter Interface 2, LED

Right now using You're driver: https://raw.githubusercontent.com/kkossev/Hubitat/development/Drivers/Tuya%20Zigbee%20Metering%20Plug/Tuya%20Zigbee%20Metering%20Plug

Device is working, only option where change 1000 impulse value to 400 is missing.

1 Like

Thanks, I see the problem in the driver now.

2 Likes

@teet.niin I have updated the dev. branch of the driver to version 2.0.2 2025/08/17 5:30 PM
Please test and let me know if the Frient Monitor 2 EMIZB-141 pulse configuration is shown in the Preferences tab and takes effect.

1 Like

Thank You so much for doing this!

Tried with You're latest driver. Setting is there, it seems to have no effect. Changed several times to 400, but logs write nothing about it. Also, power usage is same. When multiplied by 2.5 then i get correct value.

Heres latest logs:
dev:4522025-08-17 19:05:40.006

info

Voolumõõtja configure()..

dev:4522025-08-17 19:05:40.004

info

Voolumõõtja configuring the switch and energy reporting..

dev:4522025-08-17 19:05:40.003

info

Voolumõõtja Auto polling is enabled, polling interval is 30 seconds

dev:4522025-08-17 19:05:39.970

info

Voolumõõtja Debug logging is false Description text logging is true

dev:4522025-08-17 19:05:39.969

info

Voolumõõtja Updating Voolumõõtja (frient Meter Interface) model EMIZB-141

dev:4522025-08-17 19:02:53.851

info

Voolumõõtja configure()..

dev:4522025-08-17 19:02:53.849

info

Voolumõõtja configuring the switch and energy reporting..

dev:4522025-08-17 19:02:53.848

info

Voolumõõtja Auto polling is enabled, polling interval is 30 seconds

dev:4522025-08-17 19:02:53.803

info

Voolumõõtja Debug logging is false Description text logging is true

dev:4522025-08-17 19:02:53.802

info

Voolumõõtja Updating Voolumõõtja (frient Meter Interface) model EMIZB-141

dev:4522025-08-17 19:02:38.692

info

Voolumõõtja power is 1687 W

dev:4522025-08-17 19:02:38.689

info

Voolumõõtja energy is 34.563 kWh, energyCost=$4.15 (rate=$0.12), duration=15.07 Mins

dev:4522025-08-17 19:01:22.425

info

Voolumõõtja power is 2203 W

dev:4522025-08-17 19:01:22.422

info

Voolumõõtja energy is 34.525 kWh, energyCost=$4.14 (rate=$0.12), duration=13.8 Mins

dev:4522025-08-17 19:00:00.153

info

Voolumõõtja hourlyEnergy is 34.344 kWh

dev:4522025-08-17 18:55:04.720

info

Voolumõõtja power is 1682 W

dev:4522025-08-17 18:55:04.717

info

Voolumõõtja energy is 34.344 kWh, energyCost=$4.12 (rate=$0.12), duration=7.51 Mins

dev:4522025-08-17 18:54:37.905

info

Voolumõõtja configure()..

dev:4522025-08-17 18:54:37.903

info

Voolumõõtja configuring the switch and energy reporting..

dev:4522025-08-17 18:54:37.902

info

Voolumõõtja Auto polling is enabled, polling interval is 30 seconds

dev:4522025-08-17 18:54:37.849

info

Voolumõõtja Debug logging is false Description text logging is true

dev:4522025-08-17 18:54:37.848

info

Voolumõõtja Updating Voolumõõtja (frient Meter Interface) model EMIZB-141

dev:4522025-08-17 18:50:13.607

info

Voolumõõtja power is 1680 W

dev:4522025-08-17 18:50:13.603

info

Voolumõõtja energy is 34.207 kWh, energyCost=$4.1 (rate=$0.12), duration=2.66 Mins

dev:4522025-08-17 18:50:05.720

info

Voolumõõtja configure()..

dev:4522025-08-17 18:50:05.718

info

Voolumõõtja configuring the switch and energy reporting..

dev:4522025-08-17 18:50:05.717

info

Voolumõõtja Auto polling is enabled, polling interval is 30 seconds

dev:4522025-08-17 18:50:05.675

info

Voolumõõtja Debug logging is false Description text logging is true

dev:4522025-08-17 18:50:05.674

info

Voolumõõtja Updating Voolumõõtja (frient Meter Interface) model EMIZB-141

dev:4522025-08-17 18:49:51.063

info

Voolumõõtja power is 1683 W

dev:4522025-08-17 18:49:51.058

info

Voolumõõtja energy is 34.197 kWh, energyCost=$4.1 (rate=$0.12), duration=2.28 Mins

dev:4522025-08-17 18:49:24.597

info

Voolumõõtja configure()..

dev:4522025-08-17 18:49:24.595

info

Voolumõõtja configuring the switch and energy reporting..

dev:4522025-08-17 18:49:24.594

info

Voolumõõtja Auto polling is enabled, polling interval is 30 seconds

dev:4522025-08-17 18:49:24.550

info

Voolumõõtja Debug logging is false Description text logging is true

dev:4522025-08-17 18:49:24.549

info

Voolumõõtja Updating Voolumõõtja (frient Meter Interface) model EMIZB-141

dev:4522025-08-17 18:47:44.457

info

Voolumõõtja configure()..

dev:4522025-08-17 18:47:44.456

info

Voolumõõtja configuring the switch and energy reporting..

dev:4522025-08-17 18:47:44.454

info

Voolumõõtja Auto polling is enabled, polling interval is 1 minutes

dev:4522025-08-17 18:47:44.420

info

Voolumõõtja Debug logging is false Description text logging is true

dev:4522025-08-17 18:47:44.418

info

Voolumõõtja Updating Voolumõõtja (frient Meter Interface) model EMIZB-141

dev:4522025-08-17 18:47:44.313

trace

Voolumõõtja sendZigbeeCommands : [he raw 0x3755 1 0x02 0x0000 {10 00 00 04 00 00 00 01 00 05 00 07 00 FE FF}, delay 150, he wattr 0x3755 0x02 0x0000 0xFFDE 0x20 {0D} {}, delay 50, zdo bind 0x3755 0x02 0x01 0x0006 {0015BC001B100D2C} {}, delay 251, he cr 0x3755 0x02 6 0 16 0 900 {}, delay 251, he raw 0x3755 1 0x02 0x0006 {10 00 08 00 0000}, delay 251, zdo bind 0x3755 0x02 0x01 0x0702 {0015BC001B100D2C} {}, delay 2000, he cr 0x3755 0x02 1794 0 37 30 900 {E80300000000} {}, delay 2000, he raw 0x3755 1 0x02 0x0702 {10 00 08 00 0000}, delay 252, zdo bind 0x3755 0x02 0x01 0x0B04 {0015BC001B100D2C} {}, delay 2000, he cr 0x3755 0x02 2820 1291 41 30 900 {0100} {}, delay 2000, he raw 0x3755 1 0x02 0x0B04 {10 00 08 00 0B05}, delay 254, zdo bind 0x3755 0x02 0x01 0x0B04 {0015BC001B100D2C} {}, delay 2000, he cr 0x3755 0x02 2820 1285 33 65535 65535 {FFFF} {}, delay 2000, he raw 0x3755 1 0x02 0x0B04 {10 00 08 00 0505}, delay 255, zdo bind 0x3755 0x02 0x01 0x0B04 {0015BC001B100D2C} {}, delay 2000, he cr 0x3755 0x02 2820 1288 33 65535 65535 {FFFF} {}, delay 2000, he raw 0x3755 1 0x02 0x0B04 {10 00 08 00 0805}, delay 256, zdo bind 0x3755 0x02 0x01 0x0B04 {0015BC001B100D2C} {}, delay 2000, he cr 0x3755 0x02 2820 768 33 65535 65535 {FFFF} {}, delay 2000, he raw 0x3755 1 0x02 0x0B04 {10 00 08 00 0003}, delay 257, he raw 0x3755 1 0x02 0x0B04 {10 00 08 00 1005}, delay 258, he wattr 0x3755 0x02 0x0702 0x0302 0x20 {00} {1015}, delay 251, he raw 0x3755 1 0x02 0x0702 {04 15 10 00 00 02 03}, delay 101, he wattr 0x3755 0x02 0x0702 0x0300 0x21 {03E8} {1015}, delay 250, he raw 0x3755 1 0x02 0x0702 {04 15 10 00 00 00 03}, delay 100]

dev:4522025-08-17 18:47:44.311

debug

Voolumõõtja sending pulse configuration : 1000

dev:4522025-08-17 18:47:44.305

debug

Voolumõõtja setting FrientEnergyMonitor pulseConfiguration (1000 )

After switching to Frient driver(which does not work) and back to Your Driver, it has some change, but reading is still as if 1000 pulses is active:
dev:4522025-08-17 19:26:26.948

info

Voolumõõtja Received device announcement, data=[FE, 55, 37, 2C, 0D, 10, 1B, 00, BC, 15, 00, 80] (Sequence Number:FE, Device network ID: 3755, Capability Information: 80)

dev:4522025-08-17 19:26:26.945

debug

Voolumõõtja parse: Desc Map: [raw:catchall: 0000 0013 00 00 0040 00 3755 00 00 0000 00 00 FE55372C0D101B00BC150080, profileId:0000, clusterId:0013, clusterInt:19, sourceEndpoint:00, destinationEndpoint:00, options:0040, messageType:00, dni:3755, isClusterSpecific:false, isManufacturerSpecific:false, manufacturerId:0000, command:00, direction:00, data:[FE, 55, 37, 2C, 0D, 10, 1B, 00, BC, 15, 00, 80]]

dev:4522025-08-17 19:26:26.938

debug

Voolumõõtja parse: description is catchall: 0000 0013 00 00 0040 00 3755 00 00 0000 00 00 FE55372C0D101B00BC150080

dev:4522025-08-17 19:26:26.930

info

Voolumõõtja Received device announcement, data=[FF, 55, 37, 2C, 0D, 10, 1B, 00, BC, 15, 00, 80] (Sequence Number:FF, Device network ID: 3755, Capability Information: 80)

dev:4522025-08-17 19:26:26.927

debug

Voolumõõtja parse: Desc Map: [raw:catchall: 0000 0013 00 00 0040 00 3755 00 00 0000 00 00 FF55372C0D101B00BC150080, profileId:0000, clusterId:0013, clusterInt:19, sourceEndpoint:00, destinationEndpoint:00, options:0040, messageType:00, dni:3755, isClusterSpecific:false, isManufacturerSpecific:false, manufacturerId:0000, command:00, direction:00, data:[FF, 55, 37, 2C, 0D, 10, 1B, 00, BC, 15, 00, 80]]

dev:4522025-08-17 19:26:26.920

debug

Voolumõõtja parse: description is catchall: 0000 0013 00 00 0040 00 3755 00 00 0000 00 00 FF55372C0D101B00BC150080

dev:4522025-08-17 19:26:26.826

info

Voolumõõtja Received device announcement, data=[FC, 55, 37, 2C, 0D, 10, 1B, 00, BC, 15, 00, 80] (Sequence Number:FC, Device network ID: 3755, Capability Information: 80)

dev:4522025-08-17 19:26:26.823

debug

Voolumõõtja parse: Desc Map: [raw:catchall: 0000 0013 00 00 0040 00 3755 00 00 0000 00 00 FC55372C0D101B00BC150080, profileId:0000, clusterId:0013, clusterInt:19, sourceEndpoint:00, destinationEndpoint:00, options:0040, messageType:00, dni:3755, isClusterSpecific:false, isManufacturerSpecific:false, manufacturerId:0000, command:00, direction:00, data:[FC, 55, 37, 2C, 0D, 10, 1B, 00, BC, 15, 00, 80]]

dev:4522025-08-17 19:26:26.815

debug

Voolumõõtja parse: description is catchall: 0000 0013 00 00 0040 00 3755 00 00 0000 00 00 FC55372C0D101B00BC150080

dev:4522025-08-17 19:25:18.030

info

Voolumõõtja power is 1842 W

dev:4522025-08-17 19:25:18.027

debug

Voolumõõtja power Instantaneous Demand (0x0702:0400) raw value = 1842

dev:4522025-08-17 19:25:18.026

info

Voolumõõtja energy is 35.171 kWh, energyCost=$7.5 (rate=$0.21326), duration=7.3 Mins

dev:4522025-08-17 19:25:17.923

debug

Voolumõõtja energy_total=35.171, state.lastResetEnergy=0.0

dev:4522025-08-17 19:25:17.919

debug

Voolumõõtja parse: Desc Map: [raw:37550207021E00002563890000000000042A320700, dni:3755, endpoint:02, cluster:0702, size:1E, attrId:0000, encoding:25, command:0A, value:000000008963, clusterInt:1794, attrInt:0, additionalAttrs:[[value:000732, encoding:2A, attrId:0400, consumedBytes:6, attrInt:1024]]]

dev:4522025-08-17 19:25:17.907

debug

Voolumõõtja parse: description is read attr - raw: 37550207021E00002563890000000000042A320700, dni: 3755, endpoint: 02, cluster: 0702, size: 1E, attrId: 0000, encoding: 25, command: 0A, value: 63890000000000042A320700

dev:4522025-08-17 19:25:17.692

info

Voolumõõtja Received device announcement, data=[FA, 55, 37, 2C, 0D, 10, 1B, 00, BC, 15, 00, 80] (Sequence Number:FA, Device network ID: 3755, Capability Information: 80)

dev:4522025-08-17 19:25:17.688

debug

Voolumõõtja parse: Desc Map: [raw:catchall: 0000 0013 00 00 0040 00 3755 00 00 0000 00 00 FA55372C0D101B00BC150080, profileId:0000, clusterId:0013, clusterInt:19, sourceEndpoint:00, destinationEndpoint:00, options:0040, messageType:00, dni:3755, isClusterSpecific:false, isManufacturerSpecific:false, manufacturerId:0000, command:00, direction:00, data:[FA, 55, 37, 2C, 0D, 10, 1B, 00, BC, 15, 00, 80]]

dev:4522025-08-17 19:25:17.681

debug

Voolumõõtja parse: description is catchall: 0000 0013 00 00 0040 00 3755 00 00 0000 00 00 FA55372C0D101B00BC150080

dev:4522025-08-17 19:24:45.444

trace

Voolumõõtja sendZigbeeCommands : [he raw 0x3755 1 0x02 0x0000 {10 00 00 04 00 00 00 01 00 05 00 07 00 FE FF}, delay 150, he wattr 0x3755 0x02 0x0000 0xFFDE 0x20 {0D} {}, delay 50, zdo bind 0x3755 0x02 0x01 0x0006 {0015BC001B100D2C} {}, delay 251, he cr 0x3755 0x02 6 0 16 0 900 {}, delay 251, he raw 0x3755 1 0x02 0x0006 {10 00 08 00 0000}, delay 251, zdo bind 0x3755 0x02 0x01 0x0702 {0015BC001B100D2C} {}, delay 2000, he cr 0x3755 0x02 1794 0 37 30 900 {E80300000000} {}, delay 2000, he raw 0x3755 1 0x02 0x0702 {10 00 08 00 0000}, delay 252, zdo bind 0x3755 0x02 0x01 0x0B04 {0015BC001B100D2C} {}, delay 2000, he cr 0x3755 0x02 2820 1291 41 30 900 {0100} {}, delay 2000, he raw 0x3755 1 0x02 0x0B04 {10 00 08 00 0B05}, delay 254, zdo bind 0x3755 0x02 0x01 0x0B04 {0015BC001B100D2C} {}, delay 2000, he cr 0x3755 0x02 2820 1285 33 65535 65535 {FFFF} {}, delay 2000, he raw 0x3755 1 0x02 0x0B04 {10 00 08 00 0505}, delay 255, zdo bind 0x3755 0x02 0x01 0x0B04 {0015BC001B100D2C} {}, delay 2000, he cr 0x3755 0x02 2820 1288 33 65535 65535 {FFFF} {}, delay 2000, he raw 0x3755 1 0x02 0x0B04 {10 00 08 00 0805}, delay 256, zdo bind 0x3755 0x02 0x01 0x0B04 {0015BC001B100D2C} {}, delay 2000, he cr 0x3755 0x02 2820 768 33 65535 65535 {FFFF} {}, delay 2000, he raw 0x3755 1 0x02 0x0B04 {10 00 08 00 0003}, delay 257, he raw 0x3755 1 0x02 0x0B04 {10 00 08 00 1005}, delay 258, he wattr 0x3755 0x02 0x0702 0x0302 0x20 {00} {1015}, delay 251, he raw 0x3755 1 0x02 0x0702 {04 15 10 00 00 02 03}, delay 101, he wattr 0x3755 0x02 0x0702 0x0300 0x21 {0190} {1015}, delay 250, he raw 0x3755 1 0x02 0x0702 {04 15 10 00 00 00 03}, delay 100]

dev:4522025-08-17 19:24:45.442

debug

Voolumõõtja sending pulse configuration : 400

dev:4522025-08-17 19:24:45.438

debug

Voolumõõtja setting FrientEnergyMonitor pulseConfiguration (400 )

dev:4522025-08-17 19:24:45.432

debug

Voolumõõtja sending setEnergyMeterMode electricity key=0

dev:4522025-08-17 19:24:45.429

debug

Voolumõõtja setting frientEnergyMeterMode to electricity (0)

dev:4522025-08-17 19:24:45.424

debug

Voolumõõtja configureReporting operation=Disable, measurement=PowerFactor, minTime=30,

Let's make one more try: same version '2.0.2', time stamp '2025/08/19 8:29 PM'

Will the power and energy reporting be accurate?

1 Like

With 1000 I get correct reading. With 400 pulse i get 2.5X bigger reading. Multiplier is used wrong at the moment.

Sorry, I'm not entirely sure that I understand what works and what doesn't....
Since I don't have this device, I'm not very confident about the changes I made in the code.

If the energy reading is correct with this setting, is the latest driver version usable or not?

Right now it works. Device emits 400 pulse, with 400 setting I get 2.5 times higher value. Lets say Energy usage is 1000w, instead I can see 2500w. With wrong setting 1000, I get correct value. It does not bother me.

OK, if it works with this workaround, lets leave it this way for now. Hopefully, this issue will be fixed in the HE in-built driver in the future.

1 Like

Thank You very much!

1 Like

I bought a 4 pack of Nous power metering plugs off of Amazon.
I foolishly tested that the on/off works but not the power metering
The device is _TZ3210_ddigca5n
image

I updated to the latest development version 2.0.2 (Tuya Metering Plus) but I don't see that device mentioned ...hoping you could add someday : )
Thanks
Tim

um ..well I'm partially wrong.... the current registers after 10 seconds and then when I turn the blender off, after 30 seconds it drops to 0.
The energy stays at 0.