Serious problems with color settings on item bind to KNX2 HSB actor

  • Platform information:
    • Hardware: Raspi2 B
    • OS: Buster
    • Java Runtime Environment: Zulu Embedded 8.25.0.76-linux-aarch32hf
    • openHAB version: 2.5.3

First of all thanks to all the developers for this amazing platform!

2 weeks ago I started to connect my KNX smart home to a RapPi running openHAB 2

Controlling dimmable unicolor led’s works fine.

But now I become desperate in controlling a RGBW actor.
At first I thought it must be a problem with the colorpicker.
To verify this, I build a rule to set the HSB value manually.
I got the same result i.e. the actor didn’t do what I want…

Here are the inputs (HSBType) and outputs (KNX telegrams)

HSB KNX(H,S,B) SUPPOSED TO BE
3,90,50 7F 12 0C red with half brightness
119,90,50 0E 7F 0C green with half brightness
241,90,50 0E C 7F blue with half brightness
241,0,10 FF FF FF bright white
241,100,100 04 00 FF bright blue
241,0,10 19 19 19 dark with
241,0,0 00 00 00 off

The lamp took always the color sent on the KNX bus.
And this is quite different to the HSB value I sent to the color item.

For many hours I tried to search for similar reports here in the forum.
I found only some older posts (2018) regarding HSBType .

At least here is the code of my settings and the KNX log:

knx.things

Bridge knx:ip:bridge “Weinzierl KNX730 IP-IF” @ “KNX”[
type=“TUNNEL”,
ipAddress=“192.168.178.29”,
portNumber=3671,
localIp=“192.168.178.50”,
autoReconnectPeriod=60,
localSourceAddr=“1.1.252”
] {
Thing device KNX_Line_1_1 @ “KNX” [
//fetch=true,
//pingInterval=300,
//readInterval=0
] {
// AKD Dimm4_Aktor 1.1.8 Decke innen
Type switch : AKD4_8_switch “Decke rechts” [ ga=“1.001:1/1/2+<1/2/20” ]
Type color : AKD4_8_hsv “Decke rechts” [ switch=“1/1/2+<1/2/20”, hsb=“1/3/17+<1/2/21”, position=“1/3/16+<1/2/19” ]
Type dimmer : AKD4_8_Habs “Decke rechts” [ position=“5.003:1/3/14+<1/2/17” ]
Type dimmer : AKD4_8_Sabs “Decke rechts” [ position=“1/3/15+<1/2/18” ]
Type dimmer : AKD4_8_Vabs “Decke rechts” [ position=“1/3/16+<1/2/19” ]

}

}

home.items

Color LivingRoom_rightLight “Licht” (H_LivingRoom, gLight) [“Lighting”, “Switchable”] {channel=“knx:device:bridge:KNX_Line_1_1:AKD4_8_hsv”}
Switch LivingRoom_rightLight_Sw “Licht” (H_LivingRoom, gLight) [“Lighting”, “Switchable”] {channel=“knx:device:bridge:KNX_Line_1_1:AKD4_8_switch”}
Dimmer LivingRoom_rightLight_H “Licht” (H_LivingRoom, gLight) [“Lighting”] {channel=“knx:device:bridge:KNX_Line_1_1:AKD4_8_Habs”}
Dimmer LivingRoom_rightLight_S “Licht” (H_LivingRoom, gLight) [“Lighting”] {channel=“knx:device:bridge:KNX_Line_1_1:AKD4_8_Sabs”}
Dimmer LivingRoom_rightLight_V “Licht” (H_LivingRoom, gLight) [“Lighting”] {channel=“knx:device:bridge:KNX_Line_1_1:AKD4_8_Vabs”}

virtual.items
virtual items for the rules

Number LivingRoom_rightSzene “Licht” (H_LivingRoom, gLight) [“Lightning”]
Number LivingRoom_leftSzene “Licht” (H_LivingRoom, gLight) [“Lightning”]

