zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

No white channel on RGBW controller 'TS0504B'

Open rmickael62 opened this issue 5 years ago • 84 comments

I just bought the same model of controller "TS0504B" but I do not understand how to control the white channel? TS0504B

Originally posted by @rmickael62 in https://github.com/Koenkk/zigbee2mqtt/issues/6299#issuecomment-783249778

rmickael62 avatar Feb 22 '21 11:02 rmickael62

devices.js { fingerprint: [{modelID: 'TS0504B', manufacturerName: '_TZ3000_ukuvyhaa'}], model: 'TS0504B', vendor: 'TuYa', description: 'Zigbee smart mini led strip controller 5V/12V/24V RGBW', extend: preset.light_onoff_brightness_colorxy(), <= preset.light_onoff_brightness_colortemp_colorxy() ? meta: {applyRedFix: true}, }, small precision the led strip used with this controller is in RGBWW so it lacks "white_value". Any ideas ?

rmickael62 avatar Feb 23 '21 09:02 rmickael62

The Zigbee ZCL spec does not define anything like a white_value. Did you try with preset.light_onoff_brightness_colortemp_colorxy() does it work then?

Can you also share the data/database.db entry of this device?

Koenkk avatar Feb 23 '21 17:02 Koenkk

preset.light_onoff_brightness_colortemp_colorxy() => does not work.

database.db : {"id":52,"type":"Router","ieeeAddr":"0x60a423fffee28dac","nwkAddr":60195,"manufId":4098,"manufName":"_TZ3000_ukuvyhaa","powerSource":"Mains (single phase)","modelId":"TS0504B","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":269,"inClusterList":[0,3,4,5,6,4096,8,768],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"modelId":"TS0504B","manufacturerName":"_TZ3000_ukuvyhaa","powerSource":1,"zclVersion":3,"appVersion":66,"stackVersion":0,"hwVersion":1,"dateCode":""}},"lightingColorCtrl":{"attributes":{"colorCapabilities":25}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":66,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{"configured":2},"lastSeen":1614102988277}

rmickael62 avatar Feb 23 '21 18:02 rmickael62

Given that is only has 1 endpoint. It seems the white channel is controlled in some non standard way. You will need to sniff the traffic with the original gateway while controlling the white channel and post it here: https://www.zigbee2mqtt.io/how_tos/how_to_sniff_zigbee_traffic.html

Koenkk avatar Feb 23 '21 18:02 Koenkk

I don't have an original gateway, is it possible with a sonoff zigbee bridge? knowing that the device is compatible with tuya and alexa.

rmickael62 avatar Feb 23 '21 19:02 rmickael62

I don't know if you can set it with a sonoff zigbee bridge, you can try.

Koenkk avatar Feb 24 '21 16:02 Koenkk

Hi @rmickael62, I have the same problem. Have you been able to solve it?

jti989 avatar Mar 09 '21 10:03 jti989

Hi @jti989, I think that the white channel cannot be controlled directly in zigbee (obligation to use the button) I would use this module only for RGB.

rmickael62 avatar Mar 09 '21 16:03 rmickael62

Hopefully a solution can be found. Unfortunately, I can not control white either.

bluefish007 avatar Mar 16 '21 13:03 bluefish007

I spent some time with the controller and recognised that there are zigbee messages that may be useful for implementing this. When I first changed the color mode to white (coming from RGB) with the hardware button, there was this message:

Zigbee2MQTT:debug 2021-03-23 12:30:26: Received Zigbee message from '0x60a423fffe94d1d8', type 'attributeReport', cluster 'lightingColorCtrl', data '{"tuyaRgbMode":2}' from endpoint 1 with groupID 0

When changing colors afterwards there are messages like this: Zigbee2MQTT:debug 2021-03-23 12:40:43: Received Zigbee message from '0x60a423fffe94d1d8', type 'raw', cluster 'lightingColorCtrl', data '{"data":[24,15,10,3,240,72,10,2,0,14,13,0,15,0,0,232,232],"type":"Buffer"}' from endpoint 1 with groupID 0

And when switching to white again the message is longer: Zigbee2MQTT:debug 2021-03-23 12:40:51: Received Zigbee message from '0x60a423fffe94d1d8', type 'raw', cluster 'lightingColorCtrl', data '{"data":[24,17,10,3,240,72,18,4,3,70,70,120,240,232,232,0,0,70,70,120,192,232,10,0,0],"type":"Buffer"}' from endpoint 1 with groupID 0

I don't know how to decode these messages, but I have the feeling that the information we need is in it. Could we reopen this topic @Koenkk and @rmickael62 ?

jti989 avatar Mar 23 '21 12:03 jti989

I'm interested in fixing this issue. Thanks

maurizioandreotti60 avatar Mar 31 '21 10:03 maurizioandreotti60

Me too! Thank you

mramirezd avatar Mar 31 '21 16:03 mramirezd

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar May 01 '21 00:05 github-actions[bot]

Problem still exists :(

bluefish007 avatar May 05 '21 21:05 bluefish007

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Jun 05 '21 00:06 github-actions[bot]

Unfortunately it still does not work!

bluefish007 avatar Jun 05 '21 10:06 bluefish007

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Jul 07 '21 00:07 github-actions[bot]

Still not working!

bluefish007 avatar Jul 07 '21 08:07 bluefish007

I managed to get it to work with this code:

const definition = {
        fingerprint: [{modelID: 'TS0504B', manufacturerName: '_TZ3000_ukuvyhaa'}],
        model: 'TS0504B',
        vendor: 'TuYa',
        description: 'Zigbee RGBW light',
        toZigbee: [tz.on_off, tz.tuya_led_control],
        fromZigbee: [fz.on_off, fz.tuya_led_controller, fz.brightness, fz.ignore_basic_report],
        exposes: [e.light_brightness_colortemp_colorhs([498, 500]).removeFeature('color_temp_startup')],
        meta: {applyRedFix: true, enhancedHue: false},
};

Just set any value as color temperature and the controller deactivates the RGB output and activates the W output with the respective brightness set.

It's not the best solution but at least it works. Better than nothing

MattiaFochesato avatar Jul 17 '21 14:07 MattiaFochesato

@MattiaFochesato

Thanks for this idea! But how to go back to RGB? I do not come back when I enter a color...

And I can't control brightness after this change...

bluefish007 avatar Jul 17 '21 15:07 bluefish007