deconz-rest-plugin: Tuya Smart Plug missing metering data (_TZ3000_cphmq0q7)

Describe the bug

I bought 4 Tuya Zigbee smart plugs and easily connected to Phoscon (running with Conbee II on Rpi4). I use them on my HomeKit setup via Homebridge. One of them worked perfectly with metering functionality but 3 of them doesn’t report metering data. Working one has _TZ3000_8nkb7mof vendor name and others has _TZ3000_cphmq0q7.

Steps to reproduce the behavior

  1. Start pairing a smart plug with _TZ3000_cphmq0q7 vendor name.
  2. Pair with with Phoscon GW
  3. Restart HomeBridge
  4. Check if you have consumption data on Eve Home app. (Or in HomeAssistant)

Expected behavior

I expect to see consumption data on Eve Home App or HomeAssistant.

Screenshots

Here is the list of devices in Phoscon App:

image

Detail screen of working one:

image

Detail screen of one of the non working devices (be aware this has version info):

image

Eve Home screenshot of working device:

image

Eve Home screenshot of one of the non-working devices:

image

Environment

  • Host system: Raspberry Pi
  • Running method: Raspbian / HomeBridge / homebridge-hue plugin / Eve Home App
  • Firmware version: 266b0700
  • deCONZ version: 2.10.04
  • Device: ConBee II
  • Do you use an USB extension cable: no
  • Is there any other USB or serial devices connected to the host system? If so: P1 adapter, USB Bluetooth

deCONZ Logs

I use headless deconz. I currently couldn’t figure out how to fetch debug logs. I’ll update if I can.

Additional context

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 3
  • Comments: 175 (6 by maintainers)

Most upvoted comments

Hello all,

Today I tried adding the mentioned switch/sensor to Deconz and showup to my Home Assistant frontend. However only the switch/plug is displayed. No information is shared about power consumption. I can however see the power consumption in the cluster information in Deconz.

It also appears that there is a new subversion of this device because the suffix is different: TZ3000_typdpbpg

Has anyone seen this type before and was able to get it to work?

Yep,but docker are not easy to use https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Compiling-the-REST-plugin-for-device-specific-testing

We will probably have some PR validated this WE, hopping for this one.

Oops - yes you are right, there was a second entity called Consumption xx

So don’t miss something ? (have corrected current) Have linked this issue with the good PR.

For update, I realy don’t know, we are realy late on them, but manup is working on a big improvement, so IDK if it will validate other smal PR before, in same time or after.

Adding a file to ~/.local/share/dresden-elektronik/deCONZ/devices/tuya with name _TZ3000_cphmq0q7.json and with content given by @Smanar here (by replacing model id and vendor with _TZ3000_cphmq0q7 ) solved my issue.

PS: I didn’t check the situation that @bigcookie mentioned above.

@Smanar Can you give some pointers on that?

And now for the rest of us (non-programmers). How do we get to enjoy this update? 🤗

hey people, today I received the same plugs 😄 I compiled the branch of @Smanar and readded the plugs and it works 👍 Thank you very much for your work!

This is the log while I added one of the Sockets (the Power 3 one):