light.rules

var DecimalType hue
var PercentType sat
var PercentType value

rule “chooseRightCeilColor”
when
Item LivingRoom_rightSzene received command
then
logInfo(“Deckenlampe innen”, triggeringItem.name.toString, “erhielt Kommando”, receivedCommand.toString)
switch(receivedCommand.toString) {
case “0”: {
//logInfo(“color item set to OFF”, hue.toString)
hue = new DecimalType(0)
sat = new PercentType(0)
value = new PercentType(0)
}
case “1”: {
//logInfo(“color item set to RED: h=3, s=90, b=50”)
hue = new DecimalType(3)
sat = new PercentType(90)
value = new PercentType(50)
}
case “2”: {
//logInfo(“color item set to green: h=119, s=90, b=50”)
hue = new DecimalType(119)
sat = new PercentType(90)
value = new PercentType(50)
}
case “3”: {
//logInfo(“color item set to blue: h=241, s=90, b=50”)
hue = new DecimalType(241)
sat = new PercentType(90)
value = new PercentType(50)
}
case “4”: {
//logInfo(“color item set to blue: h=241, s=0, b=100”)
hue = new DecimalType(241)
sat = new PercentType(0)
value = new PercentType(100)
}
case “5”: {
//logInfo(“color item set to blue: h=241, s=100, b=100”)
hue = new DecimalType(241)
sat = new PercentType(100)
value = new PercentType(100)
}
case “6”: {
//logInfo(“color item set to blue: h=241, s=0, b=10”)
hue = new DecimalType(241)
sat = new PercentType(0)
value = new PercentType(10)
}
case “7”: {
//logInfo(“color item set to blue: h=241, s=0, b=0”)
hue = new DecimalType(241)
sat = new PercentType(0)
value = new PercentType(0)
}
}
LivingRoom_rightLight.sendCommand(new HSBType(hue,sat,value))
end

user.sitemap

Selection item=LivingRoom_rightSzene label=“Farbschema innen” icon=“colorpicker” mappings=[0=“Aus H=0,S=0,B=0”, 1=“rot H=3,S=90,B50”, 2=“grün H=119,S=90,B=50”, 3=“blau H=241,S=90,B=50”, 4=“blau S0, B10”, 5=“blau S100, B100”, 6=“blau S0, B10”, 7=“blau S0, B0”]

Is there anybody out there with similar problems or can give me hint where my fault is :wink: ?

And here is what happens on the KNX bus:

