[SOVLED] How to convert 3 dimmers RGB to colorpicker?

How to make colorpicker?
And how to make that colorpicker send commands to dimmers?
And how to make that if the dimmer values change, so that the colorpicker values change too?

knx.things:

    Thing device inwater [
        pingInterval=300
    ] {
        Type dimmer        : RGBred            "InWater RGB red"                                [ switch="1/0/20", position="1/0/21" ]
        Type dimmer        : RGBgreen          "InWater  RGB green"                                [ switch="1/0/22", position="1/0/23" ]
        Type dimmer        : RGBblue           "InWater  RGB blue"                                  [ switch="1/0/24", position="1/0/25" ]
    }

knx.items:

Dimmer InwaterRGBred   "InWater RGB red color[%s]"   { channel="knx:device:bridge:inwater:RGBred" }
Dimmer InwaterRGBgreen "InWater RGB greencolor [%s]" { channel="knx:device:bridge:inwater:RGBgreen" }
Dimmer InwaterRGBblue  "InWater RGB bluecolor [%s]"  { channel="knx:device:bridge:inwater:RGBblue" }

knx.sitemap:

sitemap knx label="KNX Demo Sitemap" {
  Text label="All in pool" {
    Slider item=InwaterRGBred
    Slider item=InwaterRGBgreen
    Slider item=InwaterRGBblue
  }
}

Personally…

I cheat…

The DMX binding has a colour picker that offers 3 x dimmers and a colour picker.

I link the 4 items to that colour picker and everything works well :slight_smile:

(I do have plenty of DMX kit around the house, so it’s no extra work to have 3 DMX channels taken up by this)

As I say, it’s a cheat. But it works well.

Also means I can run colour chases against the same three DMX channels that the colour picker uses :slight_smile:

1 Like

The tools to create a virtual Color Item, place it on your sitemap as a Colorpicker, convert to separate RGB values, all seem to be here

And here’s a conversion RGB → HSB so that you can update your virtual Color Item from any device feedback.

1 Like

Thanx @rossko57! This programm are works:

knx.things:

    Thing device inwater [
        pingInterval=300
    ] {
        Type dimmer        : RGBred            "InWater RGB red"                                [ switch="1/0/20", position="1/0/21" ]
        Type dimmer        : RGBgreen          "InWater  RGB green"                                [ switch="1/0/22", position="1/0/23" ]
        Type dimmer        : RGBblue           "InWater  RGB blue"                                  [ switch="1/0/24", position="1/0/25" ]
    }

knx.items:

Dimmer InwaterRGBred   "InWater RGB red color[%s]"   { channel="knx:device:bridge:inwater:RGBred" }
Dimmer InwaterRGBgreen "InWater RGB greencolor [%s]" { channel="knx:device:bridge:inwater:RGBgreen" }
Dimmer InwaterRGBblue  "InWater RGB bluecolor [%s]"  { channel="knx:device:bridge:inwater:RGBblue" }
Color  HamamRGBcolorpicker "Hamam"

knx.sitemap:

sitemap knx label="KNX Demo Sitemap" {
  Text label="All in pool" {
    Slider item=InwaterRGBred
    Slider item=InwaterRGBgreen
    Slider item=InwaterRGBblue
    Colorpicker item=HamamRGBcolorpicker label="RGB in Hamam"

  }
}

knx.rules:

rule "HamamRGBcolorpicker Color Item"
  when
    Item HamamRGBcolorpicker received command
  then
  	if (receivedCommand instanceof HSBType) {
        var hsbValue = receivedCommand as HSBType
        
        var redValue =   hsbValue.red.intValue
        var greenValue = hsbValue.green.intValue
        var blueValue =  hsbValue.blue.intValue

        logInfo("redValue", redValue.toString)
        logInfo("greenValue", greenValue.toString)
        logInfo("blueValue", blueValue.toString)
        
        HamamRGBred.sendCommand(redValue)
        HamamRGBgreen.sendCommand(greenValue)
        HamamRGBblue.sendCommand(blueValue)
  	}
  	else if (receivedCommand == ON){
        HamamRGBred.sendCommand(ON)
        HamamRGBgreen.sendCommand(ON)
        HamamRGBblue.sendCommand(ON)
  	}
  	else if (receivedCommand == OFF){
		 HamamRGBred.sendCommand(OFF)
		 HamamRGBgreen.sendCommand(OFF)
		 HamamRGBblue.sendCommand(OFF)
  	}
end
3 Likes

Thanx @MDAR! This is a cool idea! Cool cheat! : )

1 Like

And it’s bi-directional :wink:

Can you write example please?

I don’t use text files, so “writing it” isn’t something I can do :frowning_face:

But here is a screenshot of how I have linked the 4 Item to a virtual colour picker

Where the configuration of the DMX Color Things looks like this

I’m using spare channels of a DMX bridge that is in use.
(You could create a DMX Bridge that just broadcasts to your home network, it’ll add a little traffic, but not much, especially if you put a stupidly low refresh rate rate)

Thanx. I copy youre example. And I understand how it works.
But I don’t understand how can I mapped/linked KNX things/items and DMX things/items.
That there was a bi-directional KNX-DMX

I think…

Just link the KNX Dimmer items to the Dimmer Channel of the Colour Picker.

In paperUI there is a profile option when linking Items to Thing channels.

I think the ColourPicker becomes the main one, and the KNX Thing channels would follow

try simply using the same RGB Dimmer Items with the DMX colour picker as you have for the KNX Dimmers, both in Default.
You can always change one set to Follow

I don’t have DMX bridge.
I take “HANDLER_INITIALIZING_ERROR”
IP address I set random (192.168.1.253 - does not exist).

That might be an error in the binding

I don’t use the one that is installed from PaperUI (*now that you point it out)

Try this one

https://janessa.me/esh

If I change colorpicker (Color, Brightness, Saturation) in PapperUI in Control tab - then dimmers does not changes : (

Here is my DMX dimmer settings in PapperUI:

  • Which profile did you use to link them?

  • What happens to the colour picker if you adjust the separate RGB dimmers?

I delete old binding and install your binding.
I try diferend profiile: default and follow.

Nothing happens. colorpicker doesn’t change.

Here is a video:

Hi

My apologies.

I’ve found the reason for why my setup does reflect the changes of the independant channels and yours (currently) is not.

I have chases setup that use the same channels and I have seen the ColourPicker change, when the chase/s are running.

So this morning, I added 3 x seperate DMX Dimmer Things (one for each colour), using the same DMX channel.

For example.

My Colour Picker uses DMX channels 508/3 (508,509 & 510)

The chases also use 508/3

I have added

  • Red - Channel 508 - Linked to the same Item as used in the Colour Picker (not for any reason that to try)
  • Green- Channel 509 - Linked to the same Item as used in the Colour Picker
  • Blue - Channel 510 - Linked to the same Item as used in the Colour Picker

I can report that adjusting these Dimmers does change the colour picker :slight_smile:

This short video shows it all in action




I have bridge offline : (
And nothing helps launch it : (

I must say I think this might be a problem here.

1 Like

Your Art-Net bridge is showing as Unknown in that screenshot, previously it was On-Line

Do you need to restart openhab (or that bundle) so that the Bridge uses the new version of the binding?

Or just create a new Art-Net / sACN bridge with JNK’s updated binding?

Hi MDAR!
What is a “color channel”?
Is this an empty linked variable?