Bagunda
(Alexandr)
January 21, 2020, 8:11am
1
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
}
}
MDAR
(Stuart Hanlon, UK importer of Velbus hardware)
January 21, 2020, 11:10am
2
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
(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
1 Like
rossko57
(Rossko57)
January 21, 2020, 11:50am
3
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
Goal:
Control cheap (China) RGB-LED-Stripes via OpenHAB without the original IR-Remote – instead we’ll use Wifi.
Solution:
Build Wifi-Controller for the RGB-Stripes and send commands via HTTP.
Controller:
Hardware:
To Build the Controller I followed Chris Klinger’s Instructions (german) .
To keep things simple I just hardwired the breadboard prototype. From
the available ESP8266 boards I used the LOLIN D1 mini because it
is pretty cheap (~4€ EU/~2$ China) and I can flash it via USB.
[Bread…
And here’s a conversion RGB → HSB so that you can update your virtual Color Item from any device feedback.
Hi all, I am currently writing rules to control a LED RGB strip. The device is controlled via MQTT and expects RGB values. The current value is reported back via MQTT. So I have a String item that sends and receives the raw RGB data to/from the device and a proxy Color item to control the device. The proxy item has autoupdate="false" set, so it always reflects the current color set by the device. Conversion between both is done via rules. This all works quite well.
However, when I wrote a rule …
1 Like
Bagunda
(Alexandr)
January 21, 2020, 3:32pm
4
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
Bagunda
(Alexandr)
January 21, 2020, 3:33pm
5
Thanx @MDAR ! This is a cool idea! Cool cheat! : )
1 Like
MDAR
(Stuart Hanlon, UK importer of Velbus hardware)
January 21, 2020, 3:36pm
6
And it’s bi-directional
Bagunda
(Alexandr)
January 21, 2020, 3:54pm
7
Can you write example please?
MDAR
(Stuart Hanlon, UK importer of Velbus hardware)
January 21, 2020, 4:01pm
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)
Bagunda
(Alexandr)
January 21, 2020, 4:19pm
9
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)
January 21, 2020, 4:23pm
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
Bagunda
(Alexandr)
January 21, 2020, 5:28pm
11
I don’t have DMX bridge.
I take “HANDLER_INITIALIZING_ERROR”
IP address I set random (192.168.1.253 - does not exist).
MDAR
(Stuart Hanlon, UK importer of Velbus hardware)
January 21, 2020, 5:31pm
12
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
Bagunda
(Alexandr)
January 21, 2020, 5:32pm
13
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:
Bagunda
(Alexandr)
January 21, 2020, 9:59pm
15
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:
MDAR
(Stuart Hanlon, UK importer of Velbus hardware)
January 22, 2020, 9:59am
16
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
This short video shows it all in action
Bagunda
(Alexandr)
January 22, 2020, 12:11pm
17
I have bridge offline : (
And nothing helps launch it : (
rossko57
(Rossko57)
January 22, 2020, 12:13pm
18
I must say I think this might be a problem here.
1 Like
MDAR
(Stuart Hanlon, UK importer of Velbus hardware)
January 22, 2020, 2:00pm
19
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?
Bagunda
(Alexandr)
July 23, 2020, 1:27pm
20
Hi MDAR!
What is a “color channel”?
Is this an empty linked variable?