Light Color RGB/RGBW/RGBCW to and from HSB+Dimmer Conversion

Important! This article is a wiki article. Everyone can edit it. Please do!

The goal of this set of Items and Rules is to convert a proprietary given color information by a light bulb into a further processable Color Item and back.

The solution addresses:

  • An Item representing the color information about a Light Bulb or similar in the form of a String Item
  • An Item representing the color information about a Light Bulb or similar in the form of a Color Item
  • Optionally: Often Light Bulbs offer RBG LEDs and additionally control channels for cold/warm white LEDs. These are represented in the String Item and will be translated to Dimmer Item(s)

Example applications:

  • Sonoff B1 with Tasmota firmware (RGBCW)
  • AiLight with Tasmota firmware (RGBW)

The following rules assume that your lamp publishes and understands color commands in a hex-based concatenated format:

  • Tasmota firmware RGBCW: rrggbbccww, e.g., “FFCCAA7733”
  • Tasmota firmware RGBW: rrggbbww, e.g., “FFCCAA77”

Of course other formats are possible if you adapt the rules accordingly.

Solution

The following Shows the Items and Rules needed for light bulbs with five LED types: Red, Green, Blue, Cold White, Warm White (RGBCW). For Light bulbs with only one white channel (RGBW) or without dedicated white LEDs (RGB), remove the “Dimmer” lines accordingly.

Items File

Switch Lamp_Power            "Lamp General On/Off"            (Lights) {mqtt="..."}
String Lamp_ColorRGBCWString "Color RGBCW hex [0x%s]" <light> (Lights) {mqtt="..."}
Color  Lamp_ColorHSB         "Color HSB"              <light> (Lights)
Dimmer Lamp_CWDimmer         "Dimmer Cold White"      <light> (Lights)
Dimmer Lamp_WWDimmer         "Dimmer Warm White"      <light> (Lights)

Rules File

Unrelated, a good practice I can recommend:

val String filename = "rgbcw-light.rules"

Rule Nr. 1

Receive, convert and store updates by the light bulb / Reacting on an update to the String Item.

rule "RGBCW -> HSB+CW"
when
    Item Lamp_ColorRGBCWString received update
then
    var rgbcw = Lamp_ColorRGBCWString.state.toString
    
    var r = Integer::parseInt(rgbcw.substring(0, 2), 16)
    var g = Integer::parseInt(rgbcw.substring(2, 4), 16)
    var b = Integer::parseInt(rgbcw.substring(4, 6), 16)
    //logInfo(filename, "Input Conversion: r" + r + " g" + g + " b" + b)
    var HSBType hsb = HSBType.fromRGB(r, g, b)
    //logInfo(filename, "Input Conversion: hsb" + hsb)
    
    var cw_dimm = Integer::parseInt(rgbcw.substring(6, 8), 16) * 100 / 255
    var ww_dimm = Integer::parseInt(rgbcw.substring(8, 10), 16) * 100 / 255
    //logInfo(filename, "Input Conversion: cw_dimm" + cw_dimm)
    //logInfo(filename, "Input Conversion: ww_dimm" + ww_dimm)

    Lamp_ColorHSB.postUpdate(hsb)
    Lamp_CWDimmer.postUpdate(cw_dimm)
    Lamp_WWDimmer.postUpdate(ww_dimm)
end

Rule Nr.2

Send Commands to the Light Bulb / Process changes to the Color Item and/or the Dimmer Item(s).

rule "HSB+CW -> RGBCW"
when
    Item Lamp_ColorHSB received command or
    Item Lamp_CWDimmer received command or
    Item Lamp_WWDimmer received command
then
    //logInfo(filename, "Command received: " + receivedCommand)
    if (receivedCommand instanceof OnOffType) {
        if (receivedCommand == ON) {
            Lamp_Power.sendCommand(ON)
        } else {
            Lamp_Power.sendCommand(OFF)
        }
    return;
    }
    var r = ((Lamp_ColorHSB.state as HSBType).getRed * 255 / 100).intValue
    var g = ((Lamp_ColorHSB.state as HSBType).getGreen * 255 / 100).intValue
    var b = ((Lamp_ColorHSB.state as HSBType).getBlue * 255 / 100).intValue
    var cw = ((Lamp_CWDimmer.state as Number) * 255 / 100).intValue
    var ww = ((Lamp_WWDimmer.state as Number) * 255 / 100).intValue
    //logInfo(filename, "Output Conversion: r" + r + " g" + g + " b" + b)
    //logInfo(filename, "Output Conversion: cw" + cw + " ww" + ww)
    var rgbcw = String.format("%02x%02x%02x%02x%02x", r, g, b, cw, ww)
    //logInfo(filename, "Output Conversion: rgbcw" + rgbcw)
    Lamp_ColorRGBCWString.sendCommand(rgbcw)
end

Update on Tasmota Software since Build 5.12.0.h HSB is supported.
So conversion HSB <-> RGB is no longer needed

5.12.0h

