Automating a set of shutters. First time using a Rollershutter relay in a rule

Hi All,

I’m trying to use to Alexa to trigger the roller shutters in the master bedroom. To do so, I placed all my shutter items in a Rollershutter group as per below:

Group:Rollershutter:AND(100, 0) gMasterBedShutters               "Master Bed Shutters" {alexa="PercentageController.percentage"}

I also defined a rule which is triggered using the group

The rule is as below:

rule  "Control Master Bedroom Shutters"
        Item gMasterBedShutters received command
        if(gMasterBedShutters.state == 100) {
        else gMasterBedShutters.sendCommand(100)

Does the theory of operation appear correct here? The intention of AND in the group was to either show 100 or 0 as I won’t be using the blinds in part position, either open or closed.

Would appreciate a sanity check before I break things for the wife :stuck_out_tongue:


Why do you need a rule? A command received by a group is by design already sent to the members of the group…if you need to check the state before doing anything I think you need a proxy item to trigger the group. Because the moment the group receives a command it forwards it to the members before (or meanwhile) your rule…so you are risking a loop here where the group forwards the commands to member and then your rule sends a command again and so on.

Thanks Alessio, understood. I dont believe you can send Alexa commands to a group for a rollershutter, hence the the rule. So I’m not sure how the group would receive a command without a rule?

I don’t own Alexa, but a group is an item, so It can be of the type rollershutters and I think could be “tagged” or could add metadata to it to be used by smart assistant?! (Maybe here someone could jump in).

Anyway you can always create a proxy item(of the rolershutter type), especially if you need to do some checks before doing anything, and use it with Alexa. Then make a rule when the item received a command and then send the command to the group.

Yes, you can totally tag the group. Ill try the proxy item, I actually had that before but changed it to use the group item.

I’m not at all convinced that would work. Logical AND isn’t well defined for numeric values - though openHAB does tend to treat 0 as OFF and !=0 as ON so something might happen.
Try before you buy, here.

That’s a screaming loop of course.

1 Like

Well, with the group you don’t need any rule, but you can’t put in any check…what is sent to the group gets sent to members, end. So if it’s not a problem to send ON when it’s already ON or vice versa then stick to group, otherwise the proxy item is your way to go.

The group becomes the item you expose to Alexa instead of your device (make it a rollershutters type, tag it and add to it any information needed by Alexa), and all the magic will be done by openhab

Thanks guys. Yes aware the group is the item you expose, even with the rollershutter type but it’s not supported in the V3 tagging as per a previous post by jeremy I’m pretty sure.

Sounds like the wife will just need to enjoy me breaking it for a bit whilst I play with options!

You’re welcome, you have all my understanding as a member of the brotherhood of the married men :upside_down_face:

1 Like


It is supported. The skills identifies groups: (1) with defined item type as standard item based on the type (e.g. Group:Rollershutter as Rollershutter item); (2) without an item type, which are usually considered functional, as potential group endpoint definition if a valid display category was specified.

1 Like

Thanks Jeremy!