Moes Zigbee Dimmer Touch

Hi All,

Recently purchased the the Zigbee Dimmer with touch, from Moes (from AliExpress)

I've been able to connect it to Hubitat but it's not correctly detected. I tried the Generic Zigbee Dimmer driver, that does not work. I've also tried the custom 'Moes Zigbee Wall Switch 1/2/3-Gang' driver. This is able to switch on/off but no dimmer functionality.

Just wondering if there is a custom driver available. Initial search did not bring anything up.

Details..

Current States

  • lastCheckin : Sun Sep 18 22:54:39 BST 2022
  • switch : on

State Variables

  • packetID : 0
  • rxCounter : 16
  • hashStringPars : bdbdbdbdbdbdbdbdbdbdbd
  • driverVersion : 1.0.12 2022/09/05 6:09 PM
  • bin : 2
  • txCounter : 1
  • notPresentCounter : 0
  • lastBattery : 100
  • motionStarted : 1663537041562

Data

  • endpointId: 01
  • model: TS0601
  • application: 44
  • manufacturer: _TZE200_w4cryh2i

Thanks,

RG

1 Like

I am not aware of a fully working HE driver for this device, it seems that it uses Tuya specific cluster for the brightness control. I have experimented with a similar dimmer some months ago, but never finished this project.. : (

Can you manually install and try this test driver code?

After installing the driver, delete the device from the web page and then pair it again to HE. Will this driver be assigned automatically during the pairing?

Make sure the debug logging is enabled. I will need some logs when the dimmer is switched on and off and when the brightness is ramped up and down from the knob.

Dimming from HE will not work (yet), but I expect that when you increase/decrease the brightness from the knob, the device 'level' attribute in HE to change.

2 Likes

Hi kkossev,

Thanks so much for your earlier reply and apologies for delay in getting back. I have had building work started at home.

I installed the new driver. the status is as follows (as you stated)

  • Any changes on the switch itself is reflected within hubitat
  • From hubitat the on / off buttons work, but the toggle button doesn't and neither can you set the dim level from Hubitat

Current States

  • level : 50
  • switch : on

State Variables

  • packetID : 0
  • rxCounter : 17
  • hashStringPars : bdbdbdbdbdbdbdbdbdbdbd
  • driverVersion : 0.2.4 2022/09/19 8:13 AM
  • txCounter : 1
  • notPresentCounter : 0
  • lastBattery : 100
  • motionStarted : 1663707670846

Data

  • endpointId: 01
  • application: 44
  • manufacturer: _TZE200_w4cryh2i
  • model: TS0601

After installing your driver and repairing, by default assigns to 'Tuya Multi Sensor 4 In 1' driver, which I added for the motion sensor.

Will add some Debug below.

Thanks,

RG

1 Like

Not sure if this is too much, or not enough, but here is some debug....

dev:5572022-09-27 14:40:41.649debugonSwitchLevel: Value=100 level=100

dev:5572022-09-27 14:40:41.647debugonSwitchLevel: value=100

dev:5572022-09-27 14:40:41.646infoBrightness 01 is 100%

dev:5572022-09-27 14:40:41.644tracecatchall clusterId=EF00 command=01 data=[00, 01, 02, 02, 00, 04, 00, 00, 03, E8]

dev:5572022-09-27 14:40:41.642debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 000102020004000003E8, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00, 01, 02, 02, 00, 04, 00, 00, 03, E8]]

dev:5572022-09-27 14:40:41.640infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 000102020004000003E8

dev:5572022-09-27 14:40:33.280debugonSwitchLevel: Value=9 level=9

dev:5572022-09-27 14:40:33.279debugonSwitchLevel: value=9

dev:5572022-09-27 14:40:33.278infoBrightness 01 is 9%

dev:5572022-09-27 14:40:33.275tracecatchall clusterId=EF00 command=01 data=[00, 01, 02, 02, 00, 04, 00, 00, 00, 5A]

dev:5572022-09-27 14:40:33.273debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 0001020200040000005A, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00, 01, 02, 02, 00, 04, 00, 00, 00, 5A]]

dev:5572022-09-27 14:40:33.270infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 0001020200040000005A

dev:5572022-09-27 14:40:32.361debugonSwitchLevel: Value=18 level=18

dev:5572022-09-27 14:40:32.359debugonSwitchLevel: value=18

dev:5572022-09-27 14:40:32.358infoBrightness 01 is 18%

dev:5572022-09-27 14:40:32.356tracecatchall clusterId=EF00 command=01 data=[00, 01, 02, 02, 00, 04, 00, 00, 00, B4]

dev:5572022-09-27 14:40:32.354debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 000102020004000000B4, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00, 01, 02, 02, 00, 04, 00, 00, 00, B4]]

dev:5572022-09-27 14:40:32.351infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 000102020004000000B4

dev:5572022-09-27 14:40:23.521infoSwitch 01 is on

dev:5572022-09-27 14:40:23.520tracecatchall clusterId=EF00 command=01 data=[00, 01, 01, 01, 00, 01, 01]

dev:5572022-09-27 14:40:23.517debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 00010101000101, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00, 01, 01, 01, 00, 01, 01]]

dev:5572022-09-27 14:40:23.515infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 00010101000101

dev:5572022-09-27 14:40:20.652infoSwitch 01 is off

dev:5572022-09-27 14:40:20.648tracecatchall clusterId=EF00 command=01 data=[00, 01, 01, 01, 00, 01, 00]

