- Platform information:
- Docker Container
- openHAB version: 3.2.0
When configuring a 5-channel LED Strip (RGB, WW, CW) via MQTT as one thing with three channels, I can set the Colors properly (mqtt message correctly send with correct HSB value) but when I try to set the color temperature (slider from cold white to warm white), the colder the temperature gets, the more the dimmer value gets decreased (it gets darker). There seems to be some kind of connection between the color temperature slider and the dimmer value. Example message where I set the color temperature to ācoldā (coldest value is 153 according to tasmota docs):
{"POWER":"ON","Dimmer":13,"Color":"0000002100","HSBColor":"0,0,0","White":13,"CT":153,"Channel":[0,0,0,13,0]}
I then tried to decouple those with configuring three things with only one channel for each thing and suddenly the color temperature set via slider is send correctly with the MQTT message without interfering the dimmer value. Exampe message where I did the same as above:
{"POWER":"ON","Dimmer":100,"Color":"000000FF00","HSBColor":"0,0,0","White":100,"CT":153,"Channel":[0,0,0,100,0]}
The Value of the key āWhiteā seems to be coupled to the Dimmer value which is fine and didnāt make any problems so I ignored that.
As a side note: I flashed the LED Controller with Tasmota so the expected color temperature values are from 153 to 500 which I configured with the min and max option.
Configs:
mqtt.things
Bridge mqtt:broker:mosquitto "mqttBroker" [ host="localhost", port=1883, secure=false ]
{
// Problems with this config
Thing topic rgbcct1 "LED Strip 1" @ "Other" {
Channels:
Type color: rgbcct1Color [stateTopic="stat/RGBCCT_1", commandTopic="cmnd/RGBCCT_1/HSBColor", transformationPattern="JSONPATH:$.HSBColor"]
Type dimmer: rgbcct1Temp [stateTopic="stat/RGBCCT_1", commandTopic="cmnd/RGBCCT_1/CT", transformationPattern="JSONPATH:$.CT", min=153, max=500]
Type dimmer: rgbcct1Dimmer [stateTopic="stat/RGBCCT_1", commandTopic="cmnd/RGBCCT_1/Dimmer", transformationPattern="JSONPATH:$.Dimmer"]
}
// These configs work fine
Thing topic rgbcct1CP1 "LED Strip 1 CP1" @ "Other" {
Channels:
Type color: rgbcct1ColorCP [stateTopic="stat/RGBCCT_1", commandTopic="cmnd/RGBCCT_1/HSBColor", transformationPattern="JSONPATH:$.HSBColor"]
}
Thing topic rgbcct1CP2 "LED Strip 1 CP2" @ "Other" {
Channels:
Type dimmer: rgbcct1TempCP [stateTopic="stat/RGBCCT_1", commandTopic="cmnd/RGBCCT_1/CT", transformationPattern="JSONPATH:$.CT", min=153, max=500]
}
Thing topic rgbcct1CP3 "LED Strip 1 CP3" @ "Other" {
Channels:
Type dimmer: rgbcct1DimmerCP [stateTopic="stat/RGBCCT_1", commandTopic="cmnd/RGBCCT_1/Dimmer", transformationPattern="JSONPATH:$.Dimmer"]
}
}
ledStripTest.items
// Items for "broken" things
Color rgbcct1Color "rgb1Color" <colorwheel> ["Color"] { channel="mqtt:topic:mosquitto:rgbcct1:rgbcct1Color" }
Dimmer rgbcct1Temp "rgb1Temp" <temperature> ["ColorTemperature"] { channel="mqtt:topic:mosquitto:rgbcct1:rgbcct1Temp" }
Dimmer rgbcct1Dimmer "rgbcct1Dimmer" <slider> ["Dimmer"] { channel="mqtt:topic:mosquitto:rgbcct1:rgbcct1Dimmer" }
// Items which work fine
Color rgbcct1ColorCP "rgb1Color" <colorwheel> ["Color"] { channel="mqtt:topic:mosquitto:rgbcct1CP1:rgbcct1ColorCP" }
Dimmer rgbcct1TempCP "rgb1Temp" <temperature> ["ColorTemperature"] { channel="mqtt:topic:mosquitto:rgbcct1CP2:rgbcct1TempCP" }
Dimmer rgbcct1DimmerCP "rgbcct1Dimmer" <slider> ["Dimmer"] { channel="mqtt:topic:mosquitto:rgbcct1CP3:rgbcct1DimmerCP" }
ledStripTest.sitemap
sitemap ledStripTest label="LED strip test" {
Frame label="experimental" {
Colorpicker item=rgbcct1Color label="Color" icon="colorwheel"
Slider item=rgbcct1Temp label="Light temp" icon="sun"
Slider item=rgbcct1Dimmer label="Brightness" icon="sun_clouds"
}
Frame label="experimentalCP" {
Colorpicker item=rgbcct1ColorCP label="Color" icon="colorwheel"
Slider item=rgbcct1TempCP label="Light temp" icon="sun"
Slider item=rgbcct1DimmerCP label="Brightness" icon="sun_clouds"
}
}
Is there a reason or a misconfiguration (or misunderstanding between things and channels)? I dived into the documentation but didnāt found anything that helps on this specific problem. I would prefer having just one thing because the LED Controller is one thing as well and it is much cleaner configuration wise.
edit:
I fiddled around with the configuration because I saw a missing sub path in the stateTopic. And out of nowhere the āall channels in oneā config works just fine now (I added an on-off switch as well):
Thing topic rgbcct1 "LED Strip 1" @ "Other" {
Channels:
Type switch: power [stateTopic="stat/RGBCCT_1/POWER", commandTopic="cmnd/RGBCCT_1/POWER"]
Type color: rgbcct1Color [stateTopic="stat/RGBCCT_1/RESULT", commandTopic="cmnd/RGBCCT_1/HSBColor", transformationPattern="REGEX:(.*HSBColor.*)ā©JSONPATH:$.HSBColor"]
Type dimmer: rgbcct1Temp [stateTopic="stat/RGBCCT_1/RESULT", commandTopic="cmnd/RGBCCT_1/CT", transformationPattern="REGEX:(.*CT.*)ā©JSONPATH:$.CT", min=153, max=500, step=1]
Type dimmer: rgbcct1Dimmer [stateTopic="stat/RGBCCT_1/RESULT", commandTopic="cmnd/RGBCCT_1/Dimmer", transformationPattern="REGEX:(.*Dimmer.*)ā©JSONPATH:$.Dimmer"]
}
What I still donāt understand is that changing the stateTopic has such impact on the commands where channels get mixed.