#,Time,Service,Flags,Prio,Source Address,Source Name,Destination Address,Destination Name,Rout,Type,Info,Iack
170,“11.06.2020 17:04:26,602”,vom Bus,S=4,Niedrig,1.1.252,-0,1/3/17,Decke innen HSV,6,GroupValueWrite,“00 00 00 | kein Tag, 00:00:00”,LL_ACK
172,“11.06.2020 17:04:26,836”,vom Bus,S=0,Niedrig,1.1.8,AKD-0424V.02 LED Controller 4 Kanäle/RGBW,1/2/21,Decke innen HSV,6,GroupValueWrite,“00 00 00, 00:00:00”,LL_ACK
181,“11.06.2020 17:11:32,075”,vom Bus,S=0,Niedrig,1.1.252,-0,1/3/17,Decke innen HSV,6,GroupValueWrite,“00 00 00 | kein Tag, 00:00:00”,LL_ACK
183,“11.06.2020 17:12:02,927”,vom Bus,S=4,Niedrig,1.1.252,-0,1/3/17,Decke innen HSV,6,GroupValueWrite,7F 12 0C,LL_ACK
185,“11.06.2020 17:12:03,163”,vom Bus,S=0,Niedrig,1.1.8,AKD-0424V.02 LED Controller 4 Kanäle/RGBW,1/2/21,Decke innen HSV,6,GroupValueWrite,7F 12 0C,LL_ACK
189,“11.06.2020 17:12:05,971”,vom Bus,S=0,Niedrig,1.1.252,-0,1/3/17,Decke innen HSV,6,GroupValueWrite,7F 12 0C,LL_ACK
191,“11.06.2020 17:12:44,873”,vom Bus,S=4,Niedrig,1.1.252,-0,1/3/17,Decke innen HSV,6,GroupValueWrite,0E 7F 0C,LL_ACK
193,“11.06.2020 17:12:45,133”,vom Bus,S=0,Niedrig,1.1.8,AKD-0424V.02 LED Controller 4 Kanäle/RGBW,1/2/21,Decke innen HSV,6,GroupValueWrite,0E 7F 0C,LL_ACK
196,“11.06.2020 17:12:47,917”,vom Bus,S=6,Niedrig,1.1.252,-0,1/3/17,Decke innen HSV,6,GroupValueWrite,0E 7F 0C,LL_ACK
200,“11.06.2020 17:13:32,631”,vom Bus,S=6,Niedrig,1.1.252,-0,1/3/17,Decke innen HSV,6,GroupValueWrite,0E 0C 7F,LL_ACK
202,“11.06.2020 17:13:33,295”,vom Bus,S=2,Niedrig,1.1.8,AKD-0424V.02 LED Controller 4 Kanäle/RGBW,1/2/21,Decke innen HSV,6,GroupValueWrite,0E 0C 7F,LL_ACK
205,“11.06.2020 17:13:35,671”,vom Bus,S=0,Niedrig,1.1.252,-0,1/3/17,Decke innen HSV,6,GroupValueWrite,0E 0C 7F,LL_ACK
210,“11.06.2020 17:14:13,717”,vom Bus,S=2,Niedrig,1.1.252,-0,1/3/17,Decke innen HSV,6,GroupValueWrite,FF FF FF,LL_ACK
212,“11.06.2020 17:14:14,911”,vom Bus,S=6,Niedrig,1.1.8,AKD-0424V.02 LED Controller 4 Kanäle/RGBW,1/2/21,Decke innen HSV,6,GroupValueWrite,FF FF FF,LL_ACK
216,“11.06.2020 17:14:16,763”,vom Bus,S=6,Niedrig,1.1.252,-0,1/3/17,Decke innen HSV,6,GroupValueWrite,FF FF FF>,LL_ACK
219,“11.06.2020 17:14:41,323”,vom Bus,S=4,Niedrig,1.1.252,-0,1/3/17,Decke innen HSV,6,GroupValueWrite,04 00 FF,LL_ACK
221,“11.06.2020 17:14:42,585”,vom Bus,S=0,Niedrig,1.1.8,AKD-0424V.02 LED Controller 4 Kanäle/RGBW,1/2/21,Decke innen HSV,6,GroupValueWrite,04 00 FF,LL_ACK
224,“11.06.2020 17:14:44,367”,vom Bus,S=6,Niedrig,1.1.252,-0,1/3/17,Decke innen HSV,6,GroupValueWrite,04 00 FF,LL_ACK
226,“11.06.2020 17:15:06,685”,vom Bus,S=2,Niedrig,1.1.252,-0,1/3/17,Decke innen HSV,6,GroupValueWrite,19 19 19 ,LL_ACK
231,“11.06.2020 17:15:08,221”,vom Bus,S=4,Niedrig,1.1.8,AKD-0424V.02 LED Controller 4 Kanäle/RGBW,1/2/21,Decke innen HSV,6,GroupValueWrite,19 19 19,LL_ACK
232,“11.06.2020 17:15:09,731”,vom Bus,S=6,Niedrig,1.1.252,-0,1/3/17,Decke innen HSV,6,GroupValueWrite,19 19 19,LL_ACK
236,“11.06.2020 17:15:31,027”,vom Bus,S=6,Niedrig,1.1.252,-0,1/3/17,Decke innen HSV,6,GroupValueWrite,FF FF FF,LL_ACK
238,“11.06.2020 17:15:32,227”,vom Bus,S=2,Niedrig,1.1.8,AKD-0424V.02 LED Controller 4 Kanäle/RGBW,1/2/21,Decke innen HSV,6,GroupValueWrite,FF FF FF,LL_ACK
243,“11.06.2020 17:15:34,105”,vom Bus,S=4,Niedrig,1.1.252,-0,1/3/17,Decke innen HSV,6,GroupValueWrite,FF FF FF,LL_ACK
245,“11.06.2020 17:15:53,727”,vom Bus,S=0,Niedrig,1.1.252,-0,1/3/17,Decke innen HSV,6,GroupValueWrite,“00 00 00 | kein Tag, 00:00:00”,LL_ACK
248,“11.06.2020 17:15:55,089”,vom Bus,S=6,Niedrig,1.1.8,AKD-0424V.02 LED Controller 4 Kanäle/RGBW,1/2/21,Decke innen HSV,6,GroupValueWrite,“00 00 00 | kein Tag, 00:00:00”,LL_ACK
252,“11.06.2020 17:15:56,793”,vom Bus,S=6,Niedrig,1.1.252,-0,1/3/17,Decke innen HSV,6,GroupValueWrite,“00 00 00 | kein Tag, 00:00:00”,LL_ACK
253,“11.06.2020 17:16:16,976”,Stop,Aufzeichnung wurde beendet,