dev:5572022-09-27 14:40:20.646debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 00010101000100, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00, 01, 01, 01, 00, 01, 00]]

dev:5572022-09-27 14:40:20.643infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 00010101000100

dev:5572022-09-27 14:39:35.632warnUNPROCESSED endpoint=01 cluster=0000 command=0A attrInt = 65503 value= data=null

dev:5572022-09-27 14:39:35.630warnexception caught while parsing description: read attr - raw: 4D8901000012DFFF42050000000005, dni: 4D89, endpoint: 01, cluster: 0000, size: 12, attrId: FFDF, encoding: 42, command: 0A, value: 050000000005

dev:5572022-09-27 14:39:35.628debugReceived parsed: [raw:4D8901000012DFFF42050000000005, dni:4D89, endpoint:01, cluster:0000, size:12, attrId:FFDF, encoding:42, command:0A, value:, clusterInt:0, attrInt:65503]

dev:5572022-09-27 14:39:35.619infoReceived raw: read attr - raw: 4D8901000012DFFF42050000000005, dni: 4D89, endpoint: 01, cluster: 0000, size: 12, attrId: FFDF, encoding: 42, command: 0A, value: 050000000005

dev:5572022-09-27 14:38:35.763debugonSwitchLevel: Value=58 level=58

dev:5572022-09-27 14:38:35.762debugonSwitchLevel: value=58

dev:5572022-09-27 14:38:35.760infoBrightness 01 is 58%

dev:5572022-09-27 14:38:35.758tracecatchall clusterId=EF00 command=01 data=[00, 01, 02, 02, 00, 04, 00, 00, 02, 44]

dev:5572022-09-27 14:38:35.755debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 00010202000400000244, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00, 01, 02, 02, 00, 04, 00, 00, 02, 44]]

dev:5572022-09-27 14:38:35.753infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 00010202000400000244

dev:5572022-09-27 14:38:35.518debugonSwitchLevel: Value=50 level=50

dev:5572022-09-27 14:38:35.517debugonSwitchLevel: value=50

dev:5572022-09-27 14:38:35.514infoBrightness 01 is 50%

dev:5572022-09-27 14:38:35.513tracecatchall clusterId=EF00 command=01 data=[00, 01, 02, 02, 00, 04, 00, 00, 01, F4]

dev:5572022-09-27 14:38:35.510debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 000102020004000001F4, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00, 01, 02, 02, 00, 04, 00, 00, 01, F4]]

dev:5572022-09-27 14:38:35.508infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 000102020004000001F4

dev:5572022-09-27 14:38:35.442debugonSwitchLevel: Value=58 level=58

dev:5572022-09-27 14:38:35.440debugonSwitchLevel: value=58

dev:5572022-09-27 14:38:35.438infoBrightness 01 is 58%

dev:5572022-09-27 14:38:35.436tracecatchall clusterId=EF00 command=01 data=[00, 01, 02, 02, 00, 04, 00, 00, 02, 44]

dev:5572022-09-27 14:38:35.411debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 00010202000400000244, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00, 01, 02, 02, 00, 04, 00, 00, 02, 44]]

dev:5572022-09-27 14:38:35.408infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 00010202000400000244

dev:5572022-09-27 14:38:35.321debugonSwitchLevel: Value=74 level=74

dev:5572022-09-27 14:38:35.319debugonSwitchLevel: value=74

dev:5572022-09-27 14:38:35.317infoBrightness 01 is 74%

dev:5572022-09-27 14:38:35.315tracecatchall clusterId=EF00 command=01 data=[00, 01, 02, 02, 00, 04, 00, 00, 02, E4]

dev:5572022-09-27 14:38:35.313debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 000102020004000002E4, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00, 01, 02, 02, 00, 04, 00, 00, 02, E4]]

dev:5572022-09-27 14:38:35.310infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 000102020004000002E4

dev:5572022-09-27 14:38:35.214debugonSwitchLevel: Value=91 level=91

dev:5572022-09-27 14:38:35.213debugonSwitchLevel: value=91

dev:5572022-09-27 14:38:35.211infoBrightness 01 is 91%

dev:5572022-09-27 14:38:35.209tracecatchall clusterId=EF00 command=01 data=[00, 01, 02, 02, 00, 04, 00, 00, 03, 8E]

dev:5572022-09-27 14:38:35.206debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 0001020200040000038E, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00, 01, 02, 02, 00, 04, 00, 00, 03, 8E]]

dev:5572022-09-27 14:38:35.204infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 0001020200040000038E

dev:5572022-09-27 14:38:34.936debugonSwitchLevel: Value=100 level=100

dev:5572022-09-27 14:38:34.934debugonSwitchLevel: value=100

dev:5572022-09-27 14:38:34.932infoBrightness 01 is 100%

dev:5572022-09-27 14:38:34.928tracecatchall clusterId=EF00 command=01 data=[00, 01, 02, 02, 00, 04, 00, 00, 03, E8]

dev:5572022-09-27 14:38:34.926debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 000102020004000003E8, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00, 01, 02, 02, 00, 04, 00, 00, 03, E8]]

dev:5572022-09-27 14:38:34.923infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 000102020004000003E8

dev:5572022-09-27 14:38:34.708debugonSwitchLevel: Value=66 level=66

dev:5572022-09-27 14:38:34.707debugonSwitchLevel: value=66

