Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
11.92k stars 1.66k forks source link

TS011F _TZ3000_cicwjqth - no energy report and no update #22673

Open loicguiraud opened 4 months ago

loicguiraud commented 4 months ago

What happened?

Have tried to integrate the TS011F _TZ3000_cicwjqth device, but no success. Like in https://github.com/Koenkk/zigbee2mqtt/issues/20028 described - same problem. No reporting of energy.

Tried to use https://gist.github.com/DataGhost/572e79e08c0e7eb22773f54c1648b263 - but this is outdated (not working more) - as sample const extend = require('zigbee-herdsman-converters/lib/extend'); the lib does not exist more. Tried anything, but got different errors...

What did you expect to happen?

energy working

How to reproduce it (minimal and precise)

reimporting the device

Zigbee2MQTT version

1.37.1

Adapter firmware version

7.3.1.0 build 176

Adapter

ZBDongle-E

Setup

add on on HA VM

Debug log

[2024-05-17 17:42:05] error: z2m: Failed to configure 'prise pompe piscine', attempt 3 (Error: ZCL command 0xa4c13886beab60bb/1 haElectricalMeasurement.configReport([{"attribute":"rmsVoltage","minimumReportInterval":5,"maximumReportInterval":3600,"reportableChange":5}], {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Status 'UNSUPPORTED_ATTRIBUTE') at Endpoint.checkStatus (/app/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:315:28) at Endpoint.zclCommand (/app/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:770:26) at Endpoint.configureReporting (/app/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:556:9) at Object.rmsVoltage (/app/node_modules/zigbee-herdsman-converters/src/lib/reporting.ts:224:5) at configure (/app/node_modules/zigbee-herdsman-converters/src/devices/tuya.ts:4254:13) at Object.configure (/app/node_modules/zigbee-herdsman-converters/src/index.ts:172:21) at Configure.configure (/app/lib/extension/configure.ts:121:13) at EventEmitter.wrappedCallback (/app/lib/eventBus.ts:174:17)) [2024-05-17 17:43:10] warning: zhc:ota:common: Images currently unavailable for device 'TS011F', hardwareVersion '1', manufacturerName _TZ3000_cicwjqth, {"fieldControl":0,"manufacturerCode":4417,"imageType":545,"fileVersion":1946234881}'

loicguiraud commented 4 months ago

here's the database.bd info : {"id":16,"type":"Router","ieeeAddr":"0xa4c13886beab60bb","nwkAddr":46837,"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":239,"rmsCurrent":0}},"genOnOff":{"attributes":{"32768":0,"onOff":1,"moesStartUpOnOff":2}},"genBasic":{"attributes":{"stackVersion":0,"swBuildId":"","manufacturerName":"_TZ3000_cicwjqth","zclVersion":3,"appVersion":116,"modelId":"TS011F","powerSource":1}},"seMetering":{"attributes":{"currentSummDelivered":[0,0]}}},"binds":[{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0x84b4dbfffec7a63e","endpointID":1},{"cluster":2820,"type":"endpoint","deviceIeeeAddress":"0x84b4dbfffec7a63e","endpointID":1},{"cluster":1794,"type":"endpoint","deviceIeeeAddress":"0x84b4dbfffec7a63e","endpointID":1}],"configuredReportings":[],"meta":{}}},"appVersion":116,"stackVersion":0,"hwVersion":1,"swBuildId":"","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1716032621956}

thenoid commented 4 months ago

Getting the same thing as well

zigbee2mqtt       | [2024-05-28 16:09:57] error:        z2m: Failed to configure 'Backyard Zigbee Near Swing', attempt 8 (Error: ZCL command 0x187a3efffecaf398/1 haElectricalMeasurement.configReport([{"attribute":"rmsVoltage","minimumReportInterval":5,"maximumReportInterval":3600,"reportableChange":5}], {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Status 'UNSUPPORTED_ATTRIBUTE')
zigbee2mqtt       |     at Endpoint.checkStatus (/app/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:315:28)
zigbee2mqtt       |     at Endpoint.zclCommand (/app/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:770:26)
zigbee2mqtt       |     at processTicksAndRejections (node:internal/process/task_queues:95:5)
zigbee2mqtt       |     at Endpoint.configureReporting (/app/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:556:9)
zigbee2mqtt       |     at Object.rmsVoltage (/app/node_modules/zigbee-herdsman-converters/src/lib/reporting.ts:224:5)
zigbee2mqtt       |     at configure (/app/node_modules/zigbee-herdsman-converters/src/devices/tuya.ts:4254:13)
zigbee2mqtt       |     at Object.configure (/app/node_modules/zigbee-herdsman-converters/src/index.ts:172:21)
zigbee2mqtt       |     at Configure.configure (/app/lib/extension/configure.ts:121:13)
zigbee2mqtt       |     at Configure.onMQTTMessage (/app/lib/extension/configure.ts:55:21)
zigbee2mqtt       |     at EventEmitter.wrappedCallback (/app/lib/eventBus.ts:174:17))

How the device shows in zigbee2mqtt image

What the device is:

Guessing due to the same chipset being used in many devices?

Koenkk commented 4 months ago

The energy reporting should be fixed in the new release on Saturday, let me know if it works.

loicguiraud commented 4 months ago

still N/A for energy and the same error with version 1.38.0-1 from Saturday

Koenkk commented 4 months ago

@loicguiraud could you provide the data/database.db entry of your device?

loicguiraud commented 4 months ago

{"id":16,"type":"Router","ieeeAddr":"0xa4c13886beab60bb","nwkAddr":31835,"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":237,"rmsCurrent":0}},"genBasic":{"attributes":{"swBuildId":"","zclVersion":3,"manufacturerName":"_TZ3000_cicwjqth","appVersion":116,"modelId":"TS011F","powerSource":1}},"genOnOff":{"attributes":{"32768":0,"moesStartUpOnOff":2}},"seMetering":{"attributes":{"currentSummDelivered":[0,0]}}},"binds":[{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0x84b4dbfffec7a63e","endpointID":1}],"configuredReportings":[],"meta":{}}},"appVersion":116,"stackVersion":0,"hwVersion":1,"swBuildId":"","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1717920123609}

ftreil commented 4 months ago

Same issue. Tell me if I can help in providing some info.

ftreil commented 4 months ago

Oupps ... I'm using ZHA I think I'm wrong in this case. Sorry for inconvenience.

Koenkk commented 3 months ago

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

loicguiraud commented 3 months ago

the script don't work :

[2024-06-15 14:02:40] info: z2m: Logging to console, file (filename: log.log) [2024-06-15 14:02:40] error: z2m: Failed to load external converter file 'ext_converter.js' (ota is not defined) [2024-06-15 14:02:40] error: z2m: Probably there is a syntax error in the file or the external converter is not compatible with the current Zigbee2MQTT version [2024-06-15 14:02:40] error: z2m: Note that external converters are not meant for long term usage, it's meant for local

When I remove the line " ota: ota.zigbeeOTA," of the script, nothing append and the problem is still here

Koenkk commented 3 months ago

Doesnt it throw a different error when removing ota?

loicguiraud commented 3 months ago

no log and no error when remove the line

Koenkk commented 3 months ago

When changing the description, does that description show up in the z2m frontend, if yes, does the configure succeed?

loicguiraud commented 3 months ago

yes the description change in the frontend when I change it the configuration log is ok in the logs

Koenkk commented 3 months ago

does the energy start reporting now?

loicguiraud commented 3 months ago

still no value and this error :

Error 2024-06-15 14:34:58Failed to configure 'prise pompe piscine', attempt 3 (Error: Bind 0xa4c13886beab60bb/1 genOnOff from '0x84b4dbfffec7a63e/1' failed (Delivery failed for {"profileId":0,"clusterId":33,"sourceEndpoint":0,"destinationEndpoint":0,"options":4416,"groupId":0,"sequence":249}) at EmberOneWaitress.deliveryFailedFor (/app/node_modules/zigbee-herdsman/src/adapter/ember/adapter/oneWaitress.ts:96:31) at EmberAdapter.onMessageSentDeliveryFailed (/app/node_modules/zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts:610:30) at Ezsp.emit (node:events:517:28) at Ezsp.ezspMessageSentHandler (/app/node_modules/zigbee-herdsman/src/adapter/ember/ezsp/ezsp.ts:3960:18) at Ezsp.callbackDispatch (/app/node_modules/zigbee-herdsman/src/adapter/ember/ezsp/ezsp.ts:797:18) at Ezsp.tick (/app/node_modules/zigbee-herdsman/src/adapter/ember/ezsp/ezsp.ts:451:22) at listOnTimeout (node:internal/timers:569:17) at processTimers (node:internal/timers:512:7))

Koenkk commented 3 months ago

Previously it managed to bind genOnOff, can you try to re-pair the device?

loicguiraud commented 3 months ago

still this error after re'pair :

Failed to configure 'prise pompe piscine', attempt 1 (Error: ZCL command 0xa4c13886beab60bb/1 haElectricalMeasurement.configReport([{"attribute":"rmsVoltage","minimumReportInterval":5,"maximumReportInterval":3600,"reportableChange":5}], {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed ({"target":39242,"apsFrame":{"profileId":260,"clusterId":2820,"sourceEndpoint":1,"destinationEndpoint":1,"options":4416,"groupId":0,"sequence":48},"zclSequence":9,"commandIdentifier":7} timed out after 10000ms) at Object.start (/app/node_modules/zigbee-herdsman/src/adapter/ember/adapter/oneWaitress.ts:194:23) at EmberOneWaitress.startWaitingFor (/app/node_modules/zigbee-herdsman/src/adapter/ember/adapter/oneWaitress.ts:218:50) at Object.func (/app/node_modules/zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts:3676:64) at EmberRequestQueue.dispatch (/app/node_modules/zigbee-herdsman/src/adapter/ember/adapter/requestQueue.ts:117:46))

Koenkk commented 3 months ago

Does you converter have line 37 (the one responsible for this error) commented out?

loicguiraud commented 3 months ago

yes the line 37 is commented, and i try to uncomment but no change

here's the file : `const fz = require('zigbee-herdsman-converters/converters/fromZigbee'); const tz = require('zigbee-herdsman-converters/converters/toZigbee'); const exposes = require('zigbee-herdsman-converters/lib/exposes'); const reporting = require('zigbee-herdsman-converters/lib/reporting'); const tuya = require('zigbee-herdsman-converters/lib/tuya'); const e = exposes.presets; const ea = exposes.access; const legacy = require('zigbee-herdsman-converters/lib/legacy'); const utils = require('zigbee-herdsman-converters/lib/utils'); const { Buffer } = require('node:buffer');

const definition = { // Note: below you will find the TS011F_plug_2 and TS011F_plug_3. These are identified via a fingerprint and // thus preferred above the TS011F_plug_1 if the fingerprint matches zigbeeModel: ['TS011F'], model: 'TS011F_plug_1', description: 'Smart plug (with power monitoring)', vendor: 'Tuya', whiteLabel: [{vendor: 'LELLKI', model: 'TS011F_plug'}, {vendor: 'Neo', model: 'NAS-WR01B'}, {vendor: 'BlitzWolf', model: 'BW-SHP15'}, {vendor: 'BlitzWolf', model: 'BW-SHP13'}, {vendor: 'MatSee Plus', model: 'PJ-ZSW01'}, {vendor: 'MODEMIX', model: 'MOD037'}, {vendor: 'MODEMIX', model: 'MOD048'}, {vendor: 'Coswall', model: 'CS-AJ-DE2U-ZG-11'}, {vendor: 'Aubess', model: 'TS011F_plug_1'}, tuya.whitelabel('Nous', 'A1Z', 'Smart plug (with power monitoring)', ['_TZ3000_2putqrmw']), tuya.whitelabel('Moes', 'MOES_plug', 'Smart plug (with power monitoring)', ['_TZ3000_yujkchbz']), tuya.whitelabel('Moes', 'ZK-EU', 'Smart wallsocket (with power monitoring)', ['_TZ3000_ss98ec5d']), tuya.whitelabel('Nous', 'A1Z', 'Smart plug (with power monitoring)', ['_TZ3000_ksw8qtmt']), ], //ota: ota.zigbeeOTA, extend: [tuya.modernExtend.tuyaOnOff({ electricalMeasurements: true, powerOutageMemory: true, indicatorMode: true, childLock: true, onOffCountdown: true})], configure: async (device, coordinatorEndpoint) => { await tuya.configureMagicPacket(device, coordinatorEndpoint); const endpoint = device.getEndpoint(1); await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement', 'seMetering']); // await reporting.rmsVoltage(endpoint, {change: 5}); await reporting.rmsCurrent(endpoint, {change: 50}); if (!['_TZ3000_0zfrhq4i', '_TZ3000_okaz9tjs', '_TZ3000_typdpbpg'].includes(device.manufacturerName)) { // Gives INVALID_DATA_TYPE error for _TZ3000_0zfrhq4i (as well as a few others in issue 20028) // https://github.com/Koenkk/zigbee2mqtt/discussions/19680#discussioncomment-7667035 await reporting.activePower(endpoint, {change: 10}); } await reporting.currentSummDelivered(endpoint); const acCurrentDivisor = device.manufacturerName === '_TZ3000_typdpbpg' ? 2000 : 1000; endpoint.saveClusterAttributeKeyValue('haElectricalMeasurement', {acCurrentDivisor, acCurrentMultiplier: 1}); endpoint.saveClusterAttributeKeyValue('seMetering', {divisor: 100, multiplier: 1}); utils.attachOutputCluster(device, 'genOta'); device.save(); }, }; module.exports = definition;`

Koenkk commented 3 months ago

And you confirmed the converter loads correctly by changing the description?

loicguiraud commented 3 months ago

what do you mean by "the converter loads correctly by changing the description" ?

when I change the device description I have a info 2 logs :

[2024-06-15 19:59:01] info: z2m: Changed config for device prise pompe piscine [2024-06-15 19:59:01] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/bridge/response/device/options', payload '{"data":{"from":{"description":"test","legacy":false},"id":"prise pompe piscine","restart_required":false,"to":{"description":"test 2","legacy":false}},"status":"ok","transaction":"bmpi7-2"}'

Koenkk commented 3 months ago

Whoops, I meant the description property in the external definition, if you change it, you should see the description change in the z2m frontend, if not, the z2m startup logs will show what went wrong during loading

loicguiraud commented 3 months ago

sorry but I don't understand where to change de description property ? is it in the MQTT setting of my Home Assistant (I don't have a description here) ?

Koenkk commented 3 months ago

In the external converter which is description: 'Smart plug (with power monitoring)', now

shortN0te commented 3 months ago

Got the same problem with the TS011F _TZ3000_cicwjqth. I set up the external converter as described above, but it does not seem to have loaded correctly, since the description is unchanged after editing it in the converter file.

I also rejoined the plug twice.

loicguiraud commented 3 months ago

the description is changed when I change it in the script for all my TS011F_plug_1 including the one with the problem and still no energy for this plug

Reinhard-Stoeger commented 3 months ago

Hi, I join this thread because I have the same TS011F _TZ3000_cicwjqth device. Beside of having no energy measurement, the following get/set commands do not work ("UNSUPPORTED_ATTRIBUTE)":

Is there any work in progess on this issue? I still have some days to think about sending back to Amazon.

Tozzi89 commented 2 months ago

I have the same plugs and the same issue. Bought from Amazon in Sweden.

Sygnus83 commented 1 month ago

After the last z2mqtt update , my TS011F_plug_3 dont show Power, only 0w !

vingerha commented 3 weeks ago

A few days ago I discovered that I could turn the plug on but not off (from HA) . Only today I found out that the plug showed offline all the time on the Z2M screen, I could still trigger stuff but got errors too. From 1.40.1. I went back to 1.39.0 and now it shows fine and can switch on+ off. It reports power but (indeed) not energy...luckily I donot need the energy for this purpose. I understood from other issues that there is a fix on the way related to version of herdsmann?

vingerha commented 2 days ago

Checked 1.40.2 just now and dispite of another issue stating it to be working, with me Energy remains 'null'