…
Add command HSBColor Hue,Sat,Bri (#1642, #2203)
…
Details here:

9 Likes

@rlkoshak @lipp_markus Maybe some aspects from here could go into the Rules DSL -> Type Conversion documentation. Wdyt?

@Kai may I ask shortly, why is there no RGBType as an alternative to HSBType? Are there real reasons or did simply no one write it? I couldn’t find issues on the matter.

Argh, my eyes now hurt :persevere:

This is exactly what bindings are supposed to do - to encapsulate the logic of bringing specific devices to the ESH functional abstraction.

String Lamp_ColorRGBCWString “Color RGBCW hex [0x%s]” (Lights) {mqtt=“…”}

This is really something that should not be exposed to the user, it is some internal value for which there is no suitable UI widget that would make any sense from it.

Because HSB is the ESH abstraction of a color value. We generally do not have alternatives (There is also only an ON/OFF and not a TRUE/FALSE and a location expects lat,long,alt and nothing else.

I understand where your tutorial comes from (low-level integration through MQTT/TCP/HTTP/etc), but please be aware that this is really not recommended and rather for tinkerers.

For the average user, it might be nicer to offer that transformation as a profile on a channel (e.g. of an MQTT thing), but ok, this infrastructure isn’t ready yet…

Oh, Interesting, this topic provoked more feedback than I expected ^^

I do get your point regarding a binding should handle this kind of thing! Every sane technology-specific binding does. The MQTT/TCP/HTTP binding will never be able to cover all of those cases though. That’s a fact, right?

Not sure what you want to say with that. The level of these rules is pretty normal for a rule that does not implement a simple if-this-then-that logic and could have a real usage scenario. Even the less tinkery user might be in need of such an option.

There will always be data we need to further process. Ultimately this is what rules logic is for. Yes this should be avoided, yes we don’t want users to be forced to do so, and yes, many bindings or the profile idea help with that. Still I believe one of the strong suits of openHAB is that the end user can always resort to writing a super-specific logic for his personal need.

Back to Bindings. Actually, a Binding specific to the “Tasmota Firmware MQTT Convention” is indeed something I was thinking about developing (1) when the MQTT base is finished and (2) if I ever find time to do so! :wink:

After some thinking I come to the same conclusion. From a neutral standpoint it is simply not as intuitive to be forced to “misuse” an HSBType object when you actually want to work with RGB. Yes, the type offers getter and setter methods for RGB but still.
It’s pointless to start the discussion now but it would probably have been better to name it ColorType and handle multiple color spaces equally inside with HSV being the default for all I care…

I’m a bit ambivalent about this one. If we did add it to the Type Conversion doc does that start us down a slippery slope of needing to document other types of conversions? Celsius to fahrenheit? Watts and Time to KwH? KM to Miles?

I think all of this information is very useful to many users but I’m concerned it would add length and complexity to that section of the docs, making it harder for the average user to use.

I guess I could go either way.

Interesting question, thanks for bringing it up; interesting thread too.
I certainly can see some value in this and even that it may be helpful to users. However, the concern of how much fragmentation/granularity would be introduced came also to my mind. I think I am leaning that this would easily get out of hand and cause confusion, especially as some bindings will (as they should) handle this and others may not.

Given that I regularly have to scour the forum and internet for conversions of “this” in “that” (poor practical programming skills on my part), I am wondering whether that would not fit rather in a new chapter “Practical problems and some solutions” or similar, with some examples on how to handle transformation through transforms and/or rules to show more of the power of multiple approaches. But again, finding the right boundaries may be difficult, for example I could see this easily get out of hand with times and dates and how to convert these (although it remains a recurrent topic). Disclaimer: sorry, my skills are too inadequate to contribute though.

1 Like

I modified the rules for the AiLight bulb flashed with Tasmota. My config is as follows,

Items

Switch Lamp_Power            "Lamp General On/Off"            (gLights,gBedRoom) {mqtt=">[mosquitto:cmnd/sonoff-7895/POWER:command:*:default], <[mosquitto:stat/sonoff-7895/POWER:state:default]" }
String Lamp_ColorRGBWString "Color RGBCW hex [0x%s]" <colorlight> (gLights,gBedRoom)   {mqtt=">[mosquitto:cmnd/sonoff-7895/COLOR:command:*:default],<[mosquitto:stat/sonoff-7895/RESULT:state:default]",autoupdate="false"}
Color  Lamp_ColorHSB         "Color HSB"              <colorlight> (gLights,gBedRoom)
Dimmer Lamp_WWDimmer         "Dimmer Warm White"      <colorlight> (gLights,gBedRoom)

Rules

val String filename = "rgbw-light.rules"
var Number ww

rule "System startup"
        when
                System started
        then
/*Initial value of dimmer*/
                ww=50
end


rule "RGBW -> HSB+CW"
when
    Item Lamp_ColorRGBWString received update
then
    var rgbw = Lamp_ColorRGBWString.state.toString


    var r = Integer::parseInt(rgbw.substring(0, 2), 16)
    var g = Integer::parseInt(rgbw.substring(2, 4), 16)
    var b = Integer::parseInt(rgbw.substring(4, 6), 16)
    logInfo(filename, "Input Conversion: r" + r + " g" + g + " b" + b)
    var HSBType hsb = HSBType.fromRGB(r, g, b)
    logInfo(filename, "Input Conversion: hsb" + hsb)

    var ww_dimm = Integer::parseInt(rgbw.substring(8, 10), 16) * 100 / 255
    logInfo(filename, "Input Conversion: ww_dimm" + ww_dimm)

    Lamp_ColorHSB.postUpdate(hsb)
    Lamp_WWDimmer.postUpdate(ww_dimm)
end


rule "HSB+CW -> RGBW"
when
    Item Lamp_ColorHSB received command or
    Item Lamp_WWDimmer received command
then
    logInfo(filename, "Command received: " + receivedCommand)
    if (receivedCommand instanceof OnOffType) {
        if (receivedCommand == ON) {
            Lamp_Power.sendCommand(ON)
        } else {
            Lamp_Power.sendCommand(OFF)
        }
    return;
    }
    var r = ((Lamp_ColorHSB.state as HSBType).getRed * 255 / 100).intValue
    var g = ((Lamp_ColorHSB.state as HSBType).getGreen * 255 / 100).intValue
    var b = ((Lamp_ColorHSB.state as HSBType).getBlue * 255 / 100).intValue
    ww = ((Lamp_WWDimmer.state as Number) * 255 / 100).intValue
    logInfo(filename, "Output Conversion: r" + r + " g" + g + " b" + b)
    logInfo(filename, "Output Conversion: ww" + ww)
    var rgbw = String.format("%02x%02x%02x%02x", r, g, b, ww)
    logInfo(filename, "Output Conversion: rgbw" + rgbw)
    Lamp_ColorRGBWString.sendCommand(rgbw)
end

With this I get error on the ww variable,

[ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'HSB+CW -> RGBW': Could not cast NULL to java.lang.Number; line 52, column 12, length 29

How can i fix the rules?

it think this should be ww_dimm = Integer::parseInt(rgbw.substring(6, 8), 16) * 100 / 255

if there are no CW Led in your Lamp

One of your Items is NULL (i.e. does not have a value).This is probably the line that is failing:

 ww = ((Lamp_WWDimmer.state as Number) * 255 / 100).intValue

You need to test that Lamp_WWDimmer.state is not NULL before blindly trying to cast it to Number. And if it is NULL, which you should treat as an unknown state, you will have to decide what to do.

The following rule seems to work,

val String filename = "rgbw-light.rules"

rule "System startup"
        when
                System started
        then
/*Initial value of dimmer, full brightness*/
         if (Lamp_WWDimmer.state == NULL) Lamp_WWDimmer.postUpdate(100)
end


rule "RGBW -> HSB+CW"
when
    Item Lamp_ColorRGBWString received update
then
    var rgbw = Lamp_ColorRGBWString.state.toString


    var r = Integer::parseInt(rgbw.substring(0, 2), 16)
    var g = Integer::parseInt(rgbw.substring(2, 4), 16)
    var b = Integer::parseInt(rgbw.substring(4, 6), 16)
    logInfo(filename, "Input Conversion: r" + r + " g" + g + " b" + b)
    var HSBType hsb = HSBType.fromRGB(r, g, b)
    logInfo(filename, "Input Conversion: hsb" + hsb)

    var ww_dimm = Integer::parseInt(rgbw.substring(6, 8), 16) * 100 / 255
    logInfo(filename, "Input Conversion: ww_dimm" + ww_dimm)

    Lamp_ColorHSB.postUpdate(hsb)
    Lamp_WWDimmer.postUpdate(ww_dimm)
end


rule "HSB+CW -> RGBW"
when
    Item Lamp_ColorHSB received command or
    Item Lamp_WWDimmer received command
then
    logInfo(filename, "Command received: " + receivedCommand)
    if (receivedCommand instanceof OnOffType) {
        if (receivedCommand == ON) {
            Lamp_Power.sendCommand(ON)
        } else {
            Lamp_Power.sendCommand(OFF)
        }
    return;
    }
    logInfo(filename,"HSB Received:"+ Lamp_ColorHSB.state.toString)
    logInfo(filename,"Dimmer Received:"+ Lamp_WWDimmer.state.toString)
    var r = ((Lamp_ColorHSB.state as HSBType).getRed * 255 / 100).intValue
    var g = ((Lamp_ColorHSB.state as HSBType).getGreen * 255 / 100).intValue
    var b = ((Lamp_ColorHSB.state as HSBType).getBlue * 255 / 100).intValue
    var ww = ((Lamp_WWDimmer.state as Number) * 255 / 100).intValue
    logInfo(filename, "Output Conversion: r" + r + " g" + g + " b" + b)
    logInfo(filename, "Output Conversion: ww" + ww)
    var rgbw = String.format("%02x%02x%02x%02x", r, g, b, ww)
    logInfo(filename, "Output Conversion: rgbw" + rgbw)
    Lamp_ColorRGBWString.sendCommand(rgbw)
end

Changing the color from the webui shows,

2018-03-12 17:37:38.420 [INFO ] [rthome.model.script.rgbw-light.rules] - Command received: 15.438597,91.44385,73.333336
2018-03-12 17:37:38.431 [INFO ] [rthome.model.script.rgbw-light.rules] - HSB Received:15.438597,91.44385,73.333336
2018-03-12 17:37:38.440 [INFO ] [rthome.model.script.rgbw-light.rules] - Dimmer Received:0
2018-03-12 17:37:38.469 [INFO ] [rthome.model.script.rgbw-light.rules] - Output Conversion: r187 g60 b16
2018-03-12 17:37:38.473 [INFO ] [rthome.model.script.rgbw-light.rules] - Output Conversion: ww0
2018-03-12 17:37:38.480 [INFO ] [rthome.model.script.rgbw-light.rules] - Output Conversion: rgbwbb3c1000
2018-03-12 17:37:38.537 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'RGBW -> HSB+CW': For input string: "{""

From the Sonoff, i can see the MQTT state,

00:09:28 MQT: stat/sonoff-7895/RESULT = {"POWER":"ON","Dimmer":73,"Color":"BA3B0F00"}

I have four of these 4 bulbs now. I am able to switch them OFF and ON as a group. How can i make them change color as a group?

The item file is like so,

Switch Lamp_Power_1            "Lamp On/Off"            (gLights,gBedRoomLights) {mqtt="blah blah}
String Lamp_ColorRGBWString_1 "Color RGBCW hex [0x%s]"     {mqtt="blah blah}
Color  Lamp_ColorHSB_1         "Color HSB"              <colorlight> (gLights,gBedRoom)
Dimmer Lamp_WWDimmer_1         "Whiteness"      <colorlight> (gLights,gBedRoom)

Switch Lamp_Power_2            "Lamp On/Off"            (gLights,gBedRoomLights) {{mqtt="blah blah}
String Lamp_ColorRGBWString_2 "Color RGBCW hex [0x%s]"     {mqtt="blah blah}
Color  Lamp_ColorHSB_2         "Color HSB"              <colorlight> (gLights,gBedRoom)
Dimmer Lamp_WWDimmer_2         "Whiteness"      <colorlight> (gLights,gBedRoom)

Switch Lamp_Power_3            "Lamp On/Off"            (gLights,gBedRoomLights) {mqtt="blah blah}
String Lamp_ColorRGBWString_3 "Color RGBCW hex [0x%s]"     {mqtt="blah blah}
Color  Lamp_ColorHSB_3         "Color HSB"              <colorlight> (gLights,gBedRoom)
Dimmer Lamp_WWDimmer_3         "Whiteness"      <colorlight> (gLights,gBedRoom)

Switch Lamp_Power_4            "Lamp On/Off"            (gLights,gBedRoomLights){mqtt="blah blah}
String Lamp_ColorRGBWString_4 "Color RGBCW hex [0x%s]"     {mqtt="blah blah}
Color  Lamp_ColorHSB_4         "Color HSB"              <colorlight> (gLights,gBedRoom)
Dimmer Lamp_WWDimmer_4         "Whiteness"      <colorlight> (gLights,gBedRoom)

Newer Tasmota Builds supports the HSB model.
So in many cases no conversion needed anymore

1 Like

Could you give some more information on that?

Create a virtual item (or “proxy item”).

And then create rules like:
“When Color of Group changes, sendCommand of new color to each bulb”

Great development! Could you please add a note to the first posting?

Update on Tasmota Software since Build 5.12.0.h HSB is supported.
So conversion HSB <-> RGB is no longer needed

5.12.0h

  • …
  • Add command HSBColor Hue,Sat,Bri (#1642, #2203)
  • …

Command:
HsbColor ,, Set Hue, Saturation and Brightness

2 Likes

I actually meant the first posting at the top. Down here soon no one will find this important detail! Thanks!

Hey there,
I have succesfully connected my tasmota b1 with openhab with mqtt. Color changing and the other stuff like on /off switching and dimming are working.
Is there a way to keep the dimming setting when changing the color.

For example
color red dimming 20%,
after changing color to blue light will glow to 100%.

With my experimatal rule there is no way for chaning the dimming anymore :frowning:

Color  ColorLed1 "Farbe" (gLED1) [ "Lighting" ] { mqtt=">[broker:cmnd/sonoff-led1/HsbColor:command:*:default]"}

Thank you for helping!

I am having problems with my Sonoff B1 lightbulb and had posted a request here. But i am still trying something, so i widraw my previous posting. To be continued…

Ok, i think i can describe the issue now. I use the configuration of Thom as described in the first post. I was not sure whether i translated the items correctly to sitemap items, but this is my sitemap:

Frame 	label="Test Sonoff_1B1 ThomDietrich"{
		Switch 			item=Lamp_Power 	 			label="Lamp [%s]"
		Colorpicker 	item=Lamp_ColorRGBCWString 		label="Lamp Colour [%s]"
		Slider 			item=Lamp_CWDimmer  			label="Cool White Dimmer [%d]"
		Slider			item=Lamp_WWDimmer				label="Warm White Dimmer [%d]"
		Slider 			item=Lamp_ColorHSB 				label="Colour Temp [%.1f]"	
	}

And this is my items file:

//  items file volgens ThomDietrich:   
//  https://community.openhab.org/t/light-color-rgb-rgbw-rgbcw-to-and-from-hsb-dimmer-conversion/39132
//		
Switch 	Lamp_Power            		"Lamp General On/Off"            			(Lights) 
		{mqtt=">[mybroker:cmnd/Sonoff_1B1/POWER:command:*:default],
		<[mybroker:stat/Sonoff_1B1/RESULT:state:JSONPATH($.POWER)]",autoupdate="false"}
	
	
String 	Lamp_ColorRGBCWString 		"Color RGBCW hex [0x%s]" 		<light> 	(Lights) 
		{mqtt=">[mybroker:cmnd/Sonoff_1B1/COLOR:command:*:default],
		<[mybroker:stat/Sonoff_1B1/RESULT:state:JSONPATH($.Color)]",autoupdate="false"}
		
Color  	Lamp_ColorHSB        	 	"Color HSB"              		<light> 	(Lights)
Dimmer 	Lamp_CWDimmer         		"Dimmer Cold White"      		<light> 	(Lights)
Dimmer 	Lamp_WWDimmer         		"Dimmer Warm White"      		<light> 	(Lights)		

This gives the following picture in Classic UI:

The problem is that i do not have sliders in my sitmap and when i click the UP icon the value’s are going down. This is the same as pressing the DOWN icon. In mqtt i see the following hapening:

stat/Sonoff_1B1/POWER OFF
tele/Sonoff_1B1/LWT Online
cmnd/Sonoff_1B1/POWER ON
stat/Sonoff_1B1/RESULT {"POWER":"ON"}
stat/Sonoff_1B1/POWER ON
cmnd/Sonoff_1B1/COLOR INCREASE
stat/Sonoff_1B1/RESULT {"Color":"000000403E"}
cmnd/Sonoff_1B1/COLOR ON
stat/Sonoff_1B1/RESULT {"Color":"000000403E"}
cmnd/Sonoff_1B1/COLOR OFF
stat/Sonoff_1B1/RESULT {"Color":"000000403E"}
cmnd/Sonoff_1B1/COLOR OFF
stat/Sonoff_1B1/RESULT {"Color":"000000403E"}
cmnd/Sonoff_1B1/COLOR 0000003f3d
stat/Sonoff_1B1/RESULT {"POWER":"ON","Dimmer":24,"Color":"0000003C3B","HSBColor":"0,0,0","Channel":[0,0,0,24,23],"CT":488}
cmnd/Sonoff_1B1/COLOR 0000003a3a
stat/Sonoff_1B1/RESULT {"POWER":"ON","Dimmer":22,"Color":"0000003838","HSBColor":"0,0,0","Channel":[0,0,0,22,22],"CT":500}
cmnd/Sonoff_1B1/COLOR 0000003535
stat/Sonoff_1B1/RESULT {"POWER":"ON","Dimmer":20,"Color":"0000003333","HSBColor":"0,0,0","Channel":[0,0,0,20,20],"CT":500}
tele/Sonoff_1B1/STATE {"Time":"2018-07-31T10:48:10","Uptime":"0T00:25:17","Vcc":3.633,"POWER":"ON","Dimmer":20,"Color":"0000003333","HSBColor":"0,0,0","Channel":[0,0,0,20,20],"CT":500,"Scheme":0,"Fade":"OFF","Speed":1,"LedTable":"OFF","Wifi":{"AP":1,"SSId":"NoAccess-3","RSSI":100,"APMac":"5C:49:79:51:78:1E"}}

And this is the openhab log (i removed all remarks in the rules file):

pi@bananapro:~$ sudo tail -f /var/log/openhab2/openhab.log
2018-07-31 11:46:12.429 [INFO ] [thome.model.script.rgbcw-light.rules] - Input Conversion: ww_dimm24
2018-07-31 11:46:14.188 [ERROR] [.mqtt.internal.MqttMessageSubscriber] - Error processing MQTT message.
org.openhab.core.transform.TransformationException: Invalid path '$.Color' in '{"POWER":"OFF"}'
        at org.openhab.core.transform.TransformationHelper$TransformationServiceDelegate.transform(TransformationHelper.java:67) [212:org.openhab.core.compat1x:2.3.0]
        at org.openhab.binding.mqtt.internal.MqttMessageSubscriber.processMessage(MqttMessageSubscriber.java:138) [210:org.openhab.binding.mqtt:1.12.0]
        at org.openhab.io.transport.mqtt.internal.MqttBrokerConnection.messageArrived(MqttBrokerConnection.java:574) [213:org.openhab.io.transport.mqtt:1.12.0]
        at org.eclipse.paho.client.mqttv3.internal.CommsCallback.deliverMessage(CommsCallback.java:475) [213:org.openhab.io.transport.mqtt:1.12.0]
        at org.eclipse.paho.client.mqttv3.internal.CommsCallback.handleMessage(CommsCallback.java:379) [213:org.openhab.io.transport.mqtt:1.12.0]
        at org.eclipse.paho.client.mqttv3.internal.CommsCallback.run(CommsCallback.java:183) [213:org.openhab.io.transport.mqtt:1.12.0]
        at java.lang.Thread.run(Thread.java:748) [?:?]
2018-07-31 11:47:07.694 [ERROR] [.mqtt.internal.MqttMessageSubscriber] - Error processing MQTT message.
org.openhab.core.transform.TransformationException: Invalid path '$.Color' in '{"POWER":"ON"}'
        at org.openhab.core.transform.TransformationHelper$TransformationServiceDelegate.transform(TransformationHelper.java:67) [212:org.openhab.core.compat1x:2.3.0]
        at org.openhab.binding.mqtt.internal.MqttMessageSubscriber.processMessage(MqttMessageSubscriber.java:138) [210:org.openhab.binding.mqtt:1.12.0]
        at org.openhab.io.transport.mqtt.internal.MqttBrokerConnection.messageArrived(MqttBrokerConnection.java:574) [213:org.openhab.io.transport.mqtt:1.12.0]
        at org.eclipse.paho.client.mqttv3.internal.CommsCallback.deliverMessage(CommsCallback.java:475) [213:org.openhab.io.transport.mqtt:1.12.0]
        at org.eclipse.paho.client.mqttv3.internal.CommsCallback.handleMessage(CommsCallback.java:379) [213:org.openhab.io.transport.mqtt:1.12.0]
        at org.eclipse.paho.client.mqttv3.internal.CommsCallback.run(CommsCallback.java:183) [213:org.openhab.io.transport.mqtt:1.12.0]
        at java.lang.Thread.run(Thread.java:748) [?:?]
2018-07-31 11:47:13.679 [ERROR] [.mqtt.internal.MqttMessageSubscriber] - Error processing MQTT message.
org.openhab.core.transform.TransformationException: Invalid path '$.POWER' in '{"Color":"000000403E"}'
        at org.openhab.core.transform.TransformationHelper$TransformationServiceDelegate.transform(TransformationHelper.java:67) [212:org.openhab.core.compat1x:2.3.0]
        at org.openhab.binding.mqtt.internal.MqttMessageSubscriber.processMessage(MqttMessageSubscriber.java:138) [210:org.openhab.binding.mqtt:1.12.0]
        at org.openhab.io.transport.mqtt.internal.MqttBrokerConnection.messageArrived(MqttBrokerConnection.java:574) [213:org.openhab.io.transport.mqtt:1.12.0]
        at org.eclipse.paho.client.mqttv3.internal.CommsCallback.deliverMessage(CommsCallback.java:475) [213:org.openhab.io.transport.mqtt:1.12.0]
        at org.eclipse.paho.client.mqttv3.internal.CommsCallback.handleMessage(CommsCallback.java:379) [213:org.openhab.io.transport.mqtt:1.12.0]
        at org.eclipse.paho.client.mqttv3.internal.CommsCallback.run(CommsCallback.java:183) [213:org.openhab.io.transport.mqtt:1.12.0]
        at java.lang.Thread.run(Thread.java:748) [?:?]
2018-07-31 11:47:13.727 [INFO ] [thome.model.script.rgbcw-light.rules] - Input Conversion: r0 g0 b0
2018-07-31 11:47:13.736 [INFO ] [thome.model.script.rgbcw-light.rules] - Input Conversion: hsb0,0,0
2018-07-31 11:47:13.757 [INFO ] [thome.model.script.rgbcw-light.rules] - Input Conversion: cw_dimm25
2018-07-31 11:47:13.763 [INFO ] [thome.model.script.rgbcw-light.rules] - Input Conversion: ww_dimm24
2018-07-31 11:47:15.233 [ERROR] [.mqtt.internal.MqttMessageSubscriber] - Error processing MQTT message.
org.openhab.core.transform.TransformationException: Invalid path '$.POWER' in '{"Color":"000000403E"}'
        at org.openhab.core.transform.TransformationHelper$TransformationServiceDelegate.transform(TransformationHelper.java:67) [212:org.openhab.core.compat1x:2.3.0]
        at org.openhab.binding.mqtt.internal.MqttMessageSubscriber.processMessage(MqttMessageSubscriber.java:138) [210:org.openhab.binding.mqtt:1.12.0]
        at org.openhab.io.transport.mqtt.internal.MqttBrokerConnection.messageArrived(MqttBrokerConnection.java:574) [213:org.openhab.io.transport.mqtt:1.12.0]
        at org.eclipse.paho.client.mqttv3.internal.CommsCallback.deliverMessage(CommsCallback.java:475) [213:org.openhab.io.transport.mqtt:1.12.0]
        at org.eclipse.paho.client.mqttv3.internal.CommsCallback.handleMessage(CommsCallback.java:379) [213:org.openhab.io.transport.mqtt:1.12.0]
        at org.eclipse.paho.client.mqttv3.internal.CommsCallback.run(CommsCallback.java:183) [213:org.openhab.io.transport.mqtt:1.12.0]
        at java.lang.Thread.run(Thread.java:748) [?:?]
2018-07-31 11:47:15.319 [INFO ] [thome.model.script.rgbcw-light.rules] - Input Conversion: r0 g0 b0
2018-07-31 11:47:15.338 [INFO ] [thome.model.script.rgbcw-light.rules] - Input Conversion: hsb0,0,0
2018-07-31 11:47:15.382 [INFO ] [thome.model.script.rgbcw-light.rules] - Input Conversion: cw_dimm25
2018-07-31 11:47:15.395 [INFO ] [thome.model.script.rgbcw-light.rules] - Input Conversion: ww_dimm24
2018-07-31 11:47:16.771 [ERROR] [.mqtt.internal.MqttMessageSubscriber] - Error processing MQTT message.
org.openhab.core.transform.TransformationException: Invalid path '$.POWER' in '{"Color":"000000403E"}'
        at org.openhab.core.transform.TransformationHelper$TransformationServiceDelegate.transform(TransformationHelper.java:67) [212:org.openhab.core.compat1x:2.3.0]
        at org.openhab.binding.mqtt.internal.MqttMessageSubscriber.processMessage(MqttMessageSubscriber.java:138) [210:org.openhab.binding.mqtt:1.12.0]
        at org.openhab.io.transport.mqtt.internal.MqttBrokerConnection.messageArrived(MqttBrokerConnection.java:574) [213:org.openhab.io.transport.mqtt:1.12.0]
        at org.eclipse.paho.client.mqttv3.internal.CommsCallback.deliverMessage(CommsCallback.java:475) [213:org.openhab.io.transport.mqtt:1.12.0]
        at org.eclipse.paho.client.mqttv3.internal.CommsCallback.handleMessage(CommsCallback.java:379) [213:org.openhab.io.transport.mqtt:1.12.0]
        at org.eclipse.paho.client.mqttv3.internal.CommsCallback.run(CommsCallback.java:183) [213:org.openhab.io.transport.mqtt:1.12.0]
        at java.lang.Thread.run(Thread.java:748) [?:?]
2018-07-31 11:47:16.927 [INFO ] [thome.model.script.rgbcw-light.rules] - Input Conversion: r0 g0 b0
2018-07-31 11:47:16.945 [INFO ] [thome.model.script.rgbcw-light.rules] - Input Conversion: hsb0,0,0
2018-07-31 11:47:16.974 [INFO ] [thome.model.script.rgbcw-light.rules] - Input Conversion: cw_dimm25
2018-07-31 11:47:16.982 [INFO ] [thome.model.script.rgbcw-light.rules] - Input Conversion: ww_dimm24
2018-07-31 11:47:19.105 [ERROR] [.mqtt.internal.MqttMessageSubscriber] - Error processing MQTT message.
org.openhab.core.transform.TransformationException: Invalid path '$.POWER' in '{"Color":"000000403E"}'
        at org.openhab.core.transform.TransformationHelper$TransformationServiceDelegate.transform(TransformationHelper.java:67) [212:org.openhab.core.compat1x:2.3.0]
        at org.openhab.binding.mqtt.internal.MqttMessageSubscriber.processMessage(MqttMessageSubscriber.java:138) [210:org.openhab.binding.mqtt:1.12.0]
        at org.openhab.io.transport.mqtt.internal.MqttBrokerConnection.messageArrived(MqttBrokerConnection.java:574) [213:org.openhab.io.transport.mqtt:1.12.0]
        at org.eclipse.paho.client.mqttv3.internal.CommsCallback.deliverMessage(CommsCallback.java:475) [213:org.openhab.io.transport.mqtt:1.12.0]
        at org.eclipse.paho.client.mqttv3.internal.CommsCallback.handleMessage(CommsCallback.java:379) [213:org.openhab.io.transport.mqtt:1.12.0]
        at org.eclipse.paho.client.mqttv3.internal.CommsCallback.run(CommsCallback.java:183) [213:org.openhab.io.transport.mqtt:1.12.0]
        at java.lang.Thread.run(Thread.java:748) [?:?]
2018-07-31 11:47:19.208 [INFO ] [thome.model.script.rgbcw-light.rules] - Input Conversion: r0 g0 b0
2018-07-31 11:47:19.231 [INFO ] [thome.model.script.rgbcw-light.rules] - Input Conversion: hsb0,0,0
2018-07-31 11:47:19.266 [INFO ] [thome.model.script.rgbcw-light.rules] - Input Conversion: cw_dimm25
2018-07-31 11:47:19.275 [INFO ] [thome.model.script.rgbcw-light.rules] - Input Conversion: ww_dimm24
2018-07-31 11:47:32.475 [INFO ] [thome.model.script.rgbcw-light.rules] - Command received: INCREASE
2018-07-31 11:47:32.515 [INFO ] [thome.model.script.rgbcw-light.rules] - Output Conversion: r0 g0 b0
2018-07-31 11:47:32.525 [INFO ] [thome.model.script.rgbcw-light.rules] - Output Conversion: cw63 ww61
2018-07-31 11:47:32.536 [INFO ] [thome.model.script.rgbcw-light.rules] - Output Conversion: rgbcw0000003f3d
2018-07-31 11:47:32.707 [INFO ] [thome.model.script.rgbcw-light.rules] - Input Conversion: r0 g0 b0
2018-07-31 11:47:32.716 [INFO ] [thome.model.script.rgbcw-light.rules] - Input Conversion: hsb0,0,0
2018-07-31 11:47:32.742 [INFO ] [thome.model.script.rgbcw-light.rules] - Input Conversion: cw_dimm23
2018-07-31 11:47:32.750 [INFO ] [thome.model.script.rgbcw-light.rules] - Input Conversion: ww_dimm23
2018-07-31 11:47:40.616 [INFO ] [thome.model.script.rgbcw-light.rules] - Command received: INCREASE
2018-07-31 11:47:40.697 [INFO ] [thome.model.script.rgbcw-light.rules] - Output Conversion: r0 g0 b0
2018-07-31 11:47:40.709 [INFO ] [thome.model.script.rgbcw-light.rules] - Output Conversion: cw58 ww58
2018-07-31 11:47:40.732 [INFO ] [thome.model.script.rgbcw-light.rules] - Output Conversion: rgbcw0000003a3a
2018-07-31 11:47:40.884 [INFO ] [thome.model.script.rgbcw-light.rules] - Input Conversion: r0 g0 b0
2018-07-31 11:47:40.931 [INFO ] [thome.model.script.rgbcw-light.rules] - Input Conversion: hsb0,0,0
2018-07-31 11:47:40.962 [INFO ] [thome.model.script.rgbcw-light.rules] - Input Conversion: cw_dimm21
2018-07-31 11:47:40.969 [INFO ] [thome.model.script.rgbcw-light.rules] - Input Conversion: ww_dimm21
2018-07-31 11:47:43.085 [INFO ] [thome.model.script.rgbcw-light.rules] - Command received: DECREASE
2018-07-31 11:47:43.134 [INFO ] [thome.model.script.rgbcw-light.rules] - Output Conversion: r0 g0 b0
2018-07-31 11:47:43.142 [INFO ] [thome.model.script.rgbcw-light.rules] - Output Conversion: cw53 ww53
2018-07-31 11:47:43.151 [INFO ] [thome.model.script.rgbcw-light.rules] - Output Conversion: rgbcw0000003535
2018-07-31 11:47:43.289 [INFO ] [thome.model.script.rgbcw-light.rules] - Input Conversion: r0 g0 b0
2018-07-31 11:47:43.302 [INFO ] [thome.model.script.rgbcw-light.rules] - Input Conversion: hsb0,0,0
2018-07-31 11:47:43.335 [INFO ] [thome.model.script.rgbcw-light.rules] - Input Conversion: cw_dimm20
2018-07-31 11:47:43.344 [INFO ] [thome.model.script.rgbcw-light.rules] - Input Conversion: ww_dimm20
2018-07-31 11:48:12.422 [ERROR] [.mqtt.internal.MqttMessageSubscriber] - Error processing MQTT message.
org.openhab.core.transform.TransformationException: Invalid path '$.POWER' in '{"Time":"2018-07-31T10:48:12","Uptime":"4T19:43:53","Vcc":3.170,"POWER1":"OFF","Wifi":{"AP":1,"SSId":"NoAccess-3","RSSI":36,"APMac":"5C:49:79:51:78:1E"}}'
        at org.openhab.core.transform.TransformationHelper$TransformationServiceDelegate.transform(TransformationHelper.java:67) [212:org.openhab.core.compat1x:2.3.0]
        at org.openhab.binding.mqtt.internal.MqttMessageSubscriber.processMessage(MqttMessageSubscriber.java:138) [210:org.openhab.binding.mqtt:1.12.0]
        at org.openhab.io.transport.mqtt.internal.MqttBrokerConnection.messageArrived(MqttBrokerConnection.java:574) [213:org.openhab.io.transport.mqtt:1.12.0]
        at org.eclipse.paho.client.mqttv3.internal.CommsCallback.deliverMessage(CommsCallback.java:475) [213:org.openhab.io.transport.mqtt:1.12.0]
        at org.eclipse.paho.client.mqttv3.internal.CommsCallback.handleMessage(CommsCallback.java:379) [213:org.openhab.io.transport.mqtt:1.12.0]
        at org.eclipse.paho.client.mqttv3.internal.CommsCallback.run(CommsCallback.java:183) [213:org.openhab.io.transport.mqtt:1.12.0]
        at java.lang.Thread.run(Thread.java:748) [?:?]

There are two errors in the log:

2018-07-31 11:47:16.771 [ERROR] [.mqtt.internal.MqttMessageSubscriber] - Error processing MQTT message.
org.openhab.core.transform.TransformationException: Invalid path '$.POWER' in '{"Color":"000000403E"}'
and
2018-07-31 11:48:12.422 [ERROR] [.mqtt.internal.MqttMessageSubscriber] - Error processing MQTT message.
org.openhab.core.transform.TransformationException: Invalid path '$.POWER' in '{"Time":"2018-07-31T10:48:12","Uptime":"4T19:43:53","Vcc":3.170,"POWER1":"OFF","Wifi":{"AP":1,"SSId":"<deleted>","RSSI":36,"APMac":"<deleted>"}}'

So i see two issues,

  1. the missing sliders in Classic UI and
  2. when the up/down icons should react the same as a slider, then this is not working correct. Both up and down create a decrease of values…

Hopefully someone can help me with this…

The continuing story of…
The problem with the Slider Element Type in the sitemap is cleared. I do not know why but with my install, Slider does not function in Classic UI; However in Basic UI it works fine. I isolated the slider issue bij creating a sitemap with only this lamp. For some reason, i was still using the Classic UI, had never tried the Basic UI…

The only thing still left is the exact configuration of the sitemap; i have now two entries for Cool White Dimmer (item=Lamp_CWDimmer) and Warm White Dimmer (item=Lamp_WWDimmer). These should be combined into one item which slides from Cool to Warm.
Could anyone tell me how to do this?