13:42:01:462 Websocket disconnected 172.17.0.1:53718, state: 0, close-code: 1001, reason:
13:42:02:635 New websocket 172.17.0.1:53738 (state: 3)
13:42:08:169 send permit join, duration: 59
13:42:10:520 new node - ext: 0x00158d0006f25c27, nwk: 0x2C7B
13:42:12:919 new node - ext: 0x00158d00075fc545, nwk: 0x980B
13:42:13:523 unknown node 0x0C4314FFFE9AFDC3 (0x1909), lqi: 255
13:42:13:524 APS-DATA.indication from unknown node 0x0C4314FFFE9AFDC3
13:42:13:526 new node - ext: 0x0c4314fffe9afdc3, nwk: 0x1909
13:42:13:527 device announce 0x0C4314FFFE9AFDC3 (0x1909) mac capabilities 0x8E
13:42:13:528 device announce 0x0C4314FFFE9AFDC3 (0x1909) mac capabilities 0x8E
13:42:14:673 DB UPDATE device_descriptors SET data = x'01408e0210525200002c520000', timestamp = 1630762934 WHERE device_id = (SELECT id FROM devices WHERE mac = '0c:43:14:ff:fe:9a:fd:c3') AND endpoint = 0 AND type = 2
13:42:14:675 DB INSERT INTO device_descriptors (device_id, endpoint, type, data, timestamp) SELECT id, 0, 2, x'01408e0210525200002c520000', 1630762934 FROM devices WHERE mac = '0c:43:14:ff:fe:9a:fd:c3'
13:42:14:847 LightNode 6: On/Off plug-in unit 6 added
13:42:14:849 DB UPDATE device_descriptors SET data = x'0104010a010109000003000400050006000207040b00e001e00219000a00', timestamp = 1630762934 WHERE device_id = (SELECT id FROM devices WHERE mac = '0c:43:14:ff:fe:9a:fd:c3') AND endpoint = 1 AND type = 4
13:42:14:850 DB INSERT INTO device_descriptors (device_id, endpoint, type, data, timestamp) SELECT id, 1, 4, x'0104010a010109000003000400050006000207040b00e001e00219000a00', 1630762934 FROM devices WHERE mac = '0c:43:14:ff:fe:9a:fd:c3'
13:42:14:945 DB UPDATE device_descriptors SET data = x'f2e0a161000000012100', timestamp = 1630762934 WHERE device_id = (SELECT id FROM devices WHERE mac = '0c:43:14:ff:fe:9a:fd:c3') AND endpoint = 242 AND type = 4
13:42:14:946 DB INSERT INTO device_descriptors (device_id, endpoint, type, data, timestamp) SELECT id, 242, 4, x'f2e0a161000000012100', 1630762934 FROM devices WHERE mac = '0c:43:14:ff:fe:9a:fd:c3'
13:42:15:098 Add to group response for light 6. Status:0x00, capacity: 0
13:42:15:168 Skip idle timer callback, too early: elapsed 474 msec
13:42:15:500 SensorNode 2: Consumption 2 added
13:42:15:502 SensorNode 3: Power 3 added
13:42:15:504 discard double entry in binding queue (size: 2) for for 0x0C4314FFFE9AFDC3, cluster 0x0702
13:42:15:507 discard double entry in binding queue (size: 2) for for 0x0C4314FFFE9AFDC3, cluster 0x0B04
13:42:15:603 Bind response success for 0x0c4314fffe9afdc3 ep: 0x01 cluster: 0x0702
13:42:15:787 Bind response success for 0x0c4314fffe9afdc3 ep: 0x01 cluster: 0x0B04
13:42:16:254 verified group capacity: 255 and group count: 1 of LightNode 0x0c4314fffe9afdc3
13:42:16:254 0x0c4314fffe9afdc3 found group 0xFFF0
13:42:16:295 new node - ext: 0x00158d0006f3b127, nwk: 0x6F18
13:42:16:544 skip configure report for cluster: 0x0702 attr: 0x0000 of node 0x0C4314FFFE9AFDC3 (seems to be active)
13:42:16:545 skip configure report for cluster: 0x0702 attr: 0x0400 of node 0x0C4314FFFE9AFDC3 (seems to be active)
13:42:16:546 skip configure report for cluster: 0x0B04 attr: 0x050B of node 0x0C4314FFFE9AFDC3 (seems to be active)
13:42:16:546 skip configure report for cluster: 0x0B04 attr: 0x0505 of node 0x0C4314FFFE9AFDC3 (seems to be active)
13:42:16:547 skip configure report for cluster: 0x0B04 attr: 0x0508 of node 0x0C4314FFFE9AFDC3 (seems to be active)
13:42:16:696 Search sensors done
13:42:17:168 send permit join, duration: 0
13:42:19:101 [INFO] - No button map for: TS011F, unicast to: 0x0000, endpoint: 0x01, cluster: 0x0B04, command: 0x0A, payload: 050521F000, zclSeq: 4
13:42:19:101 ZCL attribute report 0x0C4314FFFE9AFDC3 for cluster: 0x0B04, ep: 0x01, frame control: 0x18, mfcode: 0x0000
13:42:24:465 ZCL attribute report 0x7CB03EAA0A035AB9 for cluster: 0x0006, ep: 0x03, frame control: 0x18, mfcode: 0x0000
13:42:25:989 ZCL attribute report 0x7CB03EAA0A042A58 for cluster: 0x0006, ep: 0x03, frame control: 0x18, mfcode: 0x0000
13:42:26:192 saved node state in 0 ms
13:42:26:193 sync() in 0 ms
13:42:28:979 ZCL attribute report 0x7CB03EAA0A042A58 for cluster: 0x0008, ep: 0x03, frame control: 0x18, mfcode: 0x0000
13:42:29:513 [INFO] - No button map for: TS011F, unicast to: 0x0000, endpoint: 0x01, cluster: 0x0B04, command: 0x0A, payload: 050521EF00, zclSeq: 7
13:42:29:514 ZCL attribute report 0x0C4314FFFE9AFDC3 for cluster: 0x0B04, ep: 0x01, frame control: 0x18, mfcode: 0x0000
13:42:40:756 ZCL attribute report 0x84FD27FFFE68DE2B for cluster: 0x0006, ep: 0x01, frame control: 0x18, mfcode: 0x0000
13:42:42:548 ZCL attribute report 0x00158D0006F3B127 for cluster: 0x0400, ep: 0x01, frame control: 0x18, mfcode: 0x0000
13:42:42:554 No presence sensor found for 0x00158D0006F3B127, endpoint: 0x01
13:42:42:555 ZCL attribute report 0x00158D0006F3B127 for cluster: 0x0406, ep: 0x01, frame control: 0x18, mfcode: 0x0000
13:42:46:171 saved node state in 0 ms
13:42:46:172 sync() in 0 ms
13:42:47:051 ZCL attribute report 0x84FD27FFFE68DE2E for cluster: 0x0006, ep: 0x01, frame control: 0x18, mfcode: 0x0000
13:42:47:210 Bind response success for 0x0c4314fffe9afdc3 ep: 0x01 cluster: 0x0006
13:42:47:489 [INFO] - No button map for: TS011F, unicast to: 0x0000, endpoint: 0x01, cluster: 0x0B04, command: 0x0A, payload: 050521F000, zclSeq: 9
13:42:47:490 ZCL attribute report 0x0C4314FFFE9AFDC3 for cluster: 0x0B04, ep: 0x01, frame control: 0x18, mfcode: 0x0000
13:42:49:170 Skip idle timer callback, too early: elapsed 705 msec
13:42:53:493 [INFO] - No button map for: TS011F, unicast to: 0x0000, endpoint: 0x01, cluster: 0x0B04, command: 0x0A, payload: 050521EF00, zclSeq: 10
13:42:53:494 ZCL attribute report 0x0C4314FFFE9AFDC3 for cluster: 0x0B04, ep: 0x01, frame control: 0x18, mfcode: 0x0000
13:42:58:180 Device TTL 2981 s flags: 0x7
13:42:59:499 [INFO] - No button map for: TS011F, unicast to: 0x0000, endpoint: 0x01, cluster: 0x0B04, command: 0x0A, payload: 050521F000, zclSeq: 11
13:42:59:500 ZCL attribute report 0x0C4314FFFE9AFDC3 for cluster: 0x0B04, ep: 0x01, frame control: 0x18, mfcode: 0x0000
13:43:05:504 [INFO] - No button map for: TS011F, unicast to: 0x0000, endpoint: 0x01, cluster: 0x0B04, command: 0x0A, payload: 050521EF00, zclSeq: 12
13:43:05:506 ZCL attribute report 0x0C4314FFFE9AFDC3 for cluster: 0x0B04, ep: 0x01, frame control: 0x18, mfcode: 0x0000
13:43:08:702 Bind response success for 0x0c4314fffe9afdc3 ep: 0x01 cluster: 0x0006
13:43:08:703 skip configure report for cluster: 0x0006 attr: 0x0000 of node 0x0C4314FFFE9AFDC3 (seems to be active)

tvnviewer_8LpoxVUb6C

One small thing that is not working correctly: The current should be divided by 1000 (the device reports mA) but it looks like in the REST API it is multiplied by 1000 instead (of course this is also the case in HA without correction). image

I think another thing missing (I could not find it in the REST API) is the Summation of Delivered from the Simple Metering Cluster but I only say this for the sake of completeness ^^ image

friendly greetings ~Horo

I just received 5 plugs in a same package. One of them was this TS011F, one other was a TS0121. What may be helpful is that this device is an exact copy of the TS0121 which is correctly reporting the two ZHAConsumption and ZHAPower sensors. The clusters in DeCONZ are also exactly the same: ts011f-ts0121