You should know about groups in Zigbee2MQTT

Disclosure: This post contains affiliate links. If you click through and make a purchase, I will earn a commission, at no additional cost to you. Read my full disclosure here.

Update: Jun 1, 2021

Latest update: Easier setup!

The process of establishing groups in Zigbee2MQTT has taken a leap towards simplicity, courtesy of an official web dashboard. This upgrade ensures that Zigbee groups are now automatically discovered by Home Assistant via MQTT Discovery, streamlining the entire experience for users.

Zigbee2MQTT has become a household name for those who dabble in the world of smart home automation. With its remarkable compatibility, it has charmed a plethora of Zigbee devices, welcoming them into its ever-growing family. However, despite its impressive repertoire, the Zigbee technology itself has a few Achilles' heels, and these extend to any Zigbee ecosystem. One prominent issue with Zigbee is its inability to gracefully handle flooding due to limited bandwidth. This shortcoming can manifest as delays and general lag, particularly when several Zigbee products share the same space or are in close quarters. Fortunately, the Zigbee2MQTT platform offers a silver lining in the form of Zigbee groups.

Taming traffic is the secret power of Zigbee2MQTT Groups

Embedded within the fabric of Zigbee, groups serve as more than just an organizational feature in Zigbee2MQTT. In the Zigbee network landscape, a group is essentially a gathering of endpoints, such as a cluster of lightbulbs. The magic of group addressing lies in its ability to communicate with multiple endpoints belonging to a set of devices, effectively reducing Zigbee traffic.

One command to rule them all

The concept of groups might seem a tad complex at first glance, but it boils down to this: using a single command can address the entire group, rather than sending individual commands to each endpoint. Picture a light fixture adorned with three Philips Hue spotlights. By grouping these lights, a solitary command can illuminate the entire fixture. Without grouping, you'd need three separate commands to achieve the same effect. With this strategy, we've managed to trim command usage by two-thirds.

A gentle reminder: Zigbee groups differ from Home Assistant's Light Groups. While the latter may seem similar, they primarily serve as a decorative touch and offer user convenience. To truly harness the power of groups, one must configure them within Zigbee2MQTT, not Home Assistant.

Crafting Zigbee2MQTT Groups: A step-by-step guide

To form a Zigbee group in Zigbee2MQTT, begin by opening the configuration.yaml file within Zigbee2MQTT—careful not to confuse it with Home Assistant's identically named file. Below, you'll find an example of my office light fixture, home to a duo of spotlights:

groups:
  '1':
    friendly_name: office_ceiling_lights
    retain: false
    transition: 1
    devices:
      - '0x001788010271ee2e'
      - '0x00158d0002c7e094'

Each group requires a unique numerical ID, in this case, group 1. Next up, a moniker for your lights: I've dubbed mine office_ceiling_lights. The optional retain setting pertains to the retained message function of MQTT, with its default state set to not retain messages. The transition parameter, another optional field, dictates the speed of transitions (e.g., when adjusting a light fixture's brightness). Lastly, list the devices you'd like to include in the group using their ieeeAddr, a sequence of letters and numbers, rather than their friendly_name.

For additional configuration parameters, consult the Zigbee2MQTT website. The inquisitive among you can join the ongoing conversation at the project's GitHub repository.

A curated selection of Zigbee hardware

In my smart home adventures, I've developed a fondness for a blend of Philips Hue, IKEA, and Gledopto Zigbee lights. The Gledopto LED strip controllers have earned a special place in my heart, thanks to their versatility (allowing you to attach your own strips) and wallet-friendly pricing.

Here's a hand-picked list of devices I, personally, use and wholeheartedly recommend. When paired with the Gledopto GL-C-008, the LED strip emerges as the pièce de résistance.

A portrait photo oif Liam Alexander Colman, the author, creator, and owner of Home Assistant Guide wearing a suit.

About Liam Alexander Colman

is an experienced Home Assistant user who has been utilizing the platform for a variety of projects over an extended period. His journey began with a Raspberry Pi, which quickly grew to three Raspberry Pis and eventually a full-fledged server. Liam's current operating system of choice is Unraid, with Home Assistant comfortably running in a Docker container.
With a deep understanding of the intricacies of Home Assistant, Liam has an impressive setup, consisting of various Zigbee devices, and seamless integrations with existing products such as his Android TV box. For those interested in learning more about Liam's experience with Home Assistant, he shares his insights on how he first started using the platform and his subsequent journey.

Comments

  1. Hi,

    I have Milight bulbs and hub run over wifi. I want move to zigbee. Because of the mesh network so everywhere in the house there is a signal.

    In how many groups can one single bulb added!

    Will the bulbs all go on/off/ change color ons same time or is there some delay between them?

    Cheers
    Peter

    Reply
    • Hi Peter. There can be delay, for example some Gledopto controllers have a bit more lag than others. In general, it hasn’t been too bad to bother me.

      Reply

Leave a comment

Share to...