Adding Paulmann RGBW bulbs to openHAB via MQTT

After experimenting a bit with openHAB and the Zigbee binding I now switched to using MQTT since the Zigbee binding doesn’t support all of my devices I have. However, I’m having trouble including my RGBW light into the system as there’s not really much documentation for it.

I have RGBW lights from Paulmann Light GmbH and I already figured out the necessary topics but I don’t know how to implement them correctly into my thing as channels. I’m already failing with the simplest task that is implementing a Switch channel for power state. The light is controlled via JSON, a sample packet look like this:

{"state":"OFF","brightness":0,"color":{"x":0.384029478563943,"y":0.378951509567474},"color_temp":255}

Note that this packet contains all possible values it can contain for controling the light. You see that the power state is simply ON/OFF so the channel can be the switch type but if I add a switch item, then I only can turn of the bulb and never turn it on again. The switch just simply refuses to turn to on but instead always returns to off (and consequently the bulb always receives OFF as new state)
Here’s how my thing looks:

Thing mqtt:topic:0x00158d00031319da "Deckenlampe Arbeitszimmer" (mqtt:broker:7d5318c4) {
    Channels:
        Type switch : power "Status" [stateTopic="zigbee2mqtt/0x00158d00031319da", commandTopic="zigbee2mqtt/0x00158d00031319da/set/state", transformationPattern="JSONPATH:$.state", on="ON", off="OFF"]
}

Can anyone help me who has the same or a similar lamp? I’m sure somehow it’s possible to control it but I can’t figure out how and it would be sad to buy new bulbs only to get one that are more compatible.

Thanks in advance

1 Like

I suspect the reason why the bulb remains OFF is because, based on the information provided, the brightness is still set to “0” in the sent JSON.

Do you know that you need all three elements in the JSON for every command? It’s really redundant and doesn’t make sense to me that all three would be required. Have you tried {"state": "OFF"} as a command?

Well, you don’t have an outgoing transform to convert the OH command ON to {"state": "ON","brightness":100, "color":{"x":0.384029478563943,"y":0.37895150957474},"color_temp":255}.

Also, the “color” element is not RGBW. Maybe it’s CIE 1931? So you will likely need to create a JS transformation to convert from HSB color space that the Color Item uses to this color coordinate system.

Thanks for the answer. I have now achieved great progress with the help of this link: Zigbee2mqtt revisited: No more ugly transformations
I don’t exactly know what the problem was before but now I can control all aspects of my bulb independently. There is - however - still a problem: I can’t achieve perfect red as color. If I send the color change for the bulb manually via a mqtt client, it changes to red but if I try to use that same command in openHAB, the bulb turns into some sort of purple, even with the help of Alexa I can’t set it to pure red.

Here’s how the color channel looks like now:

Type colorHSB : color "Farbe" [stateTopic="zigbee2mqtt/0x00158d00031319da/color", commandTopic="zigbee2mqtt/0x00158d00031319da/set", formatBeforePublish="{'color':{'hsb':'%s'}}"]

Zigbee2mqtt has built-in converters for rgb/hsb to xy so there’s no need for me to manually convert it first. I don’t know if it’s a bug in OH or an error with my system or something with zigbee2mqtt as the latter can set it to red so it seems to work there. The log of OH also states that the color indeed is set to something like 360,100,100 which I also see in the log of zigbee2mqtt that it received that payload

1 Like

Well, if it’s zigbee2mqwtt that is converting OH’s native HSB to XY than the error is there.

But be aware that it is not possible to perfectly convert from one color system to another all the time. RGB can represent 16.5 million colors. HSB can only represent 3.6 million colors. I don’t know how many colors xy can represent but it’s probably closer to the 16.5 million but that does not mean it’s the same 16.5 million that RGB can represent. As a result, there are 12.9 million colors that are impossible for HSB to represent.

These gaps result in all sorts of rounding type errors that will creep in when converting between the color systems. So it might just be as close to red that HSB converted to XY can get. But your first place to look will be zigbee2mqtt since that is where the HSB is being converted to XY.

I will investigate it further, thanks. Wasn’t sure where I should ask for help. Still I find it weird that I can manually set it but with OH it breaks although I’m using the same call.