Try to add the color channel via generic mqtt device for my tradfri bulb.
Usualy the payload from tradfri bulbs via zigbee2mqtt is like this:
color-x', payload '0.4681'
color-y', payload '0.4402'
When I use any color Mode selection on the channel (HSB, RGB, CIE), i´m getting “Invalid JSON” from zigbee2mqtt log. I thing the values must be transform in any way.
How I can configure the channel, so the color information will be translate correctly?
What is the actual full message that is published by zigbee2mqtt?
2021-01-02 23:45:25.476 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'EGBueroDecke_EG_Buero_Decke_Color' received command 321,0,10
Jan 02 23:45:25 rasp npm: Zigbee2MQTT:debug 2021-01-02 23:45:25: Received MQTT message on 'zigbee2mqtt/EG_Buero_Decke/set' with data '321,0,10'
Jan 02 23:45:25 rasp npm: Zigbee2MQTT:error 2021-01-02 23:45:25: Invalid JSON '321,0,10', skipping...
OK, so this problem is a message
from openHAB to zigbee2mqtt.
Invalid JSON '321,0,10'
Well, it’s not a JSON string as zigbee2mqtt complained about. I would recommend
using , and checking this post:
I also have an Osram RGBW Bulb but unfortunately, your solution doesn’t work for me
I have set the same “formatBeforePublish” pattern but only the first value of the color state is being published. For example the color state is 230,100,100 then only 230 is inserted as the %s inside the format.
I just found the solution:
When we have a comma separated string, the first %s in the format represents the first value, the second %s the second and so on.
Example (you can set the outgoin…
I don’t have a colour bulb, so I’m afraid I don’t have the exact answer, but hopefully the above will get you close!
It works now.
I have set the channel to color mode “RGB”,
in the field “outgoing value format” i use this string:
Tanks for the hints