I have multiple device such as sony bravia tv, Phillips hue lights , z-wave sensors and sonos player connected to openhab , How can I make group of more devices so that i can do perform action on multiple device.
For example I have go make movie mood,
First My TV gets ON,
My Hue lights gets off.
My music player stops etc.
How can I group these device in openhab, Is there any rest api available.
You can create an active group for a collection of switches:
Group:Switch:OR(ON, OFF) Lights "All Lights [(%d)]" <light> (All)
Add your items to that group and you can switch them all on or off at the same time.
I’m not aware personally of a way to group something so that one item in the group turns off and the other on. That sounds more like a rule to me. I know you can create scripts that have a set of actions that you use often and trigger those but that is more for if you have the same actions that get called multiple places throughout your code to save on work.