[SOLVED] Knx All Lights OFF?

Hi all,
I am new to openhab (I have just joined the community) and after the installation everything seemed to be ok with Switching lights.
What I’m not able to do at this moment is how to switch “all the lights off” keeping “all the lights on” not available. Is there someone so kind to tell me how to do that?
Thank you so much

Do you have the demo installed?

Group:Switch:OR(ON, OFF)        Lights      "All Lights [(%d)]"
Dimmer Light_GF_Living_Table        "Table"         (GF_Living, Lights)     ["Lighting"]
Switch Light_GF_Corridor_Ceiling    "Ceiling"       (GF_Corridor, Lights)
Switch Light_GF_Kitchen_Ceiling     "Ceiling"       (GF_Kitchen, Lights)
sitemap demo label="My home automation" {
        Switch item=Lights icon="light"
}

https://docs.openhab.org/configuration/sitemaps.html

Thank you for your answer;
I did and I have a lot of lights working but now I just wanted to have a push button to switch all the lights off at the same time. Of course I have already defined a GA wth all the actuators addresses in it with ETS4.
My question is: Is there a way to tell Knx only OFF and never ON ? how { knx = …/1/2/10} ?
Thank you

Does the group-switch not work?

Yes but the lights can be switched OFF and even ON (what I do not want).


You can set the group-switch to OFF in a rule or alle the lights separate.

Create a proxy item and a rule

Switch proxySwitch
rule "All KNX OFF"
when
    Item proxySwitch changed
then
    groupKNX.sendCommand(OFF)
end

Every time you action the proxy switch the lights will be set to OFF!!

Thank you vzorglub only one question:
how can I hide groupKNX so that it could’nt be activated directly?

don’t define in a sitemap

I’ll try. Thank you so much.
Bye

Instead of showing groupKNX in the site map, show the proxy switch instead

Thank you it works fine.
Now I must find out how to have the status ON if only one light is ON.
what could you suggest ?
Many thanks again

Boolean OR operation. If at least one item state is of ‘value1’, ‘value1’ is returned, otherwise ‘value2’ is returned.
https://docs.openhab.org/configuration/items.html#group-type

I have about 20 light shall I put them this way { knx = <1/1/10+1/1/11+1/1/12+…}?

You can simply use a mapping:

sitemap demo label="My home automation" {
        Switch item=Lights mappings=[OFF="OFF"]
}

This will draw an “OFF” Button instead of a slide switch.
You can use as much mappings as you want (e.g. with a number item to chose more than two states through one item by buttons)

Thank you,
you have turned me a “light” on.
At the beginning I was just a little bit confused because I didn’t know how to link Item definitions in .items end in .sitemaps. Every thing is now ok
Thanks again to everyone that answered my poor question.