dev:5572022-09-27 14:38:34.705infoBrightness 01 is 66%

dev:5572022-09-27 14:38:34.703tracecatchall clusterId=EF00 command=01 data=[00, 01, 02, 02, 00, 04, 00, 00, 02, 94]

dev:5572022-09-27 14:38:34.701debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 00010202000400000294, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00, 01, 02, 02, 00, 04, 00, 00, 02, 94]]

dev:5572022-09-27 14:38:34.699infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 00010202000400000294

dev:5572022-09-27 14:38:34.609debugonSwitchLevel: Value=50 level=50

dev:5572022-09-27 14:38:34.607debugonSwitchLevel: value=50

dev:5572022-09-27 14:38:34.605infoBrightness 01 is 50%

dev:5572022-09-27 14:38:34.603tracecatchall clusterId=EF00 command=01 data=[00, 01, 02, 02, 00, 04, 00, 00, 01, F4]

dev:5572022-09-27 14:38:34.600debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 000102020004000001F4, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00, 01, 02, 02, 00, 04, 00, 00, 01, F4]]

dev:5572022-09-27 14:38:34.598infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 000102020004000001F4

dev:5572022-09-27 14:38:34.509debugonSwitchLevel: Value=9 level=9

dev:5572022-09-27 14:38:34.508debugonSwitchLevel: value=9

dev:5572022-09-27 14:38:34.506infoBrightness 01 is 9%

dev:5572022-09-27 14:38:34.503tracecatchall clusterId=EF00 command=01 data=[00, 01, 02, 02, 00, 04, 00, 00, 00, 5A]

dev:5572022-09-27 14:38:34.500debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 0001020200040000005A, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00, 01, 02, 02, 00, 04, 00, 00, 00, 5A]]

dev:5572022-09-27 14:38:34.498infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 0001020200040000005A

dev:5572022-09-27 14:38:34.078debugonSwitchLevel: Value=9 level=9

dev:5572022-09-27 14:38:34.077debugonSwitchLevel: value=9

dev:5572022-09-27 14:38:34.074infoBrightness 01 is 9%

dev:5572022-09-27 14:38:34.073tracecatchall clusterId=EF00 command=01 data=[00, 01, 02, 02, 00, 04, 00, 00, 00, 5A]

dev:5572022-09-27 14:38:34.070debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 0001020200040000005A, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00, 01, 02, 02, 00, 04, 00, 00, 00, 5A]]

dev:5572022-09-27 14:38:34.068infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 0001020200040000005A

dev:5572022-09-27 14:38:33.975debugonSwitchLevel: Value=18 level=18

dev:5572022-09-27 14:38:33.974debugonSwitchLevel: value=18

dev:5572022-09-27 14:38:33.972infoBrightness 01 is 18%

dev:5572022-09-27 14:38:33.970tracecatchall clusterId=EF00 command=01 data=[00, 01, 02, 02, 00, 04, 00, 00, 00, B4]

dev:5572022-09-27 14:38:33.967debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 000102020004000000B4, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00, 01, 02, 02, 00, 04, 00, 00, 00, B4]]

dev:5572022-09-27 14:38:33.965infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 000102020004000000B4

dev:5572022-09-27 14:38:33.875debugonSwitchLevel: Value=26 level=26

dev:5572022-09-27 14:38:33.874debugonSwitchLevel: value=26

dev:5572022-09-27 14:38:33.871infoBrightness 01 is 26%

dev:5572022-09-27 14:38:33.869tracecatchall clusterId=EF00 command=01 data=[00, 01, 02, 02, 00, 04, 00, 00, 01, 04]

dev:5572022-09-27 14:38:33.867debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 00010202000400000104, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00, 01, 02, 02, 00, 04, 00, 00, 01, 04]]

dev:5572022-09-27 14:38:33.864infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 00010202000400000104

dev:5572022-09-27 14:38:33.787debugonSwitchLevel: Value=50 level=50

dev:5572022-09-27 14:38:33.786debugonSwitchLevel: value=50

dev:5572022-09-27 14:38:33.783infoBrightness 01 is 50%

dev:5572022-09-27 14:38:33.781tracecatchall clusterId=EF00 command=01 data=[00, 01, 02, 02, 00, 04, 00, 00, 01, F4]

dev:5572022-09-27 14:38:33.779debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 000102020004000001F4, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00, 01, 02, 02, 00, 04, 00, 00, 01, F4]]

dev:5572022-09-27 14:38:33.777infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 000102020004000001F4

dev:5572022-09-27 14:38:33.677debugonSwitchLevel: Value=58 level=58

dev:5572022-09-27 14:38:33.675debugonSwitchLevel: value=58

dev:5572022-09-27 14:38:33.673infoBrightness 01 is 58%

dev:5572022-09-27 14:38:33.671tracecatchall clusterId=EF00 command=01 data=[00, 01, 02, 02, 00, 04, 00, 00, 02, 44]

dev:5572022-09-27 14:38:33.668debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 00010202000400000244, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00, 01, 02, 02, 00, 04, 00, 00, 02, 44]]

dev:5572022-09-27 14:38:33.665infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 00010202000400000244

dev:5572022-09-27 14:38:33.557debugonSwitchLevel: Value=74 level=74

dev:5572022-09-27 14:38:33.555debugonSwitchLevel: value=74

dev:5572022-09-27 14:38:33.553infoBrightness 01 is 74%

