KNX dimmers etc.

1,273 views
Skip to first unread message

Sam

unread,
Mar 19, 2012, 3:19:16 PM3/19/12
to openhab
Hi,

I am having trouble setting up knx dimmers via openhab (normal light
switches, blinds up/down etc are fine). I am using a single group
address which corresponds to the 1 Byte value object of my dimming
actuator:

Dimmer Light_SF_parents_room "Ceiling" (SF_chambre_parents, Lights)
{ knx = "<2/2/11" }

Same issue when I try to adjust the angle of my blind slats (here
again I am trying to target the 1 byte group address responsible for
the angle of my blinds):

Dimmer DemoBlinds "Blinds [%d %%]" <rollershutter> { knx =
"<3/2/17" }

Both commands have no effect whatsoever. I see they generate values
between 0 and 100 in the command window. Do I need to convert these
values to 0-256? But even then I should see an effect already with
values between 0-100 on my dimmed lights or blinds. What am I doing
wrong?

Also, what is the meaning of '%d %%' and where can I find those
explained?

Thanks a lot in advance,

Sam

Thomas Eichstädt-Engelen

unread,
Mar 19, 2012, 5:44:50 PM3/19/12
to ope...@googlegroups.com

Hi Sam,

> I am having trouble setting up knx dimmers via openhab (normal light
> switches, blinds up/down etc are fine). I am using a single group
> address which corresponds to the 1 Byte value object of my dimming
> actuator:
>
> Dimmer Light_SF_parents_room "Ceiling" (SF_chambre_parents, Lights)
> { knx = "<2/2/11" }

What the Dimmer Widget generates are UP and DOWN commands which are suitable for a relative dimming GA (which should be available in your dimmer, too). To send the dimming discrete value you have to incorporate rules which stores the current value and add or subtract something. Please see the "Dimmed Light" rule in the demo.rules file. Same applies to the blinds.

> Also, what is the meaning of '%d %%' and where can I find those
> explained?

The given String "%d %%" is a Format-String which is used by the String.format() method. Please see java.util.Formatter for detailed information of all possible format Strings. Your example means: format the given value as a decimal value followed by a '%' sign e.g. "25 %". You have to escape the '%' by a second '%' because '%' is a saved word in format Strings.

Hope this helps,

Thomas E.-E.

Kai Kreuzer

unread,
Mar 19, 2012, 6:00:21 PM3/19/12
to ope...@googlegroups.com
>> I am having trouble setting up knx dimmers via openhab (normal light
>> switches, blinds up/down etc are fine). I am using a single group
>> address which corresponds to the 1 Byte value object of my dimming
>> actuator:
>>
>> Dimmer Light_SF_parents_room "Ceiling" (SF_chambre_parents, Lights)
>> { knx = "<2/2/11" }
>
> What the Dimmer Widget generates are UP and DOWN commands which are suitable for a relative dimming GA (which should be available in your dimmer, too).

If you are using the native iOS client or the Sencha Touch UI prototype, you will have sliders for dimmers, so providing percentage values to a GA makes sense.
Note that you can provide the DPT in the configuration. So to tell the KNX binding that your GA is actually not a binary GA, but a 1 byte percentage value, you can write { knx="5.004:<2/2/11" }. The best is if you provide all three types of GA: binary, increase/decrease and percentage (separated by comma). Then you can send all kinds of commands to your dimmer, such as ON/OFF, INCREASE/DECREASE, or 0..100 %.

Regards,
Kai

Sam

unread,
Mar 20, 2012, 1:43:37 PM3/20/12
to openhab

Hi Kai and all,

Thanks for your help.

I am using the following command now:

{ knx = "2/2/6,2/2/9,5.004:<2/2/11" }

This works great on the iOS client with slider except that the slider
does not initilize correctly (its initial position does not correspond
to the current percentage value object). I think the 2 first group
addresses (switch on/off and increase/decrease) are not used at all by
the slider (which is ok). But what should I do about the initial
slider position? Is there a simple solution?

Thanks,

Sam

Kai Kreuzer

unread,
Mar 20, 2012, 1:49:29 PM3/20/12
to ope...@googlegroups.com
Hi Sam,

> But what should I do about the initial
> slider position? Is there a simple solution?

Did you check if the KNX read request works, i.e. do you get an update
for your item with the correct percentage value?
I currently cannot test it myself with an KNX dimmer, so I cannot
really support you. But if the item is set to the correct value, I
would expect the slider to be initialized correctly as well.

Regards,
Kai

Sam

unread,
Mar 20, 2012, 3:06:13 PM3/20/12
to openhab
> Did you check if the KNX read request works, i.e. do you get an update
> for your item with the correct percentage value?
> I currently cannot test it myself with an KNX dimmer, so I cannot
> really support you. But if the item is set to the correct value, I
> would expect the slider to be initialized correctly as well.

Yes, you are right the slider initializes correctly with the value
object that it reads in the dimming actuator. The trouble is that the
dimming actuator (2 year old Merten) does not seem to update the value
object when the dimmer is switched on/off or increased/decreased. So
the value it reads is the last slider value / value object which is
not necessarily the current state of the dimming actor.

Sam

Sam

unread,
Mar 20, 2012, 3:37:45 PM3/20/12
to openhab
> Did you check if the KNX read request works, i.e. do you get an update
> for your item with the correct percentage value?
> I currently cannot test it myself with an KNX dimmer, so I cannot
> really support you. But if the item is set to the correct value, I
> would expect the slider to be initialized correctly as well.

Thanks Kai, you were right, the slider was using the correct value
from the dimmer value object. The trouble was that if the dimmer was
switched on/off or increased/decreased (via the dimming object) the
value object was not updated. I solved the problem by adding a value
object status feedback object into the value object GA. Now the slider
moves when the dimmer is switched on/off or dimmed by other means than
the slider. Works like a charm!

Sam
Reply all
Reply to author
Forward
0 new messages