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?
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
MDAR
(Stuart Hanlon, UK importer of Velbus hardware)
8
I don’t use text files, so “writing it” isn’t something I can do
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
MDAR
(Stuart Hanlon, UK importer of Velbus hardware)
10
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