dev:5572022-09-27 14:38:33.550tracecatchall clusterId=EF00 command=01 data=[00, 01, 02, 02, 00, 04, 00, 00, 02, E4]

dev:5572022-09-27 14:38:33.547debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 000102020004000002E4, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00, 01, 02, 02, 00, 04, 00, 00, 02, E4]]

dev:5572022-09-27 14:38:33.544infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 000102020004000002E4

dev:5572022-09-27 14:38:33.446debugonSwitchLevel: Value=100 level=100

dev:5572022-09-27 14:38:33.445debugonSwitchLevel: value=100

dev:5572022-09-27 14:38:33.442infoBrightness 01 is 100%

dev:5572022-09-27 14:38:33.440tracecatchall clusterId=EF00 command=01 data=[00, 01, 02, 02, 00, 04, 00, 00, 03, E8]

dev:5572022-09-27 14:38:33.438debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 000102020004000003E8, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00, 01, 02, 02, 00, 04, 00, 00, 03, E8]]

dev:5572022-09-27 14:38:33.436infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 000102020004000003E8

dev:5572022-09-27 14:38:33.281debugonSwitchLevel: Value=91 level=91

dev:5572022-09-27 14:38:33.279debugonSwitchLevel: value=91

dev:5572022-09-27 14:38:33.277infoBrightness 01 is 91%

dev:5572022-09-27 14:38:33.274tracecatchall clusterId=EF00 command=01 data=[00, 01, 02, 02, 00, 04, 00, 00, 03, 8E]

dev:5572022-09-27 14:38:33.272debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 0001020200040000038E, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00, 01, 02, 02, 00, 04, 00, 00, 03, 8E]]

dev:5572022-09-27 14:38:33.269infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 0001020200040000038E

dev:5572022-09-27 14:38:32.649debugonSwitchLevel: Value=100 level=100

dev:5572022-09-27 14:38:32.648debugonSwitchLevel: value=100

dev:5572022-09-27 14:38:32.645infoBrightness 01 is 100%

dev:5572022-09-27 14:38:32.642tracecatchall clusterId=EF00 command=01 data=[00, 01, 02, 02, 00, 04, 00, 00, 03, E8]

dev:5572022-09-27 14:38:32.637debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 000102020004000003E8, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00, 01, 02, 02, 00, 04, 00, 00, 03, E8]]

dev:5572022-09-27 14:38:32.635infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 000102020004000003E8

dev:5572022-09-27 14:38:32.543debugonSwitchLevel: Value=91 level=91

dev:5572022-09-27 14:38:32.542debugonSwitchLevel: value=91

dev:5572022-09-27 14:38:32.540infoBrightness 01 is 91%

dev:5572022-09-27 14:38:32.538tracecatchall clusterId=EF00 command=01 data=[00, 01, 02, 02, 00, 04, 00, 00, 03, 8E]

dev:5572022-09-27 14:38:32.536debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 0001020200040000038E, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00, 01, 02, 02, 00, 04, 00, 00, 03, 8E]]

dev:5572022-09-27 14:38:32.533infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 0001020200040000038E

dev:5572022-09-27 14:38:31.453infoSwitch 01 is on

dev:5572022-09-27 14:38:31.451tracecatchall clusterId=EF00 command=01 data=[00, 01, 01, 01, 00, 01, 01]

dev:5572022-09-27 14:38:31.449debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 00010101000101, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00, 01, 01, 01, 00, 01, 01]]

dev:5572022-09-27 14:38:31.447infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 00010101000101

dev:5572022-09-27 14:38:29.080infoSwitch 01 is off

dev:5572022-09-27 14:38:29.079tracecatchall clusterId=EF00 command=01 data=[00, 01, 01, 01, 00, 01, 00]

dev:5572022-09-27 14:38:29.077debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 00010101000100, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00, 01, 01, 01, 00, 01, 00]]

dev:5572022-09-27 14:38:29.073infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 00010101000100

dev:5572022-09-27 14:38:26.778infoSwitch 01 is on

dev:5572022-09-27 14:38:26.776tracecatchall clusterId=EF00 command=01 data=[00, 01, 01, 01, 00, 01, 01]

dev:5572022-09-27 14:38:26.774debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 00010101000101, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00, 01, 01, 01, 00, 01, 01]]

dev:5572022-09-27 14:38:26.772infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 00010101000101

dev:5572022-09-27 14:38:26.180debugonSwitchLevel: Value=50 level=50

dev:5572022-09-27 14:38:26.177debugonSwitchLevel: value=50

dev:5572022-09-27 14:38:26.174infoBrightness 01 is 50%

dev:5572022-09-27 14:38:26.172tracecatchall clusterId=EF00 command=01 data=[00, 01, 02, 02, 00, 04, 00, 00, 01, F4]

dev:5572022-09-27 14:38:26.170debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 000102020004000001F4, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00, 01, 02, 02, 00, 04, 00, 00, 01, F4]]

dev:5572022-09-27 14:38:26.167infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 000102020004000001F4

dev:5572022-09-27 14:38:25.907warnUNHANDLED Tuya cmd=42 value=0

dev:5572022-09-27 14:38:25.906tracecatchall clusterId=EF00 command=11 data=[00, 04, 42]

dev:5572022-09-27 14:38:25.903debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 11 01 000442, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:11, direction:01, data:[00, 04, 42]]