Thanks in advance
Regina

The color type channel is not documented in binding docs.
From the introductory github entry, do you not have to specify DPT?

Thing:
Type color : rgbBad "RGB Niesche" [ hsb="232.600:1/6/2+<1/6/15", switch="1.001:1/6/0+<1/6/9", position="5.001:1/6/5", increaseDecrease="3.007:1/6/8" ]
[KNX] Add Color Channel by lewie · Pull Request #3433 · openhab/openhab-addons · GitHub

This might be related too

Thank you for your response!
I tested with and without specifying the DPT type.
Result is the same.
I guess the binding is responsible to convert HSB values into device notation…

if I control the lamp with a KNX color sensor, it works.
Value 0 is red. The range goes from 0 to 360 degree (red again).
Translated to 0…255 on the bus -> 0->0, 360->255
Same with percentage: 0->0, 100->255

I’ve learned the spirit of things is to forget about HW requirement :slight_smile:

But nevertheless saturation and brightness settings doesn’t work too.

Maybe your right and the color channel is not jet ready?

May we know which DPT type you are trying to use?

Did you mean RGB on the KNX side?

Is that not the 7F 12 0C you expect?

Sure:
232.600

On KNX I use the HSV channel from the actor, not the RGB channel of course

When I set the HSBType to 3,90,50 I would expect a KNX telegram with:

H = 3/360255 = 0x02
S = 90/100
255 = 0xE6
B = 50/100*255 = 0x7F

ETS log shows H=0x7F S=0x12 B=0x0C

But HSB 3.90.50 converts to RGB 127,18,12 (hex 7F,12,0C)
It seems to be working as expected.

openHAB Color types are HSB, not HSV

This is a bit of a worry, what do you mean? The openHAB binding is expecting to use RGB values over KNX

Hi Rossko, you just put me on the right track :slightly_smiling_face:

  1. there is no official doc regarding the color channel type. Maybe I didn’t found it?
    But usage of color type throws no errors and there are many threads on this topic out there.

  2. I used the HSB parameter to push HSB parameters to the actor.
    I would also use switch to get parameter for a switch actor.
    Unfortunately I got RGB values as output from a HSB parameter :frowning:
    That I really didn’t expect so thank you very much for your hit!
    The GA in the binding expects HSB values as well:

    181,“11.06.2020 17:11:32,075”,vom Bus,S=0,Niedrig,1.1.252,-0,1/3/17,Decke innen HSV,6,GroupValueWrite,“00 00 00 | kein Tag, 00:00:00”,LL_ACK
    183,“11.06.2020 17:12:02,927”,vom Bus,S=4,Niedrig,1.1.252,-0,1/3/17,Decke innen HSV,6,GroupValueWrite,7F 12 0C,LL_ACK

