Controlling tasmota-flashed RGBWW bulbs, I think I'm missing something

I have a bunch of RGG + color Temp bulbs I’ve flashed with Tasmota. I’m easily able to control power with generic MQTT Item binding, but am struggling with attaching a Color item and using a colorpicker. I’m using the main UI to set things up, but considering going the filesystem route as most (all?) examples I’ve found here on the forums seem to be in that format.

Here’s What I’ve attempted:

Created a generic MQTT thing for my bulb with a color channel. Since my bulb accepts color commands on cmnd/my-bulb/Color, and reports state on stat/my-bulb/RESULT, my configuration ends up looking like this:

  - id: parlor_bulb_color
    channelTypeUID: mqtt:colorRGB
    label: Parlor Bulb Color
    description: ""
    configuration:
      commandTopic: cmnd/my-bulb/Color
      colorMode: RGB
      stateTopic: stat/my-bulb/RESULT
      transformationPattern: JSONPATH:$.Color

Since the RESULT contains JSON, I added the JSONPATH transformation to access the color string. here’s what the result looks like in MQTT:

 {
"POWER":"ON",
"Color":"0,0,0,0,128"
}

Finally, I link the channel to a Color item in my model.
The issue comes when I attempt to test the color channel by inserting a colorpicker cell in my overview, add a colorwheel module for instance, and select the aforementioned Color item.

When I test this colorpicker in run mode, I see nothing but a blank space, which leads me to believe that the state topic or transformation is not working.

What am I missing? What are the steps to debugging state transformations? Should I jump in to defining this stuff in item files etc?

  • Platform information:
    • Hardware: BSD Jail
    • OS: freeBSD 12.3
    • Java Runtime Environment: openjdk 11.0.12 2021-07-20
    • openHAB version: 3.1.0

You are missing what things mean I guess.

transfomationPattern is for incoming transformations from MQTT to openHAB

I wouldn’t jump into just moving to the file system it presents its own challenges.

What file example are you following?

Good analysis. The colorpicker requires a valid starting Item state, NULL won’t do.
Confirm by checking Item state directly - API Explorer perhaps.

That’s just too many parts for RGB, so the colorMode cannot digest it. I think you’ll need a custom transformation for whatever that means; or at least pre-process the RGB part out, if there is one.

How so? I mean to transform the incoming MQTT pattern to extract the color information.

That’s precisely what I need, I’d like to do it with javascript if possible. Ideally, I could control all 5 channels at once via HEX.

JavaScript - Transformation Services | openHAB

This makes some sense to me, though I’m not sure how one goes about debugging.

Its easier than that. I have no hardware to test this.

The incoming MQTT Pattern is Data coming from The broker to openHAB. All good there

Looking at the openHAB item type color


I don’t know if they have added RGB support I have not tried it or looked at it in a while.

You can command using HSB type

Looking at the TASOMTA documentation it supports HSB type

Here is the command

Try adding a new Channel to your generic thing to test as you can’t change channel types after they have been added.

  - id: HSB_COLOR
    channelTypeUID: mqtt:colorHSB
    label: Color of my bulb
    description: ""
    configuration:
      commandTopic: cmnd/my-bulb/HsbColor
      stateTopic: stat/my-bulb/RESULT
      transformationPattern: JSONPATH:$.Color

Link the channel to an item and the item to a color picker.


If you don’t see the wheel the item is probably NULL

I can see the data going to MQTT in the desired format. (MQTT Explorer)

JS transformations can actually log, and you’ll need that for any non-trivial work. The answer is here, if a little buried

This does work, due to the triple. I’ve added CT and Dimmer channels which will work for now, thanks.

Thanks @rossko57 , seems hairy but it will no doubt come in handy.