dev:5572022-09-27 14:38:25.901infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 11 01 000442

dev:5572022-09-27 14:38:22.128infoSwitch 01 is off

dev:5572022-09-27 14:38:22.127tracecatchall clusterId=EF00 command=01 data=[00, 01, 01, 01, 00, 01, 00]

dev:5572022-09-27 14:38:22.124debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 00010101000100, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00, 01, 01, 01, 00, 01, 00]]

dev:5572022-09-27 14:38:22.122infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 00010101000100

dev:5572022-09-27 14:38:06.026warnUNHANDLED Tuya cmd=null value=0

dev:5572022-09-27 14:38:06.025tracecatchall clusterId=EF00 command=24 data=[00, 03]

dev:5572022-09-27 14:38:06.022debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 24 01 0003, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:24, direction:01, data:[00, 03]]

dev:5572022-09-27 14:38:06.020infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 24 01 0003

dev:5572022-09-27 14:38:02.183infoCountdown 01 is 0s

dev:5572022-09-27 14:38:02.181tracecatchall clusterId=EF00 command=01 data=[00, 01, 06, 02, 00, 04, 00, 00, 00, 00]

dev:5572022-09-27 14:38:02.178debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 00010602000400000000, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00, 01, 06, 02, 00, 04, 00, 00, 00, 00]]

dev:5572022-09-27 14:38:02.176infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 00010602000400000000

dev:5572022-09-27 14:38:02.077warnUNHANDLED Tuya cmd=0E value=2

dev:5572022-09-27 14:38:02.075tracecatchall clusterId=EF00 command=01 data=[00, 01, 0E, 04, 00, 01, 02]

dev:5572022-09-27 14:38:02.073debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 00010E04000102, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00, 01, 0E, 04, 00, 01, 02]]

dev:5572022-09-27 14:38:02.070infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 00010E04000102

dev:5572022-09-27 14:38:01.977infoLight Mode is 0

dev:5572022-09-27 14:38:01.972tracecatchall clusterId=EF00 command=01 data=[00, 01, 15, 04, 00, 01, 00]

dev:5572022-09-27 14:38:01.969debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 00011504000100, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00, 01, 15, 04, 00, 01, 00]]

dev:5572022-09-27 14:38:01.966infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 00011504000100

dev:5572022-09-27 14:38:01.871warnUNHANDLED Tuya cmd=04 value=0

dev:5572022-09-27 14:38:01.869tracecatchall clusterId=EF00 command=01 data=[00, 01, 04, 04, 00, 01, 00]

dev:5572022-09-27 14:38:01.866debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 00010404000100, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00, 01, 04, 04, 00, 01, 00]]

dev:5572022-09-27 14:38:01.863infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 00010404000100

dev:5572022-09-27 14:38:01.775infoMinimum brightness 01 is 1

dev:5572022-09-27 14:38:01.772tracecatchall clusterId=EF00 command=01 data=[00, 01, 03, 02, 00, 04, 00, 00, 00, 0A]

dev:5572022-09-27 14:38:01.768debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 0001030200040000000A, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00, 01, 03, 02, 00, 04, 00, 00, 00, 0A]]

dev:5572022-09-27 14:38:01.763infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 0001030200040000000A

dev:5572022-09-27 14:38:01.683debugonSwitchLevel: Value=100 level=100

dev:5572022-09-27 14:38:01.681debugonSwitchLevel: value=100

dev:5572022-09-27 14:38:01.676infoBrightness 01 is 100%

dev:5572022-09-27 14:38:01.672tracecatchall clusterId=EF00 command=01 data=[00, 01, 02, 02, 00, 04, 00, 00, 03, E8]

dev:5572022-09-27 14:38:01.668debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 000102020004000003E8, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00, 01, 02, 02, 00, 04, 00, 00, 03, E8]]

dev:5572022-09-27 14:38:01.664infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 000102020004000003E8

dev:5572022-09-27 14:38:01.580infoSwitch 01 is on

dev:5572022-09-27 14:38:01.567tracecatchall clusterId=EF00 command=01 data=[00, 01, 01, 01, 00, 01, 01]

dev:5572022-09-27 14:38:01.565debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 00010101000101, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:4D89, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:01, direction:01, data:[00, 01, 01, 01, 00, 01, 01]]

dev:5572022-09-27 14:38:01.562infoReceived raw: catchall: 0104 EF00 01 01 0040 00 4D89 01 00 0000 01 01 00010101000101

dev:5572022-09-27 14:38:00.639warnUNPROCESSED endpoint=01 cluster=0000 command=0A attrInt = 1 value= 44 data=null

dev:5572022-09-27 14:38:00.628debugReceived parsed: [raw:4D890100001801002044E2FF201FE4FF2001, dni:4D89, endpoint:01, cluster:0000, size:18, attrId:0001, encoding:20, command:0A, value:44, clusterInt:0, attrInt:1, additionalAttrs:[[value:1F, encoding:20, attrId:FFE2, consumedBytes:4, attrInt:65506], [value:01, encoding:20, attrId:FFE4, consumedBytes:4, attrInt:65508]]]

dev:5572022-09-27 14:38:00.616infoReceived raw: read attr - raw: 4D890100001801002044E2FF201FE4FF2001, dni: 4D89, endpoint: 01, cluster: 0000, size: 18, attrId: 0001, encoding: 20, command: 0A, value: 44E2FF201FE4FF2001

