Hello,
I’m trying to setup my H801 running Tasmota in my new OH3.
A normal Sonoff switch is already running, so MQTT works.
My problem is the setup for the color.
I added an channel for POWER and another for color, but I’m not able to do anything at the color (no options).
I did not find any guides for OH3. Can anyone share his setup?
(H801 means RGBW Light, Power, Brightness and Color)
Can you explain your problem a bit more? You have a Tasmota RGBW light. You have configured a power channel, which works. You have configured a color channel, but color does not work? How exactly does it “not work”? Are there any error messages? What happens if you change the color item? Do you see MQTT messages when changing the color item? From what you write (“I’m not able to do anything at the color (no options)”) I don’t understand what doesn’t work (except “everything”, which is not helpful…)
My setup has a Tasmota RGBW light bulb. The tricky par of talking to this device is (in my opinion) switching between color mode and white mode. I use four channels for this: Power, Brightness (dimmer), Color Temperature for white and Color (HSB).
My channel configuration looks like this (note I have configured this via GUI, not text files: In the Thing definition there are three tabs: “Thing”, “Channels” and “Code”. Since it is more compact to post I give (parts of) the “Code” tab here, instead of screenshots):
Each channel is linked to a corresponding item (like your Ambilight Schreibtisch Color, which looks perfectly fine). If all items have “Property_Light” set you can now operate all items in MainUI, in tab “Equipment” on the card “Lights”. In my case it looks like this:
After pressing the color picker button (white square beside the switch in the last line) and selecting a color the openHAB sends the command cmnd/Wifilight06/HSBCOLOR 207,0,100 to Tasmota and the light turns blue(-ish).
When changing the color temperature to a value between 153 and 500 the bulb is white again.
thank you so much for your answer @Fleck!
It already helped me since it provided more informations about the channels I have to use.
I didn’t know about the “HSBCOLOR”.
I’ve tried setting it up now, but it doesn’t work.
2022-05-29 11:18:40.288 [WARN ] [rnal.handler.GenericMQTTThingHandler] - Channel configuration error
java.lang.IllegalArgumentException: No enum constant org.openhab.binding.mqtt.generic.mapping.ColorMode.
at java.lang.Enum.valueOf(Enum.java:240) ~[?:?]
at org.openhab.binding.mqtt.generic.mapping.ColorMode.valueOf(ColorMode.java:1) ~[bundleFile:?]
at org.openhab.binding.mqtt.generic.values.ValueFactory.createValueState(ValueFactory.java:62) ~[bundleFile:?]
at org.openhab.binding.mqtt.generic.internal.handler.GenericMQTTThingHandler.initialize(GenericMQTTThingHandler.java:159) [bundleFile:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]
at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:829) [?:?]
Hmm, which version of openHAB are you using? I am on version 3.2 and I think there was a change in the MQTT binding some time between 3.0 and 3.2 regarding the color modes.
Strange. I see the stat/tasmota_name/HSBCOLOR mqtt topic coming from Tasmota. Can you send the HSBOLCOR command manually over MQTT Explorer (cmnd/tasmota_schreibtisch/HSBCOLOR) with contents e.g. 135,0,100 and check if you see the corresponding stat message in MQTT Explorer and in openHAB?
I can see the message in the MQTT Explorer when sending the HSBColor command:
Thing in OpenHAB is still null.
But I just saw, that even the Power in OpenHab doesn’t get updated (/POWER, …). But in this case it can be turned on/off via openhab.
I’m on a way to turn on the warm white leds: (Color/Dimmer does work!)
- id: White
channelTypeUID: mqtt:switch
label: White
description: ""
configuration:
commandTopic: cmnd/tasmota_schreibtisch/WHITE
stateTopic: stat/tasmota_schreibtisch/RESULT
off: "0"
on: "100"
It works, but throws the warning:
[ab.binding.mqtt.generic.ChannelState] - Command '{"POWER":"ON","Dimmer":100,"Color":"000000FF00","HSBColor":"237,100,0","White":100,"CT":153,"Channel":[0,0,0,100,0]}' not supported by type 'OnOffValue': No enum constant org.openhab.core.library.types.OnOffType.{"POWER":"ON","Dimmer":100,"Color":"000000FF00","HSBColor":"237,100,0","White":100,"CT":153,"Channel":[0,0,0,100,0]}
How did you solve that switch?
I’m sending 100 for ON, 0 for OFF.
Or is there a more elegant way?