Group ligh items to use in scenes


I would like to create 2 cinema scenes: one scene will start the projector, and, 1 minute later, switch off all lights; another one will do the same, except that one light will remain untouched (the office).

My plan is to create 2 groups: one for all lights, and one for all lights but the office. Then put lights in these groups. Then use these groups as virtual lights.

Is it the right way to do it? As there is only one missing light in the second group, I’m wondering if it could be possible to send the command to all devices in the first group except the office; is it doable with a script?



A script would be the only way to do this, but it would be more effort than your initial plan of two different groups items which, in my opinion, is a better way to handle this different sets of lights.

Don’t be afraid of creating items for specific uses. That is the OH is designed to work. In a moderately complex OH setup “system” items (items such as your light groups) can end up out-numbering the “device” items (items actually linked to the home’s physical devices). Think of the semantic model as an example. Every location and equipment in the model is just an other group item, but they are group items that can be used for lots of different extra functionality.

Commands will ‘cascade down’ through Groups. So you could have Group A including office light and Group B, and Group B including all other lights.

But I’d be inclined to manage it using two groups, each including all the lights for one or other scene. openHAB is flexible enough to suit many schemes.


I found that it is possible to add children to a group, rather than having to parse all children and assign them the parent(s) group(s)! So it is not as painful as I initially though…