[Feature request]:
@mrmaximas let's continue here for https://gist.github.com/Koenkk/b402cb48a8f88915c92b1d1fa8252db7 (because gists are annoying for communication). I updated https://gist.github.com/Koenkk/b402cb48a8f88915c92b1d1fa8252db7, could you try again?
Thanks! I'm gonna need a few minutes
I put ext.js in the external_converters folder, restarted z2m, but nothing changed in the interface.
the dimmer control seems to be working.
I forgot to mention, to try it out, send a MQTT message to zigbee2mqtt/YOUR_DEVICE_FRIENDLY_NAME/set payload {"command": ""}
seems like works? {"brightness":164,"countdown":5,"last_seen":"2025-03-18T23:03:37+03:00","linkquality":98,"max_brightness":254,"min_brightness":30,"state":"ON","update":{"installed_version":70,"latest_version":70,"state":"idle"}}
Strange thing. I tried it on other device that I haven't tried to write a timer to through the console before. There is nothing about countdown. {"brightness":141,"last_seen":"2025-03-18T23:19:23+03:00","linkquality":131,"max_brightness":254,"min_brightness":80,"state":"ON","update":{"installed_version":70,"latest_version":70,"state":"idle"}}
I changed the brightness, gave a command, in the test dimmer the brightness changed, countdown 5s is there. On other dimmers the countdown does not appear in the reply. Looks like leftovers from my experiments with converters in the state cache. {"brightness":142,"countdown":5,"last_seen":"2025-03-18T23:23:01+03:00","linkquality":109,"max_brightness":254,"min_brightness":30,"state":"ON","update":{"installed_version":70,"latest_version":70,"state":"idle"}}
just saw the errors in the z2m log.
2025-03-18 23:14:10z2m: Publish 'set' 'command' to 'Kitchen Main' failed: 'Error: command is not a object, got string ("")'
2025-03-18 23:14:10z2m: Publish 'set' 'command' to 'Kitchen Main' failed: 'Error: command is not a object, got string ("")'
2025-03-18 23:14:11z2m: Publish 'set' 'command' to 'Kitchen Main' failed: 'Error: command is not a object, got string ("")'
2025-03-18 23:18:11z2m: Publish 'set' 'command' to 'Kitchen Main' failed: 'Error: command is not a object, got string ("")'
2025-03-18 23:18:11z2m: Publish 'set' 'command' to 'Kitchen Main' failed: 'Error: command is not a object, got string ("")'
2025-03-18 23:18:11z2m: Publish 'set' 'command' to 'Hall Main' failed: 'Error: command is not a object, got string ("")'
2025-03-18 23:18:11z2m: Publish 'set' 'command' to 'Hall Main' failed: 'Error: command is not a object, got string ("")'
2025-03-18 23:18:11z2m: Publish 'set' 'command' to 'Hall Entrance' failed: 'Error: command is not a object, got string ("")'
2025-03-18 23:20:26z2m: Publish 'set' 'command' to 'Hall Entrance' failed: 'Error: command is not a object, got string ("")'
2025-03-18 23:24:37z2m: Publish 'set' 'command' to 'Kitchen Table' failed: 'Error: command is not a object, got string ("")'
2025-03-18 23:24:37z2m: Publish 'set' 'command' to 'Kitchen Table' failed: 'Error: command is not a object, got string ("")'
2025-03-18 23:43:51z2m: Publish 'set' 'command' to 'Kitchen Table' failed: 'Error: command is not a object, got string ("")'
2025-03-18 23:43:51z2m: Publish 'set' 'command' to 'Kitchen Main' failed: 'Error: command is not a object, got string ("")'
2025-03-18 23:43:51z2m: Publish 'set' 'command' to 'Kitchen Main' failed: 'Error: command is not a object, got string ("")'****
I updated https://gist.github.com/Koenkk/b402cb48a8f88915c92b1d1fa8252db7, can you try again? You have to use tuya_command now instead of command.
@Koenkk z2m: No converter available for 'tuya_command' ("")
and z2m: No converter available for 'tuyaCommand' ("")
I've published to zigbee2mqtt/Kitchen Table/set payload {"tuya_command": ""} it's that right?
z2m startup log
[2025-03-20 23:01:32.145] error: z2m: Failed to start 'ExternalConverters' (node:internal/modules/cjs/loader:646
throw e;
^
Error: Cannot find module '/Users/max/zigbee2mqtt/node_modules/zigbee-herdsman-converters/dist/lib/extend.js'
at createEsmNotFoundErr (node:internal/modules/cjs/loader:1261:15)
at finalizeEsmResolution (node:internal/modules/cjs/loader:1250:15)
at resolveExports (node:internal/modules/cjs/loader:639:14)
at Function._findPath (node:internal/modules/cjs/loader:728:31)
at Function._resolveFilename (node:internal/modules/cjs/loader:1211:27)
at Function._load (node:internal/modules/cjs/loader:1055:27)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:220:24)
at Module.require (node:internal/modules/cjs/loader:1311:12)
at require (node:internal/modules/helpers:136:16))
Hm. I rerun the update. Some components did not update the first time. No errors on startup.
But the same error occurs. z2m: No converter available for 'tuya_command' ("")
P.S. I'm also missing the device icons. In the Safari & Chrome.
I don't know what was going on, but after restarting Mac OS, the icons are displayed.
But z2m: No converter available for 'tuya_command' ("") again
@Koenkk Something went wrong. i found ext.js renamed to ext.js.invalid in the /zigbee2mqtt/data/external_converters
[2025-03-21 00:04:45.389] error: z2m: Invalid external converter 'ext.js' was ignored and renamed to prevent interference with Zigbee2MQTT.
[2025-03-21 00:04:45.389] debug: z2m: Error: Cannot find module '/Users/max/zigbee2mqtt/node_modules/zigbee-herdsman-converters/dist/lib/extend.js'
indeed, /Users/max/zigbee2mqtt/node_modules/zigbee-herdsman-converters/dist/lib/extend.js is missing
p.s. i'm always using latest dev
Updated https://gist.github.com/Koenkk/b402cb48a8f88915c92b1d1fa8252db7, can you try again?
@Koenkk same renamed ext.js.invalid
[2025-03-21 23:50:47.174] error: z2m: Invalid external converter 'ext.js' was ignored and renamed to prevent interference with Zigbee2MQTT.
Updated https://gist.github.com/Koenkk/b402cb48a8f88915c92b1d1fa8252db7, please try again.
@Koenkk good news. ext.js don't touched by z2m, command accepted, but nothing else happens ;) This is answers after each publishing
Info 2025-03-22 18:21:25z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Kitchen Main', payload '{"brightness":172,"last_seen":"2025-03-22T18:21:26+03:00","linkquality":83,"max_brightness":254,"min_brightness":90,"state":"OFF","update":{"installed_version":70,"latest_version":70,"state":"idle"}}'
Info 2025-03-22 18:21:26z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Kitchen Main', payload '{"brightness":172,"last_seen":"2025-03-22T18:21:26+03:00","linkquality":80,"max_brightness":254,"min_brightness":90,"state":"OFF","update":{"installed_version":70,"latest_version":70,"state":"idle"}}'
Info 2025-03-22 18:21:26z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Kitchen Main', payload '{"brightness":172,"last_seen":"2025-03-22T18:21:26+03:00","linkquality":76,"max_brightness":254,"min_brightness":90,"state":"OFF","update":{"installed_version":70,"latest_version":70,"state":"idle"}}'
Info 2025-03-22 18:21:26z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Kitchen Main', payload '{"brightness":172,"last_seen":"2025-03-22T18:21:26+03:00","linkquality":72,"max_brightness":254,"min_brightness":90,"state":"OFF","update":{"installed_version":70,"latest_version":70,"state":"idle"}}'
This is debug log:
2025-03-22 18:33:01.659] debug: z2m:mqtt: Received MQTT message on 'zigbee2mqtt/Kitchen Main/set' with data '{"tuya_command": ""}'
[2025-03-22 18:33:01.660] debug: z2m: Publishing 'set' 'tuya_command' to 'Kitchen Main'
[2025-03-22 18:33:01.661] debug: zh:controller:endpoint: ZCL command 0xa4c138b5bb325444/1 genOnOff.tuyaCommand({"data":{"type":"Buffer","data":[255,255,0,0]}}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":false,"direction":0,"reservedBits":0,"writeUndiv":false})
[2025-03-22 18:33:01.661] debug: zh:zstack: sendZclFrameToEndpointInternal 0xa4c138b5bb325444:46233/1 (0,0,1)
[2025-03-22 18:33:01.661] debug: zh:zstack:znp: --> SREQ: AF - dataRequest - {"dstaddr":46233,"destendpoint":1,"srcendpoint":1,"clusterid":6,"transid":148,"options":0,"radius":30,"len":7,"data":{"type":"Buffer","data":[1,114,240,255,255,0,0]}}
[2025-03-22 18:33:01.662] debug: zh:zstack:unpi:writer: --> frame [254,17,36,1,153,180,1,1,6,0,148,0,30,7,1,114,240,255,255,0,0,17]
[2025-03-22 18:33:01.682] debug: zh:zstack:unpi:parser: <-- [254,1,100,1,0,100]
[2025-03-22 18:33:01.682] debug: zh:zstack:unpi:parser: --- parseNext [254,1,100,1,0,100]
[2025-03-22 18:33:01.682] debug: zh:zstack:unpi:parser: --> parsed 1 - 3 - 4 - 1 - [0] - 100
[2025-03-22 18:33:01.683] debug: zh:zstack:znp: <-- SRSP: AF - dataRequest - {"status":0}
[2025-03-22 18:33:01.683] debug: zh:zstack:unpi:parser: --- parseNext []
[2025-03-22 18:33:01.687] debug: zh:zstack:unpi:parser: <-- [254,3,68,128,0,1,148,82]
[2025-03-22 18:33:01.687] debug: zh:zstack:unpi:parser: --- parseNext [254,3,68,128,0,1,148,82]
[2025-03-22 18:33:01.687] debug: zh:zstack:unpi:parser: --> parsed 3 - 2 - 4 - 128 - [0,1,148] - 82
[2025-03-22 18:33:01.687] debug: zh:zstack:znp: <-- AREQ: AF - dataConfirm - {"status":0,"endpoint":1,"transid":148}
[2025-03-22 18:33:01.687] debug: zh:zstack:unpi:parser: --- parseNext []
[2025-03-22 18:33:01.742] debug: zh:zstack:unpi:parser: <-- [254,3,69,196,153,180,0,175,254,25,68,129,0,0,6,0,153,180,1,1,0,87,0,15,137,58,0,0,5,24,114,11,240,0,153,180,29,184,254,29,68,129,0,0,6,0,153,180,1,1,0,83,0,200,137,58,0,0,9,24,255,10,1,64,34,255,255,0,153,180,29,108]
[2025-03-22 18:33:01.742] debug: zh:zstack:unpi:parser: --- parseNext [254,3,69,196,153,180,0,175,254,25,68,129,0,0,6,0,153,180,1,1,0,87,0,15,137,58,0,0,5,24,114,11,240,0,153,180,29,184,254,29,68,129,0,0,6,0,153,180,1,1,0,83,0,200,137,58,0,0,9,24,255,10,1,64,34,255,255,0,153,180,29,108]
[2025-03-22 18:33:01.742] debug: zh:zstack:unpi:parser: --> parsed 3 - 2 - 5 - 196 - [153,180,0] - 175
[2025-03-22 18:33:01.742] debug: zh:zstack:znp: <-- AREQ: ZDO - srcRtgInd
[2025-03-22 18:33:01.743] debug: zh:zstack:unpi:parser: --- parseNext [254,25,68,129,0,0,6,0,153,180,1,1,0,87,0,15,137,58,0,0,5,24,114,11,240,0,153,180,29,184,254,29,68,129,0,0,6,0,153,180,1,1,0,83,0,200,137,58,0,0,9,24,255,10,1,64,34,255,255,0,153,180,29,108]
[2025-03-22 18:33:01.743] debug: zh:zstack:unpi:parser: --> parsed 25 - 2 - 4 - 129 - [0,0,6,0,153,180,1,1,0,87,0,15,137,58,0,0,5,24,114,11,240,0,153,180,29] - 184
[2025-03-22 18:33:01.743] debug: zh:zstack:znp: <-- AREQ: AF - incomingMsg - {"groupid":0,"clusterid":6,"srcaddr":46233,"srcendpoint":1,"dstendpoint":1,"wasbroadcast":0,"linkquality":87,"securityuse":0,"timestamp":3836175,"transseqnumber":0,"len":5,"data":{"type":"Buffer","data":[24,114,11,240,0]}}
[2025-03-22 18:33:01.743] debug: zh:controller: Received payload: clusterID=6, address=46233, groupID=0, endpoint=1, destinationEndpoint=1, wasBroadcast=false, linkQuality=87, frame={"header":{"frameControl":{"frameType":0,"manufacturerSpecific":false,"direction":1,"disableDefaultResponse":true,"reservedBits":0},"transactionSequenceNumber":114,"commandIdentifier":11},"payload":{"cmdId":240,"statusCode":0},"command":{"ID":11,"name":"defaultRsp","parameters":[{"name":"cmdId","type":32},{"name":"statusCode","type":32}]}}
[2025-03-22 18:33:01.744] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Kitchen Main', payload '{"brightness":172,"last_seen":"2025-03-22T18:33:01+03:00","linkquality":87,"max_brightness":254,"min_brightness":90,"state":"OFF","update":{"installed_version":70,"latest_version":70,"state":"idle"}}'
[2025-03-22 18:33:01.744] debug: zh:zstack:unpi:parser: --- parseNext [254,29,68,129,0,0,6,0,153,180,1,1,0,83,0,200,137,58,0,0,9,24,255,10,1,64,34,255,255,0,153,180,29,108]
[2025-03-22 18:33:01.745] debug: zh:zstack:unpi:parser: --> parsed 29 - 2 - 4 - 129 - [0,0,6,0,153,180,1,1,0,83,0,200,137,58,0,0,9,24,255,10,1,64,34,255,255,0,153,180,29] - 108
[2025-03-22 18:33:01.745] debug: zh:zstack:znp: <-- AREQ: AF - incomingMsg - {"groupid":0,"clusterid":6,"srcaddr":46233,"srcendpoint":1,"dstendpoint":1,"wasbroadcast":0,"linkquality":83,"securityuse":0,"timestamp":3836360,"transseqnumber":0,"len":9,"data":{"type":"Buffer","data":[24,255,10,1,64,34,255,255,0]}}
[2025-03-22 18:33:01.745] debug: zh:controller: Received payload: clusterID=6, address=46233, groupID=0, endpoint=1, destinationEndpoint=1, wasBroadcast=false, linkQuality=83, frame={"header":{"frameControl":{"frameType":0,"manufacturerSpecific":false,"direction":1,"disableDefaultResponse":true,"reservedBits":0},"transactionSequenceNumber":255,"commandIdentifier":10},"payload":[{"attrId":16385,"dataType":34,"attrData":65535}],"command":{"ID":10,"name":"report","parameters":[{"name":"attrId","type":33},{"name":"dataType","type":32},{"name":"attrData","type":1000}]}}
[2025-03-22 18:33:01.745] debug: zh:zstack:unpi:parser: --- parseNext []
[2025-03-22 18:33:01.746] debug: z2m: Received Zigbee message from 'Kitchen Main', type 'attributeReport', cluster 'genOnOff', data '{"onTime":65535}' from endpoint 1 with groupID 0
[2025-03-22 18:33:01.747] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Kitchen Main', payload '{"brightness":172,"last_seen":"2025-03-22T18:33:01+03:00","linkquality":83,"max_brightness":254,"min_brightness":90,"state":"OFF","update":{"installed_version":70,"latest_version":70,"state":"idle"}}'
[2025-03-22 18:33:02.319] debug: zh:zstack:unpi:parser: <-- [254,5,69,196,163,116,1,222,198,74]
[2025-03-22 18:33:02.319] debug: zh:zstack:unpi:parser: --- parseNext [254,5,69,196,163,116,1,222,198,74]
[2025-03-22 18:33:02.320] debug: zh:zstack:unpi:parser: --> parsed 5 - 2 - 5 - 196 - [163,116,1,222,198] - 74
[2025-03-22 18:33:02.320] debug: zh:zstack:znp: <-- AREQ: ZDO - srcRtgInd
[2025-03-22 18:33:02.320] debug: zh:zstack:unpi:parser: --- parseNext []
[2025-03-22 18:33:02.368] debug: zh:zstack:unpi:parser: <-- [254,33,68,129,0,0,0,239,163,116,1,1,0,211,0,219,39,59,0,0,13,9,117,1,0,195,1,2,0,4,0,3,138,87,222,198,28,166]
[2025-03-22 18:33:02.368] debug: zh:zstack:unpi:parser: --- parseNext [254,33,68,129,0,0,0,239,163,116,1,1,0,211,0,219,39,59,0,0,13,9,117,1,0,195,1,2,0,4,0,3,138,87,222,198,28,166]
[2025-03-22 18:33:02.368] debug: zh:zstack:unpi:parser: --> parsed 33 - 2 - 4 - 129 - [0,0,0,239,163,116,1,1,0,211,0,219,39,59,0,0,13,9,117,1,0,195,1,2,0,4,0,3,138,87,222,198,28] - 166
[2025-03-22 18:33:02.369] debug: zh:zstack:znp: <-- AREQ: AF - incomingMsg - {"groupid":0,"clusterid":61184,"srcaddr":29859,"srcendpoint":1,"dstendpoint":1,"wasbroadcast":0,"linkquality":211,"securityuse":0,"timestamp":3876827,"transseqnumber":0,"len":13,"data":{"type":"Buffer","data":[9,117,1,0,195,1,2,0,4,0,3,138,87]}}
[2025-03-22 18:33:02.369] debug: zh:controller: Received payload: clusterID=61184, address=29859, groupID=0, endpoint=1, destinationEndpoint=1, wasBroadcast=false, linkQuality=211, frame={"header":{"frameControl":{"frameType":1,"manufacturerSpecific":false,"direction":1,"disableDefaultResponse":false,"reservedBits":0},"transactionSequenceNumber":117,"commandIdentifier":1},"payload":{"seq":49920,"dpValues":[{"dp":1,"datatype":2,"data":{"type":"Buffer","data":[0,3,138,87]}}]},"command":{"ID":1,"parameters":[{"name":"seq","type":33},{"name":"dpValues","type":1011}],"name":"dataResponse"}}
[
This is debug after {"tuya_command": "5"} but nothing happens, dimmer did not turn on after 5 seconds. I guess that's the way it's supposed to be?
2025-03-22 18:41:45.862] debug: z2m:mqtt: Received MQTT message on 'zigbee2mqtt/Kitchen Main/set' with data '{"tuya_command": "5"}'
[2025-03-22 18:41:45.863] debug: z2m: Publishing 'set' 'tuya_command' to 'Kitchen Main'
[2025-03-22 18:41:45.864] debug: zh:controller:endpoint: ZCL command 0xa4c138b5bb325444/1 genOnOff.tuyaCommand({"data":{"type":"Buffer","data":[255,255,0,0]}}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":false,"direction":0,"reservedBits":0,"writeUndiv":false})
[2025-03-22 18:41:45.864] debug: zh:zstack: sendZclFrameToEndpointInternal 0xa4c138b5bb325444:46233/1 (0,0,1)
[2025-03-22 18:41:45.864] debug: zh:zstack:znp: --> SREQ: AF - dataRequest - {"dstaddr":46233,"destendpoint":1,"srcendpoint":1,"clusterid":6,"transid":99,"options":0,"radius":30,"len":7,"data":{"type":"Buffer","data":[1,154,240,255,255,0,0]}}
[2025-03-22 18:41:45.864] debug: zh:zstack:unpi:writer: --> frame [254,17,36,1,153,180,1,1,6,0,99,0,30,7,1,154,240,255,255,0,0,14]
[2025-03-22 18:41:45.878] debug: zh:zstack:unpi:parser: <-- [254,1,100,1,0,100]
[2025-03-22 18:41:45.878] debug: zh:zstack:unpi:parser: --- parseNext [254,1,100,1,0,100]
[2025-03-22 18:41:45.879] debug: zh:zstack:unpi:parser: --> parsed 1 - 3 - 4 - 1 - [0] - 100
[2025-03-22 18:41:45.879] debug: zh:zstack:znp: <-- SRSP: AF - dataRequest - {"status":0}
[2025-03-22 18:41:45.879] debug: zh:zstack:unpi:parser: --- parseNext []
[2025-03-22 18:41:45.881] debug: zh:zstack:unpi:parser: <-- [254,3,68,128,0,1,99,165]
[2025-03-22 18:41:45.882] debug: zh:zstack:unpi:parser: --- parseNext [254,3,68,128,0,1,99,165]
[2025-03-22 18:41:45.882] debug: zh:zstack:unpi:parser: --> parsed 3 - 2 - 4 - 128 - [0,1,99] - 165
[2025-03-22 18:41:45.882] debug: zh:zstack:znp: <-- AREQ: AF - dataConfirm - {"status":0,"endpoint":1,"transid":99}
[2025-03-22 18:41:45.882] debug: zh:zstack:unpi:parser: --- parseNext []
[2025-03-22 18:41:45.911] debug: zh:zstack:unpi:parser: <-- [254,33,68,129,0,0,0,239,163,116,1,1,0,127,0,132,125,78,0,0,13,9,48,1,0,98,2,2,0,4,0,0,0,0,129,53,28,239]
[2025-03-22 18:41:45.912] debug: zh:zstack:unpi:parser: --- parseNext [254,33,68,129,0,0,0,239,163,116,1,1,0,127,0,132,125,78,0,0,13,9,48,1,0,98,2,2,0,4,0,0,0,0,129,53,28,239]
[2025-03-22 18:41:45.912] debug: zh:zstack:unpi:parser: --> parsed 33 - 2 - 4 - 129 - [0,0,0,239,163,116,1,1,0,127,0,132,125,78,0,0,13,9,48,1,0,98,2,2,0,4,0,0,0,0,129,53,28] - 239
[2025-03-22 18:41:45.912] debug: zh:zstack:znp: <-- AREQ: AF - incomingMsg - {"groupid":0,"clusterid":61184,"srcaddr":29859,"srcendpoint":1,"dstendpoint":1,"wasbroadcast":0,"linkquality":127,"securityuse":0,"timestamp":5143940,"transseqnumber":0,"len":13,"data":{"type":"Buffer","data":[9,48,1,0,98,2,2,0,4,0,0,0,0]}}
[2025-03-22 18:41:45.912] debug: zh:controller: Received payload: clusterID=61184, address=29859, groupID=0, endpoint=1, destinationEndpoint=1, wasBroadcast=false, linkQuality=127, frame={"header":{"frameControl":{"frameType":1,"manufacturerSpecific":false,"direction":1,"disableDefaultResponse":false,"reservedBits":0},"transactionSequenceNumber":48,"commandIdentifier":1},"payload":{"seq":25088,"dpValues":[{"dp":2,"datatype":2,"data":{"type":"Buffer","data":[0,0,0,0]}}]},"command":{"ID":1,"parameters":[{"name":"seq","type":33},{"name":"dpValues","type":1011}],"name":"dataResponse"}}
[2025-03-22 18:41:45.913] debug: zh:controller:endpoint: ZCL command 0x187a3efffe358554/1 manuSpecificTuya.defaultRsp({"cmdId":1,"statusCode":0}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"reservedBits":0,"transactionSequenceNumber":48,"writeUndiv":false})
[2025-03-22 18:41:45.913] debug: zh:zstack: sendZclFrameToEndpointInternal 0x187a3efffe358554:29859/1 (0,0,2)
[2025-03-22 18:41:45.913] debug: zh:zstack:znp: --> SREQ: AF - dataRequest - {"dstaddr":29859,"destendpoint":1,"srcendpoint":1,"clusterid":61184,"transid":100,"options":0,"radius":30,"len":5,"data":{"type":"Buffer","data":[16,48,11,1,0]}}
[2025-03-22 18:41:45.913] debug: zh:zstack:unpi:writer: --> frame [254,15,36,1,163,116,1,1,0,239,100,0,30,5,16,48,11,1,0,71]
[2025-03-22 18:41:45.914] debug: zh:zstack:unpi:parser: --- parseNext []
[2025-03-22 18:41:45.914] debug: z2m: Received Zigbee message from 'Power Monitor', type 'commandDataResponse', cluster 'manuSpecificTuya', data '{"dpValues":[{"data":{"data":[0,0,0,0],"type":"Buffer"},"datatype":2,"dp":2}],"seq":25088}' from endpoint 1 with groupID 0
[2025-03-22 18:41:45.944] debug: zh:zstack:unpi:parser: <-- [254,1,100,1,0,100,254,3,69,196,153,180,0,175,254,3,68,128,0,1,100,162,254,25,68,129,0,0,6,0,153,180,1,1,0,76,0,230,131,78,0,0,5,24,154,11,240,0,153,180,29,220]
[2025-03-22 18:41:45.944] debug: zh:zstack:unpi:parser: --- parseNext [254,1,100,1,0,100,254,3,69,196,153,180,0,175,254,3,68,128,0,1,100,162,254,25,68,129,0,0,6,0,153,180,1,1,0,76,0,230,131,78,0,0,5,24,154,11,240,0,153,180,29,220]
[2025-03-22 18:41:45.944] debug: zh:zstack:unpi:parser: --> parsed 1 - 3 - 4 - 1 - [0] - 100
[2025-03-22 18:41:45.944] debug: zh:zstack:znp: <-- SRSP: AF - dataRequest - {"status":0}
[2025-03-22 18:41:45.945] debug: zh:zstack:unpi:parser: --- parseNext [254,3,69,196,153,180,0,175,254,3,68,128,0,1,100,162,254,25,68,129,0,0,6,0,153,180,1,1,0,76,0,230,131,78,0,0,5,24,154,11,240,0,153,180,29,220]
[2025-03-22 18:41:45.945] debug: zh:zstack:unpi:parser: --> parsed 3 - 2 - 5 - 196 - [153,180,0] - 175
[2025-03-22 18:41:45.945] debug: zh:zstack:znp: <-- AREQ: ZDO - srcRtgInd
[2025-03-22 18:41:45.945] debug: zh:zstack:unpi:parser: --- parseNext [254,3,68,128,0,1,100,162,254,25,68,129,0,0,6,0,153,180,1,1,0,76,0,230,131,78,0,0,5,24,154,11,240,0,153,180,29,220]
[2025-03-22 18:41:45.945] debug: zh:zstack:unpi:parser: --> parsed 3 - 2 - 4 - 128 - [0,1,100] - 162
[2025-03-22 18:41:45.945] debug: zh:zstack:znp: <-- AREQ: AF - dataConfirm - {"status":0,"endpoint":1,"transid":100}
[2025-03-22 18:41:45.945] debug: zh:zstack:unpi:parser: --- parseNext [254,25,68,129,0,0,6,0,153,180,1,1,0,76,0,230,131,78,0,0,5,24,154,11,240,0,153,180,29,220]
[2025-03-22 18:41:45.945] debug: zh:zstack:unpi:parser: --> parsed 25 - 2 - 4 - 129 - [0,0,6,0,153,180,1,1,0,76,0,230,131,78,0,0,5,24,154,11,240,0,153,180,29] - 220
[2025-03-22 18:41:45.945] debug: zh:zstack:znp: <-- AREQ: AF - incomingMsg - {"groupid":0,"clusterid":6,"srcaddr":46233,"srcendpoint":1,"dstendpoint":1,"wasbroadcast":0,"linkquality":76,"securityuse":0,"timestamp":5145574,"transseqnumber":0,"len":5,"data":{"type":"Buffer","data":[24,154,11,240,0]}}
[2025-03-22 18:41:45.945] debug: zh:controller: Received payload: clusterID=6, address=46233, groupID=0, endpoint=1, destinationEndpoint=1, wasBroadcast=false, linkQuality=76, frame={"header":{"frameControl":{"frameType":0,"manufacturerSpecific":false,"direction":1,"disableDefaultResponse":true,"reservedBits":0},"transactionSequenceNumber":154,"commandIdentifier":11},"payload":{"cmdId":240,"statusCode":0},"command":{"ID":11,"name":"defaultRsp","parameters":[{"name":"cmdId","type":32},{"name":"statusCode","type":32}]}}
[2025-03-22 18:41:45.946] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Kitchen Main', payload '{"brightness":172,"last_seen":"2025-03-22T18:41:45+03:00","linkquality":76,"max_brightness":254,"min_brightness":90,"state":"OFF","update":{"installed_version":70,"latest_version":70,"state":"idle"}}'
[2025-03-22 18:41:45.946] debug: zh:zstack:unpi:parser: --- parseNext []
[2025-03-22 18:41:45.985] debug: zh:zstack:unpi:parser: <-- [254,5,69,196,163,116,1,129,53,230]
[2025-03-22 18:41:45.986] debug: zh:zstack:unpi:parser: --- parseNext [254,5,69,196,163,116,1,129,53,230]
[2025-03-22 18:41:45.986] debug: zh:zstack:unpi:parser: --> parsed 5 - 2 - 5 - 196 - [163,116,1,129,53] - 230
[2025-03-22 18:41:45.986] debug: zh:zstack:znp: <-- AREQ: ZDO - srcRtgInd
[2025-03-22 18:41:45.986] debug: zh:zstack:unpi:parser: --- parseNext []
[2025-03-22 18:41:46.036] debug: zh:zstack:unpi:parser: <-- [254,37,68,129,0,0,0,239,163,116,1,1,0,131,0,179,155,78,0,0,17,9,49,1,0,99,6,0,0,8,9,82,0,11,12,0,2,5,129,53,28,139]
[2025-03-22 18:41:46.036] debug: zh:zstack:unpi:parser: --- parseNext [254,37,68,129,0,0,0,239,163,116,1,1,0,131,0,179,155,78,0,0,17,9,49,1,0,99,6,0,0,8,9,82,0,11,12,0,2,5,129,53,28,139]
[2025-03-22 18:41:46.036] debug: zh:zstack:unpi:parser: --> parsed 37 - 2 - 4 - 129 - [0,0,0,239,163,116,1,1,0,131,0,179,155,78,0,0,17,9,49,1,0,99,6,0,0,8,9,82,0,11,12,0,2,5,129,53,28] - 139
[2025-03-22 18:41:46.036] debug: zh:zstack:znp: <-- AREQ: AF - incomingMsg - {"groupid":0,"clusterid":61184,"srcaddr":29859,"srcendpoint":1,"dstendpoint":1,"wasbroadcast":0,"linkquality":131,"securityuse":0,"timestamp":5151667,"transseqnumber":0,"len":17,"data":{"type":"Buffer","data":[9,49,1,0,99,6,0,0,8,9,82,0,11,12,0,2,5]}}
[2025-03-22 18:41:46.037] debug: zh:controller: Received payload: clusterID=61184, address=29859, groupID=0, endpoint=1, destinationEndpoint=1, wasBroadcast=false, linkQuality=131, frame={"header":{"frameControl":{"frameType":1,"manufacturerSpecific":false,"direction":1,"disableDefaultResponse":false,"reservedBits":0},"transactionSequenceNumber":49,"commandIdentifier":1},"payload":{"seq":25344,"dpValues":[{"dp":6,"datatype":0,"data":{"type":"Buffer","data":[9,82,0,11,12,0,2,5]}}]},"command":{"ID":1,"parameters":[{"name":"seq","type":33},{"name":"dpValues","type":1011}],"name":"dataResponse"}}
tuya_command should set the thing similar to the last screenshot of https://gist.github.com/Koenkk/b402cb48a8f88915c92b1d1fa8252db7?permalink_comment_id=5497378#gistcomment-5497378 (65535 timer). In case you want to test different things change this line accordingly (with the bytes from the sniffed traffic)
@Koenkk how do I write payload correctly via UI for 5 sec for example? Or should this be done via MQTT /set command? if so, what kind of payload for 5s?
I send via MQTT Explorer {"tuya_command": "0x05000000"}' but nothing happens
2025-03-25 09:59:27.844] debug: z2m:mqtt: Received MQTT message on 'zigbee2mqtt/Kitchen Main/set' with data '{"tuya_command": "0x05000000"}'
[2025-03-25 09:59:27.845] debug: z2m: Publishing 'set' 'tuya_command' to 'Kitchen Main'
[2025-03-25 09:59:27.845] debug: zh:controller:endpoint: ZCL command 0xa4c138b5bb325444/1 genOnOff.tuyaCommand({"data":{"type":"Buffer","data":[255,255,0,0]}}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":false,"direction":0,"reservedBits":0,"writeUndiv":false})
[2025-03-25 09:59:27.845] debug: zh:zstack: sendZclFrameToEndpointInternal 0xa4c138b5bb325444:46233/1 (0,0,2)
[2025-03-25 09:59:27.861] debug: zh:zstack:unpi:parser: <-- [254,1,100,1,0,100]
[2025-03-25 09:59:27.861] debug: zh:zstack:unpi:parser: --- parseNext [254,1,100,1,0,100]
[2025-03-25 09:59:27.861] debug: zh:zstack:unpi:parser: --> parsed 1 - 3 - 4 - 1 - [0] - 100
[2025-03-25 09:59:27.861] debug: zh:zstack:znp: <-- SRSP: AF - dataRequest - {"status":0}
[2025-03-25 09:59:27.861] debug: zh:zstack:unpi:parser: --- parseNext []
[2025-03-25 09:59:27.861] debug: zh:zstack:znp: --> SREQ: AF - dataRequest - {"dstaddr":46233,"destendpoint":1,"srcendpoint":1,"clusterid":6,"transid":77,"options":0,"radius":30,"len":7,"data":{"type":"Buffer","data":[1,38,240,255,255,0,0]}}
[2025-03-25 09:59:27.861] debug: zh:zstack:unpi:writer: --> frame [254,17,36,1,153,180,1,1,6,0,77,0,30,7,1,38,240,255,255,0,0,156]
[2025-03-25 09:59:27.865] debug: zh:zstack:unpi:parser: <-- [254,3,68,128,0,1,76,138]
[2025-03-25 09:59:27.866] debug: zh:zstack:unpi:parser: --- parseNext [254,3,68,128,0,1,76,138]
[2025-03-25 09:59:27.866] debug: zh:zstack:unpi:parser: --> parsed 3 - 2 - 4 - 128 - [0,1,76] - 138
[2025-03-25 09:59:27.866] debug: zh:zstack:znp: <-- AREQ: AF - dataConfirm - {"status":0,"endpoint":1,"transid":76}
[2025-03-25 09:59:27.866] debug: zh:zstack:unpi:parser: --- parseNext []
[2025-03-25 09:59:27.881] debug: zh:zstack:unpi:parser: <-- [254,1,100,1,0,100]
[2025-03-25 09:59:27.882] debug: zh:zstack:unpi:parser: --- parseNext [254,1,100,1,0,100]
[2025-03-25 09:59:27.882] debug: zh:zstack:unpi:parser: --> parsed 1 - 3 - 4 - 1 - [0] - 100
[2025-03-25 09:59:27.882] debug: zh:zstack:znp: <-- SRSP: AF - dataRequest - {"status":0}
[2025-03-25 09:59:27.882] debug: zh:zstack:unpi:parser: --- parseNext []
[2025-03-25 09:59:27.888] debug: zh:zstack:unpi:parser: <-- [254,3,68,128,0,1,77,139]
[2025-03-25 09:59:27.888] debug: zh:zstack:unpi:parser: --- parseNext [254,3,68,128,0,1,77,139]
[2025-03-25 09:59:27.888] debug: zh:zstack:unpi:parser: --> parsed 3 - 2 - 4 - 128 - [0,1,77] - 139
[2025-03-25 09:59:27.889] debug: zh:zstack:znp: <-- AREQ: AF - dataConfirm - {"status":0,"endpoint":1,"transid":77}
[2025-03-25 09:59:27.889] debug: zh:zstack:unpi:parser: --- parseNext []
[2025-03-25 09:59:27.944] debug: zh:zstack:unpi:parser: <-- [254,25,68,129,0,0,6,0,153,180,1,1,0,54,0,239,253,128,0,0,5,24,38,11,240,0,226,156,28,241,254,29,68,129,0,0,6,0,153,180,1,1,0,58,0,193,254,128,0,0,9,24,253,10,1,64,34,255,255,0,226,156,28,145]
[2025-03-25 09:59:27.944] debug: zh:zstack:unpi:parser: --- parseNext [254,25,68,129,0,0,6,0,153,180,1,1,0,54,0,239,253,128,0,0,5,24,38,11,240,0,226,156,28,241,254,29,68,129,0,0,6,0,153,180,1,1,0,58,0,193,254,128,0,0,9,24,253,10,1,64,34,255,255,0,226,156,28,145]
[2025-03-25 09:59:27.944] debug: zh:zstack:unpi:parser: --> parsed 25 - 2 - 4 - 129 - [0,0,6,0,153,180,1,1,0,54,0,239,253,128,0,0,5,24,38,11,240,0,226,156,28] - 241
[2025-03-25 09:59:27.944] debug: zh:zstack:znp: <-- AREQ: AF - incomingMsg - {"groupid":0,"clusterid":6,"srcaddr":46233,"srcendpoint":1,"dstendpoint":1,"wasbroadcast":0,"linkquality":54,"securityuse":0,"timestamp":8453615,"transseqnumber":0,"len":5,"data":{"type":"Buffer","data":[24,38,11,240,0]}}
[2025-03-25 09:59:27.945] debug: zh:controller: Received payload: clusterID=6, address=46233, groupID=0, endpoint=1, destinationEndpoint=1, wasBroadcast=false, linkQuality=54, frame={"header":{"frameControl":{"frameType":0,"manufacturerSpecific":false,"direction":1,"disableDefaultResponse":true,"reservedBits":0},"transactionSequenceNumber":38,"commandIdentifier":11},"payload":{"cmdId":240,"statusCode":0},"command":{"ID":11,"name":"defaultRsp","parameters":[{"name":"cmdId","type":32},{"name":"statusCode","type":32}]}}
[2025-03-25 09:59:27.946] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Kitchen Main', payload '{"brightness":173,"last_seen":"2025-03-25T09:59:27+03:00","linkquality":54,"max_brightness":254,"min_brightness":90,"state":"OFF","update":{"installed_version":70,"latest_version":70,"state":"idle"}}'
[2025-03-25 09:59:27.946] debug: zh:zstack:unpi:parser: --- parseNext [254,29,68,129,0,0,6,0,153,180,1,1,0,58,0,193,254,128,0,0,9,24,253,10,1,64,34,255,255,0,226,156,28,145]
[2025-03-25 09:59:27.949] debug: zh:zstack:unpi:parser: --> parsed 29 - 2 - 4 - 129 - [0,0,6,0,153,180,1,1,0,58,0,193,254,128,0,0,9,24,253,10,1,64,34,255,255,0,226,156,28] - 145
[2025-03-25 09:59:27.949] debug: zh:zstack:znp: <-- AREQ: AF - incomingMsg - {"groupid":0,"clusterid":6,"srcaddr":46233,"srcendpoint":1,"dstendpoint":1,"wasbroadcast":0,"linkquality":58,"securityuse":0,"timestamp":8453825,"transseqnumber":0,"len":9,"data":{"type":"Buffer","data":[24,253,10,1,64,34,255,255,0]}}
[2025-03-25 09:59:27.950] debug: zh:controller: Received payload: clusterID=6, address=46233, groupID=0, endpoint=1, destinationEndpoint=1, wasBroadcast=false, linkQuality=58, frame={"header":{"frameControl":{"frameType":0,"manufacturerSpecific":false,"direction":1,"disableDefaultResponse":true,"reservedBits":0},"transactionSequenceNumber":253,"commandIdentifier":10},"payload":[{"attrId":16385,"dataType":34,"attrData":65535}],"command":{"ID":10,"name":"report","parameters":[{"name":"attrId","type":33},{"name":"dataType","type":32},{"name":"attrData","type":1000}]}}
[2025-03-25 09:59:27.950] debug: zh:zstack:unpi:parser: --- parseNext []
[2025-03-25 09:59:27.950] debug: z2m: Received Zigbee message from 'Kitchen Main', type 'attributeReport', cluster 'genOnOff', data '{"onTime":65535}' from endpoint 1 with groupID 0
[2025-03-25 09:59:27.950] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Kitchen Main', payload '{"brightness":173,"last_seen":"2025-03-25T09:59:27+03:00","linkquality":58,"max_brightness":254,"min_brightness":90,"state":"OFF","update":{"installed_version":70,"latest_version":70,"state":"idle"}}'
[2025-03-25 09:59:28.412] debug: zh:zstack:unpi:parser: <-- [254,5,69,196,163,116,1,152,55,253]
[2025-03-25 09:59:28.412] debug: zh:zstack:unpi:parser: --- parseNext [254,5,69,196,163,116,1,152,55,253]
[2025-03-25 09:59:28.412] debug: zh:zstack:unpi:parser: --> parsed 5 - 2 - 5 - 196 - [163,116,1,152,55] - 253
[2025-03-25 09:59:28.412] debug: zh:zstack:znp: <-- AREQ: ZDO - srcRtgInd
[2025-03-25 09:59:28.413] debug: zh:zstack:unpi:parser: --- parseNext []
[2025-03-25 09:59:28.430] debug: zh:zstack:unpi:parser: <-- [254,33,68,129,0,0,0,239,163,116,1,1,0,58,0,73,120,129,0,0,13,9,43,1,0,80,1,2,0,4,0,3,154,183,152,55,28,178]
[2025-03-25 09:59:28.430] debug: zh:zstack:unpi:parser: --- parseNext [254,33,68,129,0,0,0,239,163,116,1,1,0,58,0,73,120,129,0,0,13,9,43,1,0,80,1,2,0,4,0,3,154,183,152,55,28,178]
[2025-03-25 09:59:28.430] debug: zh:zstack:unpi:parser: --> parsed 33 - 2 - 4 - 129 - [0,0,0,239,163,116,1,1,0,58,0,73,120,129,0,0,13,9,43,1,0,80,1,2,0,4,0,3,154,183,152,55,28] - 178
[2025-03-25 09:59:28.431] debug: zh:zstack:znp: <-- AREQ: AF - incomingMsg - {"groupid":0,"clusterid":61184,"srcaddr":29859,"srcendpoint":1,"dstendpoint":1,"wasbroadcast":0,"linkquality":58,"securityuse":0,"timestamp":8484937,"transseqnumber":0,"len":13,"data":{"type":"Buffer","data":[9,43,1,0,80,1,2,0,4,0,3,154,183]}}
[2025-03-25 09:59:28.431] debug: zh:controller: Received payload: clusterID=61184, address=29859, groupID=0, endpoint=1, destinationEndpoint=1, wasBroadcast=false, linkQuality=58, frame={"header":{"frameControl":{"frameType":1,"manufacturerSpecific":false,"direction":1,"disableDefaultResponse":false,"reservedBits":0},"transactionSequenceNumber":43,"commandIdentifier":1},"payload":{"seq":20480,"dpValues":[{"dp":1,"datatype":2,"data":{"type":"Buffer","data":[0,3,154,183]}}]},"command":{"ID":1,"parameters":[{"name":"seq","type":33},{"name":"dpValues","type":1011}],"name":"dataResponse"}}
[2025-03-25 09:59:28.431] debug: zh:controller:endpoint: ZCL command 0x187a3efffe358554/1 manuSpecificTuya.defaultRsp({"cmdId":1,"statusCode":0}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"reservedBits":0,"transactionSequenceNumber":43,"writeUndiv":false})
[2025-03-25 09:59:28.432] debug: zh:zstack: sendZclFrameToEndpointInternal 0x187a3efffe358554:29859/1 (0,0,1)
[2025-03-25 09:59:28.432] debug: zh:zstack:znp: --> SREQ: AF - dataRequest - {"dstaddr":29859,"destendpoint":1,"srcendpoint":1,"clusterid":61184,"transid":78,"options":0,"radius":30,"len":5,"data":{"type":"Buffer","data":[16,43,11,1,0]}}
[2025-03-25 09:59:28.432] debug: zh:zstack:unpi:writer: --> frame [254,15,36,1,163,116,1,1,0,239,78,0,30,5,16,43,11,1,0,118]
[2025-03-25 09:59:28.432] debug: zh:zstack:unpi:parser: --- parseNext []
This is {"tuya_command": "0x0"}'
[2025-03-25 10:08:24.817] debug: z2m:mqtt: Received MQTT message on 'zigbee2mqtt/Kitchen Main/set' with data '{"tuya_command": "0x0"}'
[2025-03-25 10:08:24.819] debug: z2m: Publishing 'set' 'tuya_command' to 'Kitchen Main'
[2025-03-25 10:08:24.819] debug: zh:controller:endpoint: ZCL command 0xa4c138b5bb325444/1 genOnOff.tuyaCommand({"data":{"type":"Buffer","data":[255,255,0,0]}}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":false,"direction":0,"reservedBits":0,"writeUndiv":false})
[2025-03-25 10:08:24.819] debug: zh:zstack: sendZclFrameToEndpointInternal 0xa4c138b5bb325444:46233/1 (0,0,1)
[2025-03-25 10:08:24.820] debug: zh:zstack:znp: --> SREQ: AF - dataRequest - {"dstaddr":46233,"destendpoint":1,"srcendpoint":1,"clusterid":6,"transid":37,"options":0,"radius":30,"len":7,"data":{"type":"Buffer","data":[1,80,240,255,255,0,0]}}
[2025-03-25 10:08:24.820] debug: zh:zstack:unpi:writer: --> frame [254,17,36,1,153,180,1,1,6,0,37,0,30,7,1,80,240,255,255,0,0,130]
[2025-03-25 10:08:24.842] debug: zh:zstack:unpi:parser: <-- [254,1,100,1,0,100]
[2025-03-25 10:08:24.842] debug: zh:zstack:unpi:parser: --- parseNext [254,1,100,1,0,100]
[2025-03-25 10:08:24.842] debug: zh:zstack:unpi:parser: --> parsed 1 - 3 - 4 - 1 - [0] - 100
[2025-03-25 10:08:24.843] debug: zh:zstack:znp: <-- SRSP: AF - dataRequest - {"status":0}
[2025-03-25 10:08:24.843] debug: zh:zstack:unpi:parser: --- parseNext []
[2025-03-25 10:08:24.846] debug: zh:zstack:unpi:parser: <-- [254,3,68,128,0,1,37,227]
[2025-03-25 10:08:24.847] debug: zh:zstack:unpi:parser: --- parseNext [254,3,68,128,0,1,37,227]
[2025-03-25 10:08:24.847] debug: zh:zstack:unpi:parser: --> parsed 3 - 2 - 4 - 128 - [0,1,37] - 227
[2025-03-25 10:08:24.847] debug: zh:zstack:znp: <-- AREQ: AF - dataConfirm - {"status":0,"endpoint":1,"transid":37}
[2025-03-25 10:08:24.847] debug: zh:zstack:unpi:parser: --- parseNext []
[2025-03-25 10:08:24.902] debug: zh:zstack:unpi:parser: <-- [254,25,68,129,0,0,6,0,153,180,1,1,0,47,0,176,27,161,0,0,5,24,80,11,240,0,226,156,28,6,254,29,68,129,0,0,6,0,153,180,1,1,0,51,0,130,28,161,0,0,9,24,14,10,1,64,34,255,255,0,226,156,28,235]
[2025-03-25 10:08:24.903] debug: zh:zstack:unpi:parser: --- parseNext [254,25,68,129,0,0,6,0,153,180,1,1,0,47,0,176,27,161,0,0,5,24,80,11,240,0,226,156,28,6,254,29,68,129,0,0,6,0,153,180,1,1,0,51,0,130,28,161,0,0,9,24,14,10,1,64,34,255,255,0,226,156,28,235]
[2025-03-25 10:08:24.903] debug: zh:zstack:unpi:parser: --> parsed 25 - 2 - 4 - 129 - [0,0,6,0,153,180,1,1,0,47,0,176,27,161,0,0,5,24,80,11,240,0,226,156,28] - 6
[2025-03-25 10:08:24.903] debug: zh:zstack:znp: <-- AREQ: AF - incomingMsg - {"groupid":0,"clusterid":6,"srcaddr":46233,"srcendpoint":1,"dstendpoint":1,"wasbroadcast":0,"linkquality":47,"securityuse":0,"timestamp":10558384,"transseqnumber":0,"len":5,"data":{"type":"Buffer","data":[24,80,11,240,0]}}
[2025-03-25 10:08:24.903] debug: zh:controller: Received payload: clusterID=6, address=46233, groupID=0, endpoint=1, destinationEndpoint=1, wasBroadcast=false, linkQuality=47, frame={"header":{"frameControl":{"frameType":0,"manufacturerSpecific":false,"direction":1,"disableDefaultResponse":true,"reservedBits":0},"transactionSequenceNumber":80,"commandIdentifier":11},"payload":{"cmdId":240,"statusCode":0},"command":{"ID":11,"name":"defaultRsp","parameters":[{"name":"cmdId","type":32},{"name":"statusCode","type":32}]}}
[2025-03-25 10:08:24.904] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Kitchen Main', payload '{"brightness":173,"last_seen":"2025-03-25T10:08:24+03:00","linkquality":47,"max_brightness":254,"min_brightness":90,"state":"OFF","update":{"installed_version":70,"latest_version":70,"state":"idle"}}'
[2025-03-25 10:08:24.905] debug: zh:zstack:unpi:parser: --- parseNext [254,29,68,129,0,0,6,0,153,180,1,1,0,51,0,130,28,161,0,0,9,24,14,10,1,64,34,255,255,0,226,156,28,235]
[2025-03-25 10:08:24.905] debug: zh:zstack:unpi:parser: --> parsed 29 - 2 - 4 - 129 - [0,0,6,0,153,180,1,1,0,51,0,130,28,161,0,0,9,24,14,10,1,64,34,255,255,0,226,156,28] - 235
[2025-03-25 10:08:24.905] debug: zh:zstack:znp: <-- AREQ: AF - incomingMsg - {"groupid":0,"clusterid":6,"srcaddr":46233,"srcendpoint":1,"dstendpoint":1,"wasbroadcast":0,"linkquality":51,"securityuse":0,"timestamp":10558594,"transseqnumber":0,"len":9,"data":{"type":"Buffer","data":[24,14,10,1,64,34,255,255,0]}}
[2025-03-25 10:08:24.905] debug: zh:controller: Received payload: clusterID=6, address=46233, groupID=0, endpoint=1, destinationEndpoint=1, wasBroadcast=false, linkQuality=51, frame={"header":{"frameControl":{"frameType":0,"manufacturerSpecific":false,"direction":1,"disableDefaultResponse":true,"reservedBits":0},"transactionSequenceNumber":14,"commandIdentifier":10},"payload":[{"attrId":16385,"dataType":34,"attrData":65535}],"command":{"ID":10,"name":"report","parameters":[{"name":"attrId","type":33},{"name":"dataType","type":32},{"name":"attrData","type":1000}]}}
[2025-03-25 10:08:24.905] debug: zh:zstack:unpi:parser: --- parseNext []
[2025-03-25 10:08:24.906] debug: z2m: Received Zigbee message from 'Kitchen Main', type 'attributeReport', cluster 'genOnOff', data '{"onTime":65535}' from endpoint 1 with groupID 0
[2025-03-25 10:08:24.906] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Kitchen Main', payload '{"brightness":173,"last_seen":"2025-03-25T10:08:24+03:00","linkquality":51,"max_brightness":254,"min_brightness":90,"state":"OFF","update":{"installed_version":70,"latest_version":70,"state":"idle"}}'
[2025-03-25 10:08:25.036] debug: zh:controller:endpoint: ZCL command 0xa4c13878f40e0e4c/1 genBasic.read(["zclVersion"], {"timeout":10000,"disableResponse":false,"disableRecovery":true,"disableDefaultResponse":true,"direction":0,"reservedBits":0,"writeUndiv":false})
[2025-03-25 10:08:25.036] debug: zh:zstack: sendZclFrameToEndpointInternal 0xa4c13878f40e0e4c:26732/1 (0,0,1)
[2025-03-25 10:08:25.037] debug: zh:zstack:znp: --> SREQ: AF - dataRequest - {"dstaddr":26732,"destendpoint":1,"srcendpoint":1,"clusterid":0,"transid":38,"options":0,"radius":30,"len":5,"data":{"type":"Buffer","data":[16,81,0,0,0]}}
[2025-03-25 10:08:25.037] debug: zh:zstack:unpi:writer: --> frame [254,15,36,1,108,104,1,1,0,0,38,0,30,5,16,81,0,0,0,82]
[2025-03-25 10:08:25.057] debug: zh:zstack:unpi:parser: <-- [254,1,100,1,0,100]
[2025-03-25 10:08:25.057] debug: zh:zstack:unpi:parser: --- parseNext [254,1,100,1,0,100]
[2025-03-25 10:08:25.057] debug: zh:zstack:unpi:parser: --> parsed 1 - 3 - 4 - 1 - [0] - 100
[2025-03-25 10:08:25.058] debug: zh:zstack:znp: <-- SRSP: AF - dataRequest - {"status":0}
[2025-03-25 10:08:25.058] debug: zh:zstack:unpi:parser: --- parseNext []
[2025-03-25 10:08:25.062] debug: zh:zstack:unpi:parser: <-- [254,3,68,128,0,1,38,224]
[2025-03-25 10:08:25.062] debug: zh:zstack:unpi:parser: --- parseNext [254,3,68,128,0,1,38,224]
[2025-03-25 10:08:25.062] debug: zh:zstack:unpi:parser: --> parsed 3 - 2 - 4 - 128 - [0,1,38] - 224
[2025-03-25 10:08:25.062] debug: zh:zstack:znp: <-- AREQ: AF - dataConfirm - {"status":0,"endpoint":1,"transid":38}
[2025-03-25 10:08:25.063] debug: zh:zstack:unpi:parser: --- parseNext []
[2025-03-25 10:08:25.376] debug: zh:zstack:unpi:parser: <-- [254,5,69,196,108,104,1,238,18,125,254,28,68,129,0,0,0,0,108,104,1,1,0,25,0,213,141,161,0,0,8,24,81,1,0,0,0,32,3,238,18,28,190]
[2025-03-25 10:08:25.377] debug: zh:zstack:unpi:parser: --- parseNext [254,5,69,196,108,104,1,238,18,125,254,28,68,129,0,0,0,0,108,104,1,1,0,25,0,213,141,161,0,0,8,24,81,1,0,0,0,32,3,238,18,28,190]
[2025-03-25 10:08:25.377] debug: zh:zstack:unpi:parser: --> parsed 5 - 2 - 5 - 196 - [108,104,1,238,18] - 125
[2025-03-25 10:08:25.377] debug: zh:zstack:znp: <-- AREQ: ZDO - srcRtgInd
[2025-03-25 10:08:25.377] debug: zh:zstack:unpi:parser: --- parseNext [254,28,68,129,0,0,0,0,108,104,1,1,0,25,0,213,141,161,0,0,8,24,81,1,0,0,0,32,3,238,18,28,190]
[2025-03-25 10:08:25.378] debug: zh:zstack:unpi:parser: --> parsed 28 - 2 - 4 - 129 - [0,0,0,0,108,104,1,1,0,25,0,213,141,161,0,0,8,24,81,1,0,0,0,32,3,238,18,28] - 190
[2025-03-25 10:08:25.378] debug: zh:zstack:znp: <-- AREQ: AF - incomingMsg - {"groupid":0,"clusterid":0,"srcaddr":26732,"srcendpoint":1,"dstendpoint":1,"wasbroadcast":0,"linkquality":25,"securityuse":0,"timestamp":10587605,"transseqnumber":0,"len":8,"data":{"type":"Buffer","data":[24,81,1,0,0,0,32,3]}}
[2025-03-25 10:08:25.378] debug: zh:controller: Received payload: clusterID=0, address=26732, groupID=0, endpoint=1, destinationEndpoint=1, wasBroadcast=false, linkQuality=25, frame={"header":{"frameControl":{"frameType":0,"manufacturerSpecific":false,"direction":1,"disableDefaultResponse":true,"reservedBits":0},"transactionSequenceNumber":81,"commandIdentifier":1},"payload":[{"attrId":0,"status":0,"dataType":32,"attrData":3}],"command":{"ID":1,"name":"readRsp","parameters":[{"name":"attrId","type":33},{"name":"status","type":32},{"name":"dataType","type":32,"conditions":[{"type":"statusEquals","value":0}]},{"name":"attrData","type":1000,"conditions":[{"type":"statusEquals","value":0}]}]}}
[2025-03-25 10:08:25.378] debug: zh:zstack:unpi:parser: --- parseNext []
@Koenkk I may have misunderstood you at first, but I see that all my devices respond like this data '{"onTime":65535}' to any payload {"tuya_command": "0xXXXX"} value
[2025-03-25 10:08:24.906] debug: z2m: Received Zigbee message from 'Kitchen Main', type 'attributeReport', cluster 'genOnOff', data '{"onTime":65535}' from endpoint 1 with groupID 0
I remember that the set timer value is reported at 0x4001 and 0x4002 depending on the current state of the device - on or off
https://gist.github.com/Koenkk/b402cb48a8f88915c92b1d1fa8252db7?permalink_comment_id=5488626#gistcomment-5488626
You cannot set it via MQTT currently, for now update the code on this line: https://gist.github.com/Koenkk/b402cb48a8f88915c92b1d1fa8252db7#file-ext-js-L17
@Koenkk it works! Bravo!
await entity.command('genOnOff', 'tuyaCommand', {data: Buffer.from([0x05, 0x00, 0x00, 0x00])}, {}); switches the device on or off after 5 seconds depending on its current state.
@Koenkk This doesn't seem to work for _TZ3210_ngqk6jia. Tomorrow I will try to remove _TZ3210_ngqk6jia from a working network, connect it to a test hub and sniff traffic.
For _TZ3210_weaqkhab countdown timer value is reported to:
0x4001 > 16385 > "onTime"
0x4002 > 16386 > "offWaitTime"
depending on the current state of the device - On or Off It's not possible to read it unlike _TZ3210_ngqk6jia. P.S. It seems that converters for _TZ3210_ngqk6jia and _TZ3210_weaqkhab should be separated, especially in _TZ3210_weaqkhab it is guaranteed that Power-on behaviour, Switch type, Light type, Max brightness will not work.
Could you post a screenshot here of the package send when you change the value?