> 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.
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
> 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