Now I turned the bindings GA to a KO with RGB values.

And it works!

I’m curious about the final KNX color type doc :slight_smile:

Yes, one of the github issues noted is still outstanding for someone to update docs

I think this is badly named, and so far as I can see always converts to/from RGB for KNX

Hi Gina,
it seems you use the MDT KNX AKD LED controller.
I want to control also the 4 LED stripes and actually struggle with HSV configuration.

You wrote you change the bindings GA and now it works.

Do you like to show your actual configuration?

Hi Johannes,
sure! I just figure it out…

Hi again…

Here is an extract of my Openhab Config:

// the thing

Thing device KNX_Line_1_1 @ “KNX” [
//fetch=true,
//pingInterval=300,
//readInterval=0
] {
// AKD Dimm4_Aktor 1.1.11 : Ceiling left side
Type switch : AKD4_11_switch “Decke links” [ ga=“1.001:1/1/3+<1/2/28” ]
Type color : AKD4_11_hsv “Decke links” [ switch=“1/1/3+<1/2/28”, hsb=“1/3/27+<1/2/30”, position=“1/3/25+<1/2/27” ]
}

// the item
Color LivingRoom_leftLight “Licht” (H_LivingRoom, gLight) [“Lighting”, “Switchable”] {channel=“knx:device:bridge:KNX_Line_1_1:AKD4_11_hsv”}

// a part of my sitemap
Frame label=“living room” icon=“sofa” {
Text item=LivingRoom_leftLight_Sw label=“Lampe aussen [%s]” icon=“light” valuecolor=[ON=“green”, OFF=“maroon”] {
Slider item=LivingRoom_leftLight label=“Brightness [%d]” icon=“light”
Default item=LivingRoom_leftLight label=“Hue” icon=“colorpicker”
Switch item=LivingRoom_leftLight_Sw label=“left light” icon=“light” mappings=[OFF=“Aus”, ON=“An”]
} // END Text item=LivingRoom_leftLight_Sw
}

The trick to get the color picker work is to assign the RGB KO and not the HSB as expected…
You see my group address configuration in the snapshot

Good luck!
Gina

Hi Gina,
first of all: Thanks for sharing your config!

Here some additional (stupid?) questions:

  • In ETS you have a definition of a switch for ga=1/1/3 and you get the feedback from the AKD on #80 = 1/2/28. I hope here I’m right.

  • but for hsb=“1/3/27” and for position=“1/3/25” you have two dimmer?

  • Is it right you get the feedback from AKD too - on #81 for brightness (position?) but how to get the value for color?

sorry for asking

I think my main problem is that I need a switch / button that delivers a 3(4)-byte value DTP 251.600

so I have to wait until I get one

Hi Johannes,
you are right, a have several Items to control my lamps. At some wall mounted switches I use only on/off funtionality.
Other controls in my KNX world are only for changing brightness.

The MDA dimmer provides 2 types of color control:
KO 66 is used with RGB values, and KO 67 expects HSB values
Both parameters are 3 Bytes long and from DPT 232.600
Although KO76 has the same DTP, it expects HSB values.
My problem in the past was, I didn’t realized that the color picker only delivers RGB values. After I changed the KO from 66 to 67 the color picker worked.
But my openhab installation runs on a vintage RasPi2, I have a huge delay between action on the color wheel and the execution. Therefore I use simple sliders to change HSB values seperately

Hope it helps :slight_smile:
Cheers Gina

Hi,

Does the color type channel in the KNX binding still not support 6 byte RGBW values in DPT 251.600? In my workaround, I could configure the MDT RGBW LED Controller to work with 3 byte RGB values in DPT 232.600, but of course this allows only control of the RGB channels without the separate W channel.

Best regards,
Peter