# Send same command to one group except one

**URL:** <https://community.openhab.org/t/send-same-command-to-one-group-except-one/85768>\
**Category:** Scripts & Rules\
**Created:** [November 18, 2019, 8:19pm UTC](https://community.openhab.org/t/send-same-command-to-one-group-except-one/85768 "2019-11-18T20:19:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![furax54](https://community.openhab.org/user_avatar/community.openhab.org/furax54/32/70835_2.png) [@furax54](https://community.openhab.org/u/furax54)\
**Post date:** [November 18, 2019, 8:19pm UTC](https://community.openhab.org/t/send-same-command-to-one-group-except-one/85768/1 "2019-11-18T20:19:35Z")

</div>

Hello,  
I Have a rule with these 2 lines :

```csv
    gVoletsJour.sendCommand(DOWN)
    Cuisine_Volet.sendCommand(80)

```

Cuisine\_Volet is in gVoletsJour group.  
But in the events log, the commands doesn’t fire in the good order (item recevie 80 but immediately “DOWN” which is send by the group command :

```csv
2019-11-18 20:00:00.001 [ome.event.ItemCommandEvent] - Item 'gVoletsJour' received command DOWN
2019-11-18 20:00:00.002 [ome.event.ItemCommandEvent] - Item 'Terrasse_Volet' received command DOWN
2019-11-18 20:00:00.004 [ome.event.ItemCommandEvent] - Item 'Cuisine_Volet' received command 80
2019-11-18 20:00:00.007 [ome.event.ItemCommandEvent] - Item 'Cuisine_Volet' received command DOWN
2019-11-18 20:00:00.008 [ome.event.ItemCommandEvent] - Item 'Salon_Volet' received command DOWN
2019-11-18 20:00:00.013 [ome.event.ItemCommandEvent] - Item 'VoletBureauRollerControl' received command DOWN
2019-11-18 20:00:00.015 [nt.ItemStatePredictedEvent] - Terrasse_Volet predicted to become DOWN
2019-11-18 20:00:00.016 [nt.ItemStatePredictedEvent] - Cuisine_Volet predicted to become 80
2019-11-18 20:00:00.017 [nt.ItemStatePredictedEvent] - Cuisine_Volet predicted to become DOWN
2019-11-18 20:00:00.018 [nt.ItemStatePredictedEvent] - Salon_Volet predicted to become DOWN

```

So which is the best way to solve this problem. I want to let this item in group because I need it in anothers rules.

---

<div class="post-metadata">

**Author:** ![rlkoshak](https://community.openhab.org/user_avatar/community.openhab.org/rlkoshak/32/75251_2.png) [@rlkoshak](https://community.openhab.org/u/rlkoshak)\
**Post date:** [November 18, 2019, 9:40pm UTC](https://community.openhab.org/t/send-same-command-to-one-group-except-one/85768/2 "2019-11-18T21:40:42Z")

</div>

Then you can’t send the command to the Group. You need to send it to each Item in the Group except for that one individually. See [Design Pattern: Working with Groups in Rules](https://community.openhab.org/t/design-pattern-working-with-groups-in-rules/20512) for how to best do this.

---

<div class="post-metadata">

**Author:** ![rossko57](https://community.openhab.org/user_avatar/community.openhab.org/rossko57/32/70263_2.png) [@rossko57](https://community.openhab.org/u/rossko57)\
**Post date:** [November 18, 2019, 11:38pm UTC](https://community.openhab.org/t/send-same-command-to-one-group-except-one/85768/3 "2019-11-18T23:38:27Z")

</div>

> [@furax54](#):
>
> But in the events log, the commands doesn’t fire in the good order (item recevie 80 but immediately “DOWN” which is send by the group command :

Will the end device do what you want if you wait a bit?

```
gVoletsJour.sendCommand(DOWN)
createTimer(now.plusMillis(100), [ |
      Cuisine_Volet.sendCommand(80)
] )

```

---

<div class="post-metadata">

**Author:** ![furax54](https://community.openhab.org/user_avatar/community.openhab.org/furax54/32/70835_2.png) [@furax54](https://community.openhab.org/u/furax54)\
**Post date:** [January 16, 2020, 1:29pm UTC](https://community.openhab.org/t/send-same-command-to-one-group-except-one/85768/4 "2020-01-16T13:29:05Z")

</div>

In OH2.5 sending command to group doesn’t work. I will look for DP with Groups.

---

<div class="post-metadata">

**Author:** ![rossko57](https://community.openhab.org/user_avatar/community.openhab.org/rossko57/32/70263_2.png) [@rossko57](https://community.openhab.org/u/rossko57)\
**Post date:** [January 16, 2020, 1:35pm UTC](https://community.openhab.org/t/send-same-command-to-one-group-except-one/85768/5 "2020-01-16T13:35:15Z")

</div>

> [@furax54](#):
>
> In OH2.5 sending command to group doesn’t work

I’m sure that’s not true? Show us the events.log of that not happening, please.

---

<div class="post-metadata">

**Author:** ![furax54](https://community.openhab.org/user_avatar/community.openhab.org/furax54/32/70835_2.png) [@furax54](https://community.openhab.org/u/furax54)\
**Post date:** [January 16, 2020, 1:57pm UTC](https://community.openhab.org/t/send-same-command-to-one-group-except-one/85768/6 "2020-01-16T13:57:12Z")

</div>

Thank you ! Just find that I have a String item in my group !
