Hello guys,
until last week I had my Smart-Home setup contolled via the Lightify-Bridge. As they will end the support and i wante’d to be more open I dicided to get a cc2531 stick and join you in the openhab world.
As i want to be flexible I decided to go with the stick and not integrate the bridge into openhab. I also chose the mqtt bindings over the zigbee bindings in Paper UI because i have a lot of lightify 4 button switches and could only get one side to work with the zigbee binding. But that will be a problem for another topic i guess.
I started integrating my first plug and my first bulb into openhab using visual studio code. The plug is working nicely (on/off) but the light is causing me headaches. I just can’t get it to change colour using the colorwheel.
I found this topic same problem and copied the code and can’t see any difference. I tried removing formatBeforePublishing and transformationPattern with no result. When i check the variable Lightify_Office_Decke_Color it shows me a value containing 3 numbers whitch look correct, but when cheking what is send to the lamp i can only see the last value of the 3.
Sending {“color”:{“rgb”:“114,100,100”}} to the lamp via MQTT.fx via zigbee2mqtt/Lampe_Office/set changes the color.
If anybody is using the lightify system via zigbee2mqtt i would be glad if you could point me in the right direction or just show me your code so i can compare it to mine. That would be highly apreciated and many thanks in advanced.
My code:
ITEMS:
Switch Lightify_Office_Decke_On "Ein/Aus" {channel="mqtt:topic:mosquitto:Lampe_Office:onoff"}
Color Lightify_Office_Decke_Color "Farbe" <colorwheel> {channel="mqtt:topic:mosquitto:Lampe_Office:colorRGB"}
Dimmer Lightify_Office_Decke_Dimmer "Dimmer [%d %%]" {channel="mqtt:topic:mosquitto:Lampe_Office:dim"}
Things:
Thing topic Lampe_Office "Lampe Büro" @"MQTT" {
Channels:
Type switch : onoff "Power Office Decke" [stateTopic="zigbee2mqtt/Lampe_Office", transformationPattern="JSONPATH:$.state", commandTopic="zigbee2mqtt/Lampe_Office/set", on="ON", off="OFF" ]
Type dimmer : dim "Dimmer Office Decke" [stateTopic="zigbee2mqtt/Lampe_Office", transformationPattern="JSONPATH:$.brightness", commandTopic="zigbee2mqtt/Lampe_Office/set", min=1, max=254, step=1, formatBeforePublish="{ \"brightness\" : %s }"]
Type colorRGB : color "Colour Office Decke" [stateTopic="zigbee2mqtt/Lampe_Office", transformationPattern="JSONPATH:$.color", commandTopic="zigbee2mqtt/Lampe_Office/set", formatBeforePublish="{\"color\":{\"rgb\":\"%s\"}}"]
}