# \[Feature request\] "smart" (i.e. rules-based) device groups

**URL:** https://hub.mender.io/t/feature-request-smart-i-e-rules-based-device-groups/1839
**Category:** General Discussions
**Tags:** ui, feature-request
**Created:** [April 24, 2020, 12:08pm UTC](https://hub.mender.io/t/feature-request-smart-i-e-rules-based-device-groups/1839 "2020-04-24T12:08:34Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![guillaumekh](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/guillaumekh/32/607_2.png) [@guillaumekh](https://hub.mender.io/u/guillaumekh)
#### Post date: [April 24, 2020, 12:08pm UTC](https://hub.mender.io/t/feature-request-smart-i-e-rules-based-device-groups/1839/1 "2020-04-24T12:08:35Z")

</div>

The UI should allow the creation of “smart groups” of devices. These would be defined not by a fixed array of devices, but by a set of rules (e.g. device\_type ~= “raspberry” AND mender\_client\_version == “2.2.0”).

This would remove the need for user to manually add & remove devices from groups, which is time-consuming, and error-prone.

This is particularly useful for the management of:

- Raspberry-Pi based devices, which _sometimes_ require a [dangerous, non-atomic bootfiles upgrade](https://hub.mender.io/t/updating-raspberry-pi-boot-firmware-files-using-yocto-project-and-mender/1719). Keeping track of which devices need such an upgrade would be _ **much** _ easier with smart device groups.
- [Mender configuration files migrations](https://docs.mender.io/2.2/troubleshooting/running-yocto-project-image#upgrading-from-thud-to-warrior-fails-with-dual-rootfs-configurat), which are also non-atomic. Keeping track of which devices need such an upgrade would also be _ **much** _ easier with smart device groups.

cc @mzedel

I have included below a screenshot of how iTunes implements this.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/229c63d84c765d55302a045ec0405f27a25deae0.jpeg)

---

<div class="post-metadata">

### Author: ![mzedel](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mzedel/32/261_2.png) [@mzedel](https://hub.mender.io/u/mzedel)
#### Post date: [April 27, 2020, 8:27pm UTC](https://hub.mender.io/t/feature-request-smart-i-e-rules-based-device-groups/1839/2 "2020-04-27T20:27:41Z")

</div>

Thank you for the suggestion - the filter improvements I had in mind during embedded world & your email needed restructuring due to some necessary alignments with the backend functionality.  
But it is currently undergoing final testing and soon going to be deployed to hosted Mender and should be part of the 2.4 release. Even though the `~=` functionality will not be there initially (but it should follow shortly)…

With this we’ve also gotten the corresponding deployment functionality ready (since these smart device groups could have devices joining or changing during running deployments e.g.) - so it would be possible to automatically issue updates once a device joins one of these smart groups.

---

<div class="post-metadata">

### Author: ![guillaumekh](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/guillaumekh/32/607_2.png) [@guillaumekh](https://hub.mender.io/u/guillaumekh)
#### Post date: [April 28, 2020, 6:33am UTC](https://hub.mender.io/t/feature-request-smart-i-e-rules-based-device-groups/1839/3 "2020-04-28T06:33:26Z")

</div>

Thank you @mzedel for the update

> [@](#):
>
> it is currently undergoing final testing and soon going to be deployed to hosted Mender and should be part of the 2.4 release.

That’s great, looking forward to these next releases then!

---

<div class="post-metadata">

### Author: ![mzedel](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mzedel/32/261_2.png) [@mzedel](https://hub.mender.io/u/mzedel)
#### Post date: [April 29, 2020, 9:20am UTC](https://hub.mender.io/t/feature-request-smart-i-e-rules-based-device-groups/1839/4 "2020-04-29T09:20:15Z")

</div>

Due to the different tiers on hosted Mender I should clarify that the smart groups and dynamic deployments are an enterprise feature, while the rule based filtering is available in professional.

---

<div class="post-metadata">

### Author: ![guillaumekh](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/guillaumekh/32/607_2.png) [@guillaumekh](https://hub.mender.io/u/guillaumekh)
#### Post date: [April 29, 2020, 10:15am UTC](https://hub.mender.io/t/feature-request-smart-i-e-rules-based-device-groups/1839/5 "2020-04-29T10:15:02Z")

</div>

Useful precision!  
It’s probably also useful to highlight that both use case I outlined above were not really _entreprise_ requirements either. I don’t think Entreprise customers use a lot of Pi’s. And managing non-reversible Mender configuration files migrations, well… you get where I’m heading 😉 I’ll hope smart groups can trickle down to professional soon.
