You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am using the Ledron YK-16 remote (TS1002) and while basic features (on, off, brightness, battery) are supported, pressing the scene buttons (S1–S8) and the RGB button fails with unmapped cluster errors.
The scene buttons on the Ledron YK-16 (TS1002) send a manufacturer-specific command 253 over the genOnOff cluster. Because of strict ZCL schema parsing in recent versions of zigbee-herdsman, the coordinator logs: zh:controller: Failed to parse frame: Error: Status 'UNSUP_COMMAND' genOnOff:253
Consequently, the message falls back as a raw message: z2m: Received Zigbee message from 'TUY_BTN_REM_161', type 'raw', cluster 'genOnOff', data '{"data":[1,9,253,0,0,8],"type":"Buffer"}'
Additionally, because the command fails standard ZCL parsing, no success acknowledgment (Default Response) is returned to the remote. This causes the remote to assume the message was lost and retry, transmitting the same command up to 5 times for a single physical button press.
Furthermore, the native converter seems to be missing standard color-control converters (such as lightingColorCtrl:moveToHueAndSaturation), meaning the RGB button is unmapped by default.
Solution
I have constructed an external converter that solves both issues:
It captures the raw fallback messages, decodes the button ID, and implements sequence-number-based deduplication (using the transaction sequence byte at index 1) to block the duplicate transmission retries.
It restores the missing standard color-control converters so the color wheel and RGB modes are fully mapped.
Here are the initial logs when pressing scene button S8 (without the converter):
Jun 13 16:03:02 BTN node[100271]: [2026/06/13 16:03:02] debug: zh:controller: Failed to parse frame: Error: Status 'UNSUP_COMMAND' genOnOff:253
Jun 13 16:03:02 BTN node[100271]: [2026/06/13 16:03:02] debug: z2m: Received Zigbee message from 'TUY_BTN_REM_161', type 'raw', cluster 'genOnOff', data '{"data":[1,5,253,0,0,8],"type":"Buffer"}' from endpoint 1 with groupID 0
Jun 13 16:03:02 BTN node[100271]: [2026/06/13 16:03:02] debug: z2m: No converter available for 'TS1002' with cluster 'genOnOff' and type 'raw' and data '{"data":[1,5,253,0,0,8],"type":"Buffer"}'
Here is the external converter code:
constfz=require('zigbee-herdsman-converters/converters/fromZigbee');constexposes=require('zigbee-herdsman-converters/lib/exposes');conste=exposes.presets;// Cache to prevent duplicate triggers from remote transmission retriesconstdeviceCache={};constfzLocal={yk16_raw_scene: {cluster: 'genOnOff',type: ['raw','commandTuyaAction'],convert: (model,msg,publish,options,meta)=>{constieeeAddr=msg.device?.ieeeAddr||'generic';constnow=Date.now();if(msg.type==='raw'&&Buffer.isBuffer(msg.data)){constdata=msg.data;if(data.length>=6&&data[2]===253){constseq=data[1];// ZCL transaction sequence numberconstsceneNum=data[5];// Deduplicate retries caused by the UNSUP_COMMAND status (remote retries up to 5 times)if(deviceCache[ieeeAddr]&&deviceCache[ieeeAddr].seq===seq&&(now-deviceCache[ieeeAddr].time)<3000){return;}deviceCache[ieeeAddr]={ seq,time: now};return{action: `scene_${sceneNum}`};}}elseif(msg.type==='commandTuyaAction'){constdata=msg.data?.data;if(Array.isArray(data)&&data.length>=6){constseq=msg.data?.seq||0;constsceneNum=data[5];if(deviceCache[ieeeAddr]&&deviceCache[ieeeAddr].seq===seq&&(now-deviceCache[ieeeAddr].time)<3000){return;}deviceCache[ieeeAddr]={ seq,time: now};return{action: `scene_${sceneNum}`};}}},},};constdefinition={fingerprint: [{modelID: 'TS1002',manufacturerName: '_TZ3000_zwszqdpy',priority: 5},{modelID: 'TS1002',manufacturerName: '_TZ3000_xa9g7rxs',priority: 5},{modelID: 'TS1002',manufacturerName: '_TZ3000_xwh1e22x',priority: 5},{modelID: 'TS1002',manufacturerName: '_TZ3000_jhqcsfp3',priority: 5},{modelID: 'TS1002',priority: 5}],zigbeeModel: ['TS1002'],model: 'YK-16',vendor: 'Ledron',description: 'RGB+CCT Remote with custom scene button support',fromZigbee: [fz.battery,fz.command_on,fz.command_off,fz.command_move_to_level,fz.command_move_to_color_temp,fz.command_step_color_temperature,fz.command_step,fz.command_move_to_hue_and_saturation,fz.command_move_to_color,fz.command_move_to_hue,fz.command_move_to_saturation,fzLocal.yk16_raw_scene],toZigbee: [],exposes: [e.battery(),e.battery_voltage(),e.action(['on','off','brightness_move_to_level','color_temperature_move','move_to_hue_and_saturation','move_to_color','move_to_hue','move_to_saturation','scene_1','scene_2','scene_3','scene_4','scene_5','scene_6','scene_7','scene_8','scene_9','scene_10','scene_11','scene_12','scene_13','scene_14','scene_15','scene_16'])],};module.exports=definition;
The raw message is intercepted, mapped, and duplicate retries are safely ignored:
Jun 13 16:34:00 BTN node[126444]: debug: z2m: Received Zigbee message from 'TUY_BTN_REM_161', type 'raw', cluster 'genOnOff', data '{"data":[1,45,253,0,0,8],"type":"Buffer"}'
Jun 13 16:34:00 BTN node[126444]: info: z2m: yk16_raw_scene: Decoded button press -> scene_8 (seq: 45)
Jun 13 16:34:00 BTN node[126444]: info: z2m:mqtt: MQTT publish: topic 'mqtt/TUY_BTN_REM_161', payload '{"action":"scene_8","battery":100,"linkquality":185}'
Jun 13 16:34:01 BTN node[126444]: debug: z2m: yk16_raw_scene: ignoring duplicate retry (seq: 45)
Jun 13 16:34:02 BTN node[126444]: debug: z2m: yk16_raw_scene: ignoring duplicate retry (seq: 45)
Natively, zigbee-herdsman-converters seems to use fz.tuya_on_off_action (which converts commandTuyaAction on genOnOff). However, because the parser throws UNSUP_COMMAND on command 253 and fails with an undefined frame, it falls back to a 'raw' type message instead of a structured 'commandTuyaAction'.
Could this fallback handling (or a native ZCL command 253 definition on genOnOff for TS1002 devices) be added natively to zigbee-herdsman-converters?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I am using the Ledron YK-16 remote (TS1002) and while basic features (on, off, brightness, battery) are supported, pressing the scene buttons (S1–S8) and the RGB button fails with unmapped cluster errors.
Zigbee2MQTT
Device Details
Issue Description
The scene buttons on the Ledron YK-16 (TS1002) send a manufacturer-specific command
253over thegenOnOffcluster. Because of strict ZCL schema parsing in recent versions ofzigbee-herdsman, the coordinator logs:zh:controller: Failed to parse frame: Error: Status 'UNSUP_COMMAND' genOnOff:253Consequently, the message falls back as a
rawmessage:z2m: Received Zigbee message from 'TUY_BTN_REM_161', type 'raw', cluster 'genOnOff', data '{"data":[1,9,253,0,0,8],"type":"Buffer"}'Additionally, because the command fails standard ZCL parsing, no success acknowledgment (Default Response) is returned to the remote. This causes the remote to assume the message was lost and retry, transmitting the same command up to 5 times for a single physical button press.
Furthermore, the native converter seems to be missing standard color-control converters (such as
lightingColorCtrl:moveToHueAndSaturation), meaning the RGB button is unmapped by default.Solution
I have constructed an external converter that solves both issues:
Here are the initial logs when pressing scene button S8 (without the converter):
Here is the external converter code:
The raw message is intercepted, mapped, and duplicate retries are safely ignored:
Natively,
zigbee-herdsman-convertersseems to usefz.tuya_on_off_action(which converts commandTuyaAction on genOnOff). However, because the parser throwsUNSUP_COMMANDon command253and fails with an undefined frame, it falls back to a 'raw' type message instead of a structured 'commandTuyaAction'.Could this fallback handling (or a native ZCL command 253 definition on genOnOff for TS1002 devices) be added natively to
zigbee-herdsman-converters?Thanks a lot.
Beta Was this translation helpful? Give feedback.
All reactions