dev:5572022-09-27 14:31:21.101warnUNPROCESSED endpoint=01 cluster=0000 command=0A attrInt = 1 value= 44 data=null

1 Like

Thank you for the update! The debug logs that you provided are very helpful. This driver needs some more work to make it fully functional with your dimmer, I will let you know when done in the next few days.

2 Likes

Wow, thanks for making this! No other driver worked for my Tuya Touch Dimmer (the one with a vertical line that shows the level), but your started to at least allow me to switch it off and on via Hubitat. The level adjustments do not work but I think you mentioned it somewhere. What I'm most interested in is setting the minimum level for my light as it goes off after passing 50% so I'd like it to rescale and work within entire range. I see it's supported via the app (it mentions this in manual), but the setting via driver does not seem to have any effect.

I'm getting this output when I save new preferences:

[dev:104](http://192.168.0.129/logs?tab=past&deviceId=104#)2022-10-15 14:32:34.547[warn](http://192.168.0.129/logs?tab=past&deviceId=104#)UNPROCESSED endpoint=01 cluster=0000 command=01 attrInt = 4 value= _TZE200_w4cryh2i data=null

[dev:104](http://192.168.0.129/logs?tab=past&deviceId=104#)2022-10-15 14:32:34.544[warn](http://192.168.0.129/logs?tab=past&deviceId=104#)exception caught while parsing description: read attr - raw: D3ED01000068040042105F545A453230305F77346372796832690000002003010000204405000042065453303630310700003001FEFF003000, dni: D3ED, endpoint: 01, cluster: 0000, size: 68, attrId: 0004, encoding: 42, command: 01, value: 105F545A453230305F77346372796832690000002003010000204405000042065453303630310700003001FEFF003000

[dev:104](http://192.168.0.129/logs?tab=past&deviceId=104#)2022-10-15 14:32:34.541[debug](http://192.168.0.129/logs?tab=past&deviceId=104#)Received parsed: [raw:D3ED01000068040042105F545A453230305F77346372796832690000002003010000204405000042065453303630310700003001FEFF003000, dni:D3ED, endpoint:01, cluster:0000, size:68, attrId:0004, encoding:42, command:01, value:_TZE200_w4cryh2i, clusterInt:0, attrInt:4, additionalAttrs:[[value:03, encoding:20, attrId:0000, consumedBytes:4, attrInt:0], [value:44, encoding:20, attrId:0001, consumedBytes:4, attrInt:1], [value:TS0601, encoding:42, attrId:0005, consumedBytes:9, attrInt:5]]]

[dev:104](http://192.168.0.129/logs?tab=past&deviceId=104#)2022-10-15 14:32:34.534[info](http://192.168.0.129/logs?tab=past&deviceId=104#)Received raw: read attr - raw: D3ED01000068040042105F545A453230305F77346372796832690000002003010000204405000042065453303630310700003001FEFF003000, dni: D3ED, endpoint: 01, cluster: 0000, size: 68, attrId: 0004, encoding: 42, command: 01, value: 105F545A453230305F77346372796832690000002003010000204405000042065453303630310700003001FEFF003000

[dev:104](http://192.168.0.129/logs?tab=past&deviceId=104#)2022-10-15 14:32:34.423[warn](http://192.168.0.129/logs?tab=past&deviceId=104#)spelling tuyaBlackMagic()

[dev:104](http://192.168.0.129/logs?tab=past&deviceId=104#)2022-10-15 14:32:34.420[debug](http://192.168.0.129/logs?tab=past&deviceId=104#)initialized() device.getData() = [application:44, softwareBuild:null, inClusters:0000,0004,0005,EF00, outClusters:0019,000A, model:TS0601, manufacturer:_TZE200_w4cryh2i]

[dev:104](http://192.168.0.129/logs?tab=past&deviceId=104#)2022-10-15 14:32:34.408[info](http://192.168.0.129/logs?tab=past&deviceId=104#)updated parent->child

I will try debugging and figuring it out, though I have zero experience with Zigbee protocol.

1 Like

@noizex @user2244 please update the driver linked in this post to ver. "0.2.5"
Let me know whether the level control now works for your devices.

Rescaling for TS0601 dimmers doesn't work yet.

1 Like

Updated, level works fine now - thanks @kkossev!
Happy to help if you need anything (logs, trying some feature, debug dumps). I tried to figure out how rescaling works - I assume this is some property of the dimmer itself and I think it has minLevel as well as maxLevel. Went through some Tuya API docs but they're not super helpful. Wonder why this device is so much different than the others (actually model TS0601 seems to correspond to thermostat?)

1 Like

Yes, Tuya dimmers have parameters which limit the minimum and the maximum levels that can be sent to the device - both from the physical keys and from the Zigbee interface commands. I hope after a week or two will have the time needed to implement it.

If you have any pointers where to look (sample/similer implementations in other Tuya devices?) feel free to post them and I will try to dig in the meantime.

1 Like

The remote access to my development and test environment at home that I have set up last week worked fine! I was able to make some additions to this driver while away from home. The only issue was that my Ring indoor camera auto-brightness adjustment makes it very difficult to see what actually happens when I dim down a test bulb - the Ring camera auto-adjustment kicks in and the visual effect is like if the dimmed bulb brightness level is actually leveled up instead of dimming down : )

You can update to driver version "0.2.6" timestamp "2022/10/22 9:27 AM" :

  • added importURL ( points to the dev. branch on Github)
  • added maxLevel preference for TS0601 dimmers
  • toggle() button now works for TS0601 dimmers;
  • 'autoOn' option now works for TS0601;
  • level scaling for TS0601;
  • minLevel and maxLevel receive/send for TS0601;

The minLevel and maxLevel preferences are filled in automatically from the data received by the dimmer device.

The scaling seems to work for me. If you configure minLevel 50, then in HE a brightness level of 0% will actually send brightness 50 to the device. If you set 50% level in HE, the driver will actually send 75% brightness to the device, etc.. I suppose using the dimmer controls the effect will be the same, but I can't test this at the moment.

Please let me know how the latest changes work for your device, it is different than mine.

About the Tuy API documentation available on their site - it is far away from being complete. It is more a recommendation to the many Tuya platform developers, rather than a standard that is followed by all Tuya devices. As example, what is available as documentation for Tuya Dimmer switch here Dimmer Switch-Tuya IoT Development Platform-Tuya Developer has nothing to do with TS0601 dimmers actual implementation. What actually helps in cases like this is a reverse-engineering : ) .. and checking the implementations for the same device in other home automation platforms if available in GitHub.

Sounds like you've got a nice dev setup - glad it works! Thanks for your effort, even if you travel, really appreciated! I wish I had some setup to be able to at least intercept some Zigbee messages as it seems to require literally reverse engineering Tuya device :confused:

I updated the driver and toggle works fine, and it seems that minLevel and maxLevel work within HE level setting but does not seem to affect the dimmer itself. Though I'm not sure about what physical switch displays because it's a bit confusing. Here is the situation:

minLevel=30 maxLevel=100

  • I start from level 100% (level=100 via current states)
  • I dim via HE to 50% (level=50 via current states) but physical switch shows something around 70% (which seems to actually be right, as it should be half of 70% range + 30% base)

  • I dim via HE to 20% (level=20 via current states) but physical switch shows value around 50%, which again is correct if we take scaling into account, but the physical switches state is now different because it's actually not at 20% but 50%

I will check the code but I suppose the state at this point is scaled both when it's sent to the device and received from device, right?

So setting via HE works but the other way around, via dimmer, still works the old way (but is interpreted by HE differently now because of scaling). I wish I had Tuya hub + App to be able to confirm what's the min/max scaling that's saved in the dimmer, as it would be great if I could make it work within the actual range, and not cap at 50% below which it's just dark.

2 Likes

@kkossev seems that I get exception when saving the new min/max levels to the device:

java.lang.NullPointerException: Cannot invoke method getAt() on null object on line 212 (method updated)

which is:
def cmd = this.device.getData().componentName[-2..-1]

I checked and componentName is only present on child devices, and this dimmer is configured to have numEps:1, which I think means there is only parent and no child devices are created by the initialization phase - I tried to make this part pass (by forcing cmd to be "01"), which allowed the code to not throw and logged these operations:

dev:1042022-10-22 10:29:23.592warnMin/Max levels NOT changed on the parent device
dev:1042022-10-22 10:29:23.570infoupdating settings for the parent device ...
dev:1042022-10-22 10:29:23.554infoupdated parent->child
dev:1042022-10-22 10:29:23.523debugsending maxLevel command=05 value=1000 (000003E8)
dev:1042022-10-22 10:29:23.522traceupdated() maxLevel value = 1000
dev:1042022-10-22 10:29:23.519debugsending minLevel command=03 value=300 (0000012C)
dev:1042022-10-22 10:29:23.518traceupdated() minLevel value = 300
dev:1042022-10-22 10:29:23.516info### updating settings for child device null ... device #01

but it did not affect the min level of physical switch in any visible way - probably forcing cmd to some arbitrary value is not a great idea, but not sure what it should be at this point and why componentName is expected

1 Like

I thought this could be the case, as I have tested with multi components device only. Will try to simulate and fix later today.

Can you try again, the version was updated.

Hello, I checked latest version and.. something is happening - no more exceptions and it does seem to be setting the minLevel. Here is log dump after saving new value:

dev:1042022-10-23 00:15:12.957debugTuya command 0x0B data=[00, 00]
dev:1042022-10-23 00:15:12.956debugcatchall clusterId=EF00 command=0B data=[00, 00]
dev:1042022-10-23 00:15:12.954debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 D3ED 00 00 0000 0B 01 0000, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:D3ED, isClusterSpecific:false, isManufacturerSpecific:false, manufacturerId:0000, command:0B, direction:01, data:[00, 00]]
dev:1042022-10-23 00:15:12.952debugReceived raw: catchall: 0104 EF00 01 01 0040 00 D3ED 00 00 0000 0B 01 0000
dev:1042022-10-23 00:15:11.032debugTuya check-in 0004 (_TZE200_w4cryh2i)
dev:1042022-10-23 00:15:11.028warnexception caught while parsing description: read attr - raw: D3ED01000068040042105F545A453230305F77346372796832690000002003010000204405000042065453303630310700003001FEFF003000, dni: D3ED, endpoint: 01, cluster: 0000, size: 68, attrId: 0004, encoding: 42, command: 01, value: 105F545A453230305F77346372796832690000002003010000204405000042065453303630310700003001FEFF003000
dev:1042022-10-23 00:15:11.025debugReceived parsed: [raw:D3ED01000068040042105F545A453230305F77346372796832690000002003010000204405000042065453303630310700003001FEFF003000, dni:D3ED, endpoint:01, cluster:0000, size:68, attrId:0004, encoding:42, command:01, value:_TZE200_w4cryh2i, clusterInt:0, attrInt:4, additionalAttrs:[[value:03, encoding:20, attrId:0000, consumedBytes:4, attrInt:0], [value:44, encoding:20, attrId:0001, consumedBytes:4, attrInt:1], [value:TS0601, encoding:42, attrId:0005, consumedBytes:9, attrInt:5]]]
dev:1042022-10-23 00:15:11.018debugReceived raw: read attr - raw: D3ED01000068040042105F545A453230305F77346372796832690000002003010000204405000042065453303630310700003001FEFF003000, dni: D3ED, endpoint: 01, cluster: 0000, size: 68, attrId: 0004, encoding: 42, command: 01, value: 105F545A453230305F77346372796832690000002003010000204405000042065453303630310700003001FEFF003000
dev:1042022-10-23 00:15:11.001infominLevel brightness parameter was updated to 30%
dev:1042022-10-23 00:15:10.986debugreceived: minimum brightness switch#01 is 30 (raw=300)
dev:1042022-10-23 00:15:10.978debugcatchall clusterId=EF00 command=02 data=[A9, B9, 03, 02, 00, 04, 00, 00, 01, 2C]
dev:1042022-10-23 00:15:10.976debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 D3ED 01 00 0000 02 01 A9B9030200040000012C, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:D3ED, isClusterSpecific:true, isManufacturerSpecific:false, manufacturerId:0000, command:02, direction:01, data:[A9, B9, 03, 02, 00, 04, 00, 00, 01, 2C]]
dev:1042022-10-23 00:15:10.973debugReceived raw: catchall: 0104 EF00 01 01 0040 00 D3ED 01 00 0000 02 01 A9B9030200040000012C
dev:1042022-10-23 00:15:10.955debugTuya command 0x0B data=[00, 00]
dev:1042022-10-23 00:15:10.954debugcatchall clusterId=EF00 command=0B data=[00, 00]
dev:1042022-10-23 00:15:10.952debugReceived parsed: [raw:catchall: 0104 EF00 01 01 0040 00 D3ED 00 00 0000 0B 01 0000, profileId:0104, clusterId:EF00, clusterInt:61184, sourceEndpoint:01, destinationEndpoint:01, options:0040, messageType:00, dni:D3ED, isClusterSpecific:false, isManufacturerSpecific:false, manufacturerId:0000, command:0B, direction:01, data:[00, 00]]
dev:1042022-10-23 00:15:10.950debugReceived raw: catchall: 0104 EF00 01 01 0040 00 D3ED 00 00 0000 0B 01 0000
dev:1042022-10-23 00:15:10.937debugspelling tuyaBlackMagic()
dev:1042022-10-23 00:15:10.933debuginitialized() device.getData() = [application:44, softwareBuild:null, inClusters:0000,0004,0005,EF00, outClusters:0019,000A, model:TS0601, manufacturer:_TZE200_w4cryh2i]
dev:1042022-10-23 00:15:10.904infoupdating settings for the parent device ...
dev:1042022-10-23 00:15:10.902debugupdated parent->child
dev:1042022-10-23 00:15:10.898debugMain Dimmer sendTuyaCommand = [he cmd 0xD3ED 0x01 0xEF00 0x00 {E08505020004000003E8}, delay 2000]
dev:1042022-10-23 00:15:10.895debugsending maxLevel command=05 value=1000 (000003E8)
dev:1042022-10-23 00:15:10.894debugupdated() maxLevel value = 100 (raw=1000)
dev:1042022-10-23 00:15:10.892debugMain Dimmer sendTuyaCommand = [he cmd 0xD3ED 0x01 0xEF00 0x00 {A9B9030200040000012C}, delay 2000]
dev:1042022-10-23 00:15:10.888debugsending minLevel command=03 value=300 (0000012C)
dev:1042022-10-23 00:15:10.887debugupdated() minLevel value = 30 (raw=300)
dev:1042022-10-23 00:15:10.885info### updating settings for device _TZE200_w4cryh2i [numEps:1, model:TS0601, inClusters:0004,0005,EF00,0000, joinName:Moes Zigbee Rotary/Touch Light Dimmer]
dev:1042022-10-23 00:15:10.884debugconfig().numEps = null
dev:1042022-10-23 00:15:10.882debugupdated() ...

The physical dimmer currently changed behavior and the way it works is it blocks changing the level below the minLevel that was set. If I set it to 30% it won't allow me to drag the level below 30%. This is a bit different than what I expected (I thought the dimmer will use entire 0-100 range, but just rescale this value to minLevel:maxLevel range. So not sure if this is what this dimmer does or something is still off - I never used it with Tuya app so can't tell what's the right behavior here :frowning:

1 Like

Latest driver version seems to set the minimum and the maximum levels correctly at the device. It would be great if the device scaled the min/max restrictions to 100% range physical control, but obviously it doesn’t, seems this is the way it is implemented in the dimmer Tuya firmware.

What kind of bulbs are you using? LEDs?
Can you experiment with incandescent bulbs (if you still have some of these around)?

If you are using LED bulbs, are these dimmable? The dimmable LED bulbs should have a special‘dimmable’ symbol on the box and are usually a bit more expensive than the ordinary LED bulbs.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.