How to build hierarchical Rollershutter groups for controlling and for viewing the status

Hello,

I’ve just started to build a smart home with OpenHAB last week. I’ve already read a lot of it’s documentation and also some posts regarding groups of Rollershutter objects. But I’m not sure, if I’m using them in the right way.

I would like to create hierarchical groups to control roller shutters and, if possible, use them to visualize the status. The hierarchy should look like this: All items of shutters should be in a room group (kitchen, living room, …) and also in a house side group (north, west, …). Each room group should be in a floor group and each floor group in the house group. The display of the group status should be the averaged percentage value of the status of its group members.

Here is an exerpt of the item file:

Group:Rollershutter:AVG Group_RollerShutter_Ctrl "House [%d %%]" <rollershutter> 
Group:Rollershutter:AVG Group_RollerShutter_GroundFloor_Ctrl "Groundfloor [%d %%]" <rollershutter> (Group_RollerShutter_Ctrl)
Group:Rollershutter:AVG Group_RollerShutter_FirstFloor_Ctrl "1. Floor [%d %%]" <rollershutter> (Group_RollerShutter_Ctrl)
Group:Rollershutter:AVG Group_RollerShutter_DiningRoom_Ctrl "Dining Room [%d %%]" <rollershutter> (Group_RollerShutter_GroundFloor_Ctrl) 
Group:Rollershutter:AVG Group_RollerShutter_South_Ctrl "South [%d %%]" <rollershutter> 
Group:Rollershutter:AVG Group_RollerShutter_North_Ctrl "North [%d %%]" <rollershutter> 
Group:Rollershutter:AVG Group_RollerShutter_West_Ctrl "East [%d %%]" <rollershutter> 
Rollershutter DiningRoom_Door_RollerShutter_Ctrl "DR Door [%d %%]" <rollershutter> (Group_RollerShutter_DiningRoom_Door, Group_RollerShutter_DiningRoom_Ctrl, Group_RollerShutter_South_Ctrl) { channel="zwave:device:dedcb975:node5:blinds_control", autoupdate="false" }

And here an excerpt of the sitemap file:

Text label="Roller Shutter Demo"
    {
	Switch item=Group_RollerShutter_Ctrl mappings=[UP="Auf", STOP="Stop", DOWN="Zu"]
	Switch item=Group_RollerShutter_GroundFloor_Ctrl mappings=[UP="Auf", STOP="Stop", DOWN="Zu"]
	Switch item=Group_RollerShutter_South_Ctrl mappings=[UP="Auf", STOP="Stop", DOWN="Zu"]
	Switch item=Group_RollerShutter_DiningRoom_Ctrl mappings=[UP="Auf", STOP="Stop", DOWN="Zu"]
	Switch item=DiningRoom_Door_RollerShutter_Ctrl mappings=[UP="Auf", STOP="Stop", DOWN="Zu"]
    }

I’ve tested this configuration with only one roller shutter. It seems to work, with the exception of the top level group RollerShutter_Ctrl, which shows a different percentage value than the others (eg 94% instead of 88%).

Thanks for your help

You don’t need a group for each shutter. But a shutter can be a member of more than one group, and you can send commands to groups via rules.
The :AVG functions works across all members of the group but AFAIK you cannot use this with nesting (i.e. groups inside groups).

Thanks for the info.

I’ll install the second roller shutter next week and see what happens. It maybe, that the reason of the wrong average is the lack of a shutter in the first floor group.

If it doesn’t work I’m going to use flat groups.

I’ve tested the configuration now with a second roller shutter. The hierarchy works as wanted. The first seen error was caused by an empty group. I think that this is ok.