How to assign a group to an external button/switch

I’m running OpenHAB 2.5.2 with a Phillips Hue Hub connected and want to map some other switches through other bindings.

I have a group, that switches 2 Hue Lights.

     Group:Dimmer:AVG                        Bathroom_Downstairs_Light_Brightness            "Bathroom Downstairs Light Brightness"
     Dimmer                                  LightBathroomDownstairsLeft_Brightness          "Light Bathroom Downstairs Left"                                <light> (Bathroom_Downstairs_Light_Brightness)
     Dimmer                                  LightBathroomDownstairsRight_Brightness         "Light Bathroom Downstairs Right"                               <light> (Bathroom_Downstairs_Light_Brightness)

In my sitemap, I have the following defined:

Text item=Bathroom_Downstairs label="Bathroom Downstairs" icon="light" 
	Switch item=Bathroom_Downstairs_Light_Brightness label="Bathroom Downstairs Lights"
	Slider item=Bathroom_Downstairs_Light_Brightness label="Bathroom Downstairs Light Brightness [%.0f]"
	Text label="Individual Lights" icon="light" {
		Switch item=LightBathroomDownstairsLeft_Brightness label="Light Bathroom Left"
		Slider item=LightBathroomDownstairsLeft_Brightness label="Light Bathroom Left Brightness [%.0f %%]"
		Switch item=LightBathroomDownstairsRight_Brightness label="Light Bathroom Right"
		Slider item=LightBathroomDownstairsRight_Brightness label="Light Bathroom Right Brightness [%.0f %%]"

This works like a charm in the Basic UI.

OpenHAB also has identified the external button/switch, that I want to use and I can assign individual bulbs to it. But the switch defined in the sitemap does not show up as an option to bind to the switch.

How would I get this external button/switch mapped to my group ?

Any help would be appreciated.


Can you rephrase that a bit? I’m guessing an external control of some kind. You have that linked to some Item yet? What happens with the Item when you operate the control? And you’re seeking a way to have that activity turned into an openHAB command your Group Item.

Sorry, yes, I was a bit vague there.

I have a DECT/ULE Switch/Button, that is connected to my AVM Fritz!Box. This is connected to OpenHAB via the AVM Fritz!Box binding.

I can assign individual Hue lights in OpenHab to that button using the

PaperUI -> Things -> “Switch Annex” (HAN-FUN Switch) -> Channels: Button Press

and link items to that and switch them on and off, as intended.

However the defined switch in the group nor the group itself are available as an option to use with the “Button Press” channel.


Well, I guess this channel is a switch type channel? Or is it an event channel? What does it do in your events.log?

That’s not going to “fit” a Dimmer type Item, so that’s those two out.
Group type Items get updated from their members, so it makes little sense to link that to a channel either.

The conventional approach here is to trigger a rule from your button press, and the rule goes on to do whatever it is that you want to the Group. The Group in turn has the magical behaviour of passing commands along to members.

There are possibly other approaches, depending on the nature of that channel.

I’m new to OpenHab, so I’m not quite sure.

The channel is triggered, when the button is pressed. It can trigger “system:rawbutton-on-off-switch”, “system:rawbutton-toggle-player” or “system:rawbutton-toggle-switch”.

So it for example can trigger an item of the type “color” or “dimmer” or “switch”. That’s the types of items, that PaperUI lists me as available items for the link. And those work.

However, it does not list the group, which also should be treated as a “dimmer” in reality.