You should know about groups in Zigbee2MQTT

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

Latest update: Easier setup!

The setup of groups in Zigbee2MQTT has been made much easier thanks to the introduction of an official web dashboard. Zigbee groups are now also auto-discovered by Home Assistant using MQTT Discovery.

Zigbee2MQTT is a fantastic application that lets you control just about every Zigbee product you can buy. And if it’s not supported, someone is probably already working on getting it integrated. But Zigbee as a technology has its flaws. These aren’t just related to Zigbee2MQTT, but affect any Zigbee ecosystem.

One of the flaws is that it doesn’t handle flooding very well due to its low bandwidth. This can lead to delays and general lag, especially when you have multiple Zigbee products in the same room or in proximity. One possible solution to this problem is the use of groups in Zigbee2MQTT.

Zigbee2MQTT Groups aren’t just for show

Groups aren’t just a feature of Zigbee2MQTT, but one of Zigbee. In a Zigbee network, a group is a collection of endpoints, such as multiple lightbulbs. Zigbee uses group addressing to communicate with groups of endpoints belonging to a set of devices. Groups aren’t just there to group certain lights, which might be in a single light fixture in the UI. They can actually be used to reduce Zigbee traffic.

That all might sound a bit complicated, but the gist of it is that using only one command has to be sent to the group instead of one command to each endpoint. Let’s say you have a light fixture which houses three Philips Hue spotlights. If you group the three lights, only one command is needed to turn on the whole light fixture. If you don’t group the lights, three commands are needed to turn on the fixture. By grouping the lights in this example, we’re only using a third of the commands that would otherwise be needed.

It is worth noting that Zigbee groups have nothing to do Light Groups in Home Assistant. Those are actually just for show and ease of use. Groups have to be configured in Zigbee2MQTT and not in Home Assistant.

Configuring groups in Zigbee2MQTT

To create a Zigbee group in Zigbee2MQTT, you have to open up the Zigbee2MQTT configuration.yaml file, which is not to be confused with the Home Assistant file of the same name. Here’s an example of my light fixture in the office, which houses two spotlights:

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

Each group needs a different numerical ID. In my case, this is group 1. Next, you will need a name for your lights. As mine are the ceiling lights in the office, I’m calling this group office_ceiling_lights. The retain option is optional and refers to the retained message function of MQTT. Per default, it is set to not retain messages. The transition is an optional field which will determine the speed of transition (e.g. when changing the brightness of a light fixture). And finally, there are the devices you want to include in the group. You need to use the ieeeAddr, which is a string of numbers and letters, of the device, not the friendly_name.

There are a few more parameters you can configure, all of which are documented on the Zigbee2MQTT website. Those interested in the ongoing discussion can visit the project’s GitHub repository.

I, personally, use a combination of Philips Hue, IKEA, and Gledopto Zigbee lights in my smart home. I’ve become very fond of the Gledopto LED strip controllers because of their versatility (you can attach your strips) and their price.

Below you will find a few devices which I, personally, use and can recommend. The LED strip is, in my opinion, the best option to pair with the Gledopto GL-C-008.

2 thoughts on “You should know about groups in Zigbee2MQTT”

Leave a comment