zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

Tuya TS011F_plug_1 display Null as sum of consumed energy

Open evilmumi opened this issue 1 year ago • 21 comments

What happened?

The plug is not sending a value as energy: grafik grafik i have tried to reset count via dev console - no change. Also tried to play with calibration settings or something - no change.

Data: {"id":45,"type":"Router","ieeeAddr":"0xa4c1384b40863719","nwkAddr":54607,"manufId":4417,"manufName":"_TZ3000_cicwjqth","powerSource":"Mains (single phase)","modelId":"TS011F","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":266,"inClusterList":[0,3,4,5,6,1794,2820,57344,57345],"outClusterList":[25,10],"clusters":{"haElectricalMeasurement":{"attributes":{"activePower":0,"rmsVoltage":229,"rmsCurrent":0}},"genBasic":{"attributes":{"modelId":"TS011F","manufacturerName":"_TZ3000_cicwjqth","powerSource":1,"zclVersion":3,"appVersion":116,"stackVersion":0,"hwVersion":1,"swBuildId":""}},"genOnOff":{"attributes":{"32768":0,"moesStartUpOnOff":0,"tuyaBacklightMode":0,"onOff":1}},"seMetering":{"attributes":{"currentSummDelivered":[0,423]}}},"binds":[{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0x00124b0024c2b4d0","endpointID":1},{"cluster":2820,"type":"endpoint","deviceIeeeAddress":"0x00124b0024c2b4d0","endpointID":1},{"cluster":1794,"type":"endpoint","deviceIeeeAddress":"0x00124b0024c2b4d0","endpointID":1}],"configuredReportings":[],"meta":{}}},"appVersion":116,"stackVersion":0,"hwVersion":1,"swBuildId":"","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1722405323108}

any more information / logs needed?

What did you expect to happen?

No response

How to reproduce it (minimal and precise)

No response

Zigbee2MQTT version

1.39.0

Adapter firmware version

20230507

Adapter

SONOFF Zigbee 3.0 USB Dongle Plus

Setup

docker container

Debug log

No response

evilmumi avatar Jul 31 '24 06:07 evilmumi

still same in 1.39.1

evilmumi avatar Aug 02 '24 07:08 evilmumi

Same...

JamesDAdams avatar Sep 11 '24 03:09 JamesDAdams

When pressing the configure (yellow refresh) button on the frontend, does this succeed?

Koenkk avatar Sep 12 '24 18:09 Koenkk

I get: grafik grafik

evilmumi avatar Sep 13 '24 05:09 evilmumi

Could you check if the issue is fixed with the following external converter:

  • save this as file next to configuration.yaml as ext_converter.js
  • add it to configuration.yaml:
external_converters:
  - ext_converter.js
  • start z2m,
  • in the frontend, check if the description of this device now ends with CUSTOM (this indicates the external converter has been loaded correctly)
  • check if configure succeeds now

Koenkk avatar Sep 14 '24 18:09 Koenkk

log: [2024-09-19 09:23:16] info: z2m: Loaded external converter 'ext_converter.js' no custom in description: image [2024-09-19 09:23:19] error: z2m: Failed to configure 'Tuya_Gartenpumpe', attempt 1 (Error: ZCL command 0xa4c1384b40863719/1 seMetering.configReport([{"attribute":"currentSummDelivered","minimumReportInterval":5,"maximumReportInterval":3600,"reportableChange":[1,1]}], {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"reservedBits":0,"writeUndiv":false}) failed (Status 'UNSUPPORTED_ATTRIBUTE') at Endpoint.checkStatus (/app/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:347:28) at Endpoint.zclCommand (/app/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:916:26) at Endpoint.configureReporting (/app/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:648:9) at Object.currentSummDelivered (/app/node_modules/zigbee-herdsman-converters/src/lib/reporting.ts:128:5) at configure (/app/data/extension/externally-loaded.js:61:9) at Object.configure (/app/node_modules/zigbee-herdsman-converters/src/index.ts:193:21) at Configure.configure (/app/lib/extension/configure.ts:125:13) at EventEmitter.wrappedCallback (/app/lib/eventBus.ts:174:17))

evilmumi avatar Sep 19 '24 07:09 evilmumi

UNSUPPORTED_ATTRIBUTE indicates it doesn't support reporting the energy, does it work when reading via the dev console? If yes, then we need to poll it

Screenshot 2024-09-19 at 21 50 18

Koenkk avatar Sep 19 '24 19:09 Koenkk

if i do so i receive: grafik

evilmumi avatar Sep 20 '24 07:09 evilmumi

UNSUPPORTED_ATTRIBUTE indicated this device doesn't support it. To confirm this you would have to check with the Tuya gateway. I think there is little we can do from the z2m side.

Koenkk avatar Sep 20 '24 21:09 Koenkk

hi , what excatly do you mean with Tuya gateway?

evilmumi avatar Sep 23 '24 13:09 evilmumi

I mean testing if it work with the original Tuya gateway

Koenkk avatar Sep 23 '24 18:09 Koenkk

I have a couple of these power plugs (slightly different models, _TZ3000_gjnozsaz and _TZ3000_w0qqde0g) and noticed that they suddenly stopped reporting the total energy value a couple of days ago. Not sure if it's related, but I added a couple of these plugs and a couple of hours later they all stopped reporting the total energy.

Adding ext_converter.js didn't help. Only after downgrading the Docker image from :dev-latest to :latest (v1.40.1) they started reporting this value again and they've been working fine for the last couple of days.

svmaris avatar Sep 23 '24 20:09 svmaris

I mean testing if it work with the original Tuya gateway

ah ok. I don't own that HW :/

evilmumi avatar Sep 24 '24 05:09 evilmumi

@svmaris thanks for reporting, latest-dev indeed had an issue, fix it now.

Koenkk avatar Sep 24 '24 19:09 Koenkk

Same issue on my side with TS011F_plug_1. I figured out that it works well with the stable version. Dev shows NULL for energy.

ganslmeier avatar Sep 28 '24 21:09 ganslmeier

Same issue on my side with TS011F_plug_1. I figured out that it works well with the stable version. Dev shows NULL for energy.

with which version?

evilmumi avatar Sep 30 '24 09:09 evilmumi

Version: 1.40.1-dev not working. Version: 1.40.1 working.

I have two lxc container running. If I switch to dev the energy is showing NULL. If I start the stable lxc the energy value is working.

update: i just figured out that there is a different version of the zigbee-herdsman-converter: DEV: [email protected] Stable: [email protected]

ganslmeier avatar Sep 30 '24 21:09 ganslmeier

@ganslmeier is 1.40.2 ok?

Koenkk avatar Oct 02 '24 19:10 Koenkk

It is working. Thanks a lot for your great work. "version": "1.40.2-dev"

image

ganslmeier avatar Oct 02 '24 20:10 ganslmeier

@ others, can this be closed?

Koenkk avatar Oct 03 '24 18:10 Koenkk

@Koenkk Just upgraded to 1.40.2-dev commit: e5fac76 and it's working fine. Thanks!

svmaris avatar Oct 03 '24 18:10 svmaris