Sonoff B1 RGBCW WiFi Bulb w/ Sonoff-Tasmota

Hmm yes… where is this exactly?

The first line where the rule accesses the state.

The way you’ve presented the error doesn’t make sense to me.
Please add a logging line to the beginning of the rule:

logInfo("tisch.rules", "Item received command:" + receivedCommand)
Item received command:271,33,100

Everything looks correct. There’s probably a stupid little mistake in your setup. Please add some more logging lines.

Restarting openHAB somehow fixed it. (While restarting it also uninstalled the rule engine for some reason…)

Thanks for your help! :smiley:

Hi @ThomDietrich, I had @Carywin version working until I upgraded the firmware on the B1s. I’m trying to adapt your version, but I’m struggling to make it work. Could you please post your complete rules and items files?
Thanks.

@Carywin I ended up typing down my own article. So I decided to post a more generic Tutorial:

1 Like

Were you able to fix this based on @ThomDietrich comment?

Hi all, I am trying this configuration on a test environment (RPi3 with OH 2.3) for the Sonoff B1 which has Tasmota version 5.12.0i installed. I used the same configuration as in the first post of this thread.
Switching ON/OFF is working as is the Color picker. But can’t get the Dimmer and Color Temp working.

I also read the Solution from Thom Dietrich: Light Color RGB/RGBW/RGBCW to and from HSB+Dimmer Conversion Here is also mentionned that since Tasmota version 5.12.0.h the conversion HSB <-> RGB no longer is needed. This make me a bit confused; would that be the reason why my config is not working?

I am not a programmer, so could someone please post me a working configuration for the Sonoff B1?
If needed i can post my items, sitemap and rules files…

EDIT, Decided to post the extra info needed right away. I am looking at the mqtt status using this cmd in a terminal:

 mosquitto_sub -v -h 192.168.178.238 -u admin -P ****** -p 1883 -t '+/Sonoff_1B1/#'

And when i use the Sonoff web-if and i set the slides for Cold—Warm and Dark—Bright, i see the results (values 90 and 42.9) both in the terminal and in the OH sitmap.
image

image

This is the items file as i use it:

Dimmer 	dBedroom_Lamp 	"Bedroom Lamp" 				<dimmablelight> 	["Lighting"] 
		{mqtt=">[mybroker:cmnd/Sonoff_1B1/DIMMER:command:*:default],
		<[mybroker:stat/Sonoff_1B1/RESULT:state:JSONPATH($.Dimmer)]",autoupdate="false"}
		
Switch 	sBedroom_Lamp 	"Bedroom Lamp Switch" 			<light> (gAllLights) 
		{mqtt=">[mybroker:cmnd/Sonoff_1B1/POWER:command:*:default],
		<[mybroker:stat/Sonoff_1B1/RESULT:state:JSONPATH($.POWER)]",autoupdate="false"}
		
Color 	cBedroom_Lamp 	"Bedroom Lamp Colour" 			<colorlight> 
		{autoupdate="false"}

Dimmer 	ctBedroom_Lamp 	"Bedroom Lamp Colour Temperature" 	<light> 	
		{autoupdate="false"}
		
String 	mqBR_Lamp_Colour 	"Bedroom Lamp Colour MQTT Target" 	<colorlight> 
		{mqtt=">[mybroker:cmnd/Sonoff_1B1/COLOR:command:*:default],
		<[mybroker:stat/Sonoff_1B1/RESULT:state:JSONPATH($.Color)]",autoupdate="false"}		

This is the sitemap file which i use for this test:

sitemap sonoff1b1Carywin 		label="Sonoff_1B1 Carywin test sitemap" 	{
	Frame label="Date" {
		Text item=Date
	}
	Frame 	label="Test Sonoff_1B1 Carywin"{
		//
		Switch 		item=sBedroom_Lamp 	label="Lamp [%s]"
		Slider 		item=dBedroom_Lamp 	label="Dimmer [%d]"
		Slider 		item=ctBedroom_Lamp 	label="Colour Temp [%.1f]"
		Colorpicker 	item=cBedroom_Lamp 	label="Lamp Colour [%s]"
	}
}

And this is the rules file in which i only changed the publish command in the “Bedroom Colour Temperature” rule:

import java.awt.Color
import java.util.List


rule "Bedroom Lamp Colour Return"
when
	Item mqBR_Lamp_Colour changed
then
	var String RGB = mqBR_Lamp_Colour.state.toString
	var String red_s = RGB.charAt(0).toString + RGB.charAt(1).toString
	var Number red = Integer::parseInt(red_s, 16)
	var String green_s = RGB.charAt(2).toString + RGB.charAt(3).toString
	var Number green = Integer::parseInt(green_s, 16)
	var String blue_s = RGB.charAt(4).toString + RGB.charAt(5).toString
	var Number blue = Integer::parseInt(blue_s, 16)
	val List<Float> hsb = Color.RGBtoHSB(red.intValue, green.intValue, blue.intValue, null)
	var float hue = hsb.get(0)
	hue *= 360
	var float sat = hsb.get(1)
	sat *= 100
	var float bri = hsb.get(2)
	bri *= 100
	val String hsbString = hue + "," + sat + "," + bri
	var HSBType HSB = new HSBType(hsbString)
	cBedroom_Lamp.postUpdate(HSB)
	var String ww_s = RGB.charAt(8).toString + RGB.charAt(9).toString
	var Number ww = Integer::parseInt(ww_s, 16)
	var String cc_s = RGB.charAt(6).toString + RGB.charAt(7).toString
	var Number cc = Integer::parseInt(cc_s, 16)
	var Number ct
	if (ww == 0 && cc == 0) {
		ct = 50
	} else if (ww == 0) {
		ct = 0
	} else if (cc == 0) {
		ct = 100
	} else {
		ct = ww / (ww + cc) * 100
	}
	ctBedroom_Lamp.postUpdate(ct)
end


rule "Bedroom Lamp Colour Output"
when
	Item cBedroom_Lamp received command
then
	if (receivedCommand instanceof HSBType) {
    	var red_n = receivedCommand.red * 2.55
    	var green_n = receivedCommand.green * 2.55
    	var blue_n = receivedCommand.blue * 2.55
	  	var String hex = Integer::toHexString(red_n.intValue)
		if (hex.length < 2) hex = "0" + hex
		var String output = hex
		hex = Integer::toHexString(green_n.intValue)
		if (hex.length < 2) hex = "0" + hex
		output = output + hex
		hex = Integer::toHexString(blue_n.intValue)
		if (hex.length < 2) hex = "0" + hex
		output = output + hex
		var String whites = mqBR_Lamp_Colour.state.toString
		var String whitelevels
		try {
			whitelevels = whites.charAt(6).toString + whites.charAt(7).toString + whites.charAt(8).toString + whites.charAt(9).toString
		} catch(Throwable t) {
			whitelevels = "0000"
		}
	  	logInfo("BRColour","BR Colour: " + output + whitelevels)
		mqBR_Lamp_Colour.sendCommand(output + whitelevels)
  	}
  	else if (receivedCommand == ON){
		sBedroom_Lamp.sendCommand(ON)
  	}
  	else if (receivedCommand == OFF){
		sBedroom_Lamp.sendCommand(OFF)
  	}
end


rule 	"Bedroom Colour Temperature"
when
	Item ctBedroom_Lamp received command
then
	val Number ctValue = (receivedCommand as Number * 3.47) + 153
	publish("mybroker","cmnd/Sonoff_1B1/CT",ctValue.intValue.toString)
end

Hope someone can help me with this…

Kind regards, Bert

1 Like

Do you have the MQTT Action installed? It’s distinct from the Binding

Hi Gary, thank you for your quick reaction! Indeed, i did not had mqtt action enabled. But after doing so, not much has changed. I tried also a restart of openhab and a reboot of my Pi.
What i did discover is when i click the dimmer down, nothing is happening. But wheni right after that change the color in the color picker, than i see the dimmer value going down by one…

In my openhab log i get the following error messages:

pi@bananapro:~$ sudo tail -f /var/log/openhab2/openhab.log
2018-07-30 08:47:39.364 [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-30 08:47:43.404 [INFO ] [ipse.smarthome.model.script.BRColour] - BR Colour: 84d4d30000
2018-07-30 08:49:02.494 [ERROR] [.mqtt.internal.MqttMessageSubscriber] - Error processing MQTT message.
org.openhab.core.transform.TransformationException: Invalid path '$.POWER' in '{"Time":"2018-07-30T07:49:02","Uptime":"3T16:44:46","Vcc":3.152,"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) [?:?]
2018-07-30 08:49:09.797 [ERROR] [.mqtt.internal.MqttMessageSubscriber] - Error processing MQTT message.
org.openhab.core.transform.TransformationException: Invalid path '$.Dimmer' 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-30 08:49:09.806 [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-30 08:49:12.074 [ERROR] [.mqtt.internal.MqttMessageSubscriber] - Error processing MQTT message.
org.openhab.core.transform.TransformationException: Invalid path '$.POWER' in '{"Dimmer":83}'
        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-30 08:49:12.088 [ERROR] [.mqtt.internal.MqttMessageSubscriber] - Error processing MQTT message.
org.openhab.core.transform.TransformationException: Invalid path '$.Color' in '{"Dimmer":83}'
        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-30 08:49:12.528 [ERROR] [.mqtt.internal.MqttMessageSubscriber] - Error processing MQTT message.
org.openhab.core.transform.TransformationException: Invalid path '$.POWER' in '{"Dimmer":83}'
        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-30 08:49:12.536 [ERROR] [.mqtt.internal.MqttMessageSubscriber] - Error processing MQTT message.
org.openhab.core.transform.TransformationException: Invalid path '$.Color' in '{"Dimmer":83}'
        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-30 08:49:13.593 [ERROR] [.mqtt.internal.MqttMessageSubscriber] - Error processing MQTT message.
org.openhab.core.transform.TransformationException: Invalid path '$.POWER' in '{"Dimmer":83}'
        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-30 08:49:13.607 [ERROR] [.mqtt.internal.MqttMessageSubscriber] - Error processing MQTT message.
org.openhab.core.transform.TransformationException: Invalid path '$.Color' in '{"Dimmer":83}'
        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-30 08:49:15.367 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Bedroom Colour Temperature': Could not cast INCREASE to java.lang.Number; line 84, column 24, length 25
2018-07-30 08:49:18.531 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Bedroom Colour Temperature': Could not cast DECREASE to java.lang.Number; line 84, column 24, length 25
2018-07-30 08:49:19.946 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Bedroom Colour Temperature': Could not cast DECREASE to java.lang.Number; line 84, column 24, length 25

The last error is in this part of the rules file:

then
	val Number ctValue = (receivedCommand as Number * 3.47) + 153
	publish("mybroker","cmnd/Sonoff_1B1/CT",ctValue.intValue.toString)
end

But i can’t see what is wrong. Sorry, i am not a programmer…
Hopefully you can help me further.

BTW, i also tried this Sonoff B1 with HASS in an other Pi i have (changing the broker IP@ in the sonoff) , and there it worked perfectly. So i am sure it has nothing to do with the Tasmota firmware, although it is not at the latest release…

All of the “Error processing MQTT message” errors are known issues that don’t affect operation of this scheme.

The CT rule as it’s written can’t handle the INCREASE or DECREASE commands. I’m using the slider control so I haven’t seen this issue before.

Ok, about the error messages, seems i have to live with that… :wink:
But can you tell me what i have to do to use the slider control…

I think it’s just using “Slider” type on the sitemap, but I use the iOS app which seems to render it differently to what you’re using.

That’s odd, i am using the Slider element type in the sitemap… But it is displayed as Setpoint…
Ok trying to find the cause of this. Thank you so far!

Maybe try [%d] instead of [%.1f]

Hi Gary, i tried that, but without any change in effect.
Until now i was testing this on a test Pi, but i have also tried it now on my production Pi (changed the IP in Tasmota mqtt, and changed the broker-id in the items and rules files).
However the behaviour is exactly the same… I am able to switch the B1 on/off, and i am able to set the color of the color leds with the color picker. But the sliders do not appear as sliders in my sitemap…
But with the Tasmota web-if everything is working OK.
I get the same error messages from mqtt as with the other platform:

2018-07-30 12:17:25.486 [ERROR] [.mqtt.internal.MqttMessageSubscriber] - Error processing MQTT message.
org.openhab.core.transform.TransformationException: Invalid path '$.Color' in '{"POWER":"ON"}'

mqtt messages:

openhab@openhab:~ $ mosquitto_sub -v -h 192.168.178.54 -p 1883 -t '+/Sonoff_1B1/#'
tele/Sonoff_1B1/LWT Online
cmnd/Sonoff_1B1/DIMMER INCREASE
cmnd/Sonoff_1B1/COLOR ff1a160000
cmnd/Sonoff_1B1/POWER ON
stat/Sonoff_1B1/POWER OFF
cmnd/Sonoff_1B1/DIMMER INCREASE
stat/Sonoff_1B1/RESULT {"Dimmer":49}
cmnd/Sonoff_1B1/DIMMER DECREASE
stat/Sonoff_1B1/RESULT {"Dimmer":49}
cmnd/Sonoff_1B1/COLOR 0000002953
stat/Sonoff_1B1/RESULT {"POWER":"ON","Dimmer":32,"Color":"0000002851","HSBColor":"0,0,0","Channel":[0,0,0,16,32],"CT":500}
cmnd/Sonoff_1B1/POWER OFF
stat/Sonoff_1B1/RESULT {"POWER":"OFF"}
stat/Sonoff_1B1/POWER OFF
cmnd/Sonoff_1B1/POWER ON
stat/Sonoff_1B1/RESULT {"POWER":"ON"}
stat/Sonoff_1B1/POWER ON
cmnd/Sonoff_1B1/POWER OFF
stat/Sonoff_1B1/RESULT {"POWER":"OFF"}
stat/Sonoff_1B1/POWER OFF
cmnd/Sonoff_1B1/POWER ON
stat/Sonoff_1B1/RESULT {"POWER":"ON"}
stat/Sonoff_1B1/POWER ON
tele/Sonoff_1B1/STATE {"Time":"2018-07-30T11:22:54","Uptime":"0T01:25:17","Vcc":3.634,"POWER":"ON","Dimmer":32,"Color":"0000002851","HSBColor":"0,0,0","Channel":[0,0,0,16,32],"CT":500,"Scheme":0,"Fade":"OFF","Speed":1,"LedTable":"OFF","Wifi":{"AP":1,"SSId":"NoAccess-3","RSSI":42,"APMac":"5C:49:79:51:78:1E"}}
cmnd/Sonoff_1B1/COLOR 0204022851
stat/Sonoff_1B1/RESULT {"POWER":"ON","Dimmer":31,"Color":"010301264F","HSBColor":"120,67,1","Channel":[0,1,0,15,31],"CT":500}
cmnd/Sonoff_1B1/COLOR 7dcc6d264F
stat/Sonoff_1B1/RESULT {"POWER":"ON","Dimmer":80,"Color":"7CCC6C254E","HSBColor":"110,47,80","Channel":[49,80,42,15,31],"CT":287}
cmnd/Sonoff_1B1/COLOR 89df78254E
stat/Sonoff_1B1/RESULT {"POWER":"ON","Dimmer":87,"Color":"87DC77244D","HSBColor":"110,46,86","Channel":[53,86,47,14,30],"CT":275}

Yeah those errors are just because the format of the message changes depending on what the light is doing, so sometimes the RESULT message doesn’t have “Dimmer” or “Color” parts for the JSON parser to find, it doesn’t affect the working of anything.

It’s probably possible to catch the INCREASE and DECREASE commands in the rule and send an updated value, but I don’t have time to write and test that at the moment. Best workaround I can suggest is using the iOS app or Habmin or something that renders sliders instead of buttons.

Hi Cary, The Slider issue seems to be a problem with the Classic UI, which for some reason i still use by default… In Basic UI the slider works fine.
In the mean time, i switched to ThomDietrichs example and that is working without the INCREASE and DECREASE errors. I do not know if that also was related to the Classic UI as well…
Thank you for trying to help me with this.