Zigbee is a low-power wireless protocol designed to create mesh networks of devices. It is one of the most widespread options for setting up a local home automation installation with sensors, lights, plugs, and relays from many manufacturers.
Unlike WiFi, it is designed to move small amounts of data with low power consumption. Furthermore, its network allows many permanently powered devices to relay messages from other devices.
To design a stable network, it is essential to understand its structure and the different roles of Zigbee devices.
The Zigbee Standard (IEEE 802.15.4)
Technically, Zigbee is a set of high-level protocols built on top of the physical layer and medium access control standard IEEE 802.15.4.
Like traditional WiFi or Bluetooth, it operates in the 2.4 GHz frequency band. However, its design goals are radically opposed to those of WiFi:
- Low bandwidth: The maximum theoretical transfer rate is only 250 kbps. It is not suitable for transmitting audio or video.
- Low power consumption: Zigbee chips can spend 99% of their lifespan in deep sleep mode, waking up in microseconds only to send a data frame of a few bytes.
- Bidirectional communication: Unlike many simple RF remotes, Zigbee has delivery acknowledgments and allows devices to report their status. An ACK confirms the reception of a frame, while the status reported by the device allows us to know if the action was applied.
This bidirectionality is what allows us to have much more certainty about the state of our home. If we see in the interface that a light is off, we are not simply assuming it because we sent a command into the air. The device has responded, and Home Assistant can detect when something fails.
Mesh Network Topology
The real strength of Zigbee lies in its network topology. While WiFi uses a star architecture (all devices must have direct range with the central router), Zigbee uses a mesh network.
In a mesh network, the devices themselves act as signal repeaters. If we have a temperature sensor in the attic and the home automation server is in the basement, the signal won’t try to go through three floors of concrete. Instead, the sensor will send the data to the light bulb in the adjacent room, which will pass it to the plug in the hallway, and so on, “hopping” until it reaches its destination.
Additionally, the protocol includes dynamic routing and self-healing. If we temporarily unplug the hallway plug that was serving as a bridge, the network detects the failure and automatically recalculates a new alternative route through other nearby devices.
The Three Roles in a Zigbee Network
For this mesh to function correctly, the standard defines three types of devices (logical and physical roles) that we must understand perfectly when planning our installation.
Every Zigbee network requires a single coordinator. It is the device that creates the network, defines its parameters, and participates in security management. The routers maintain and discover routes according to the needs of the mesh.
In closed ecosystems, this role is assumed by proprietary bridges, such as the Philips Hue Bridge or a Tuya hub. With Home Assistant, we can replace them with a compatible coordinator to manage our own network.
Instead, we will use a Zigbee USB Dongle connected directly to our server (Raspberry Pi, Mini PC, etc.).
This USB “stick” contains a radio microcontroller (typically from Texas Instruments like the CC2652P, or Silicon Labs like the EFR32MG21) that will act as the universal coordinator for our home.
Among the common coordinators are the Sonoff Zigbee 3.0 USB Dongle Plus and the Home Assistant Connect ZBT-2, the successor to the ZBT-1 (formerly SkyConnect). The actual capacity of the network depends on the coordinator, its firmware, the number of routers, and the topology, not just a maximum device number.
Routers are the devices responsible for extending the network and relaying messages. As a practical guideline, many permanently powered Zigbee devices act as routers, although there are exceptions and not all repeat with the same quality.
This includes:
- Smart light bulbs.
- Wall plugs or power strips.
- In-line relays (like those from Sonoff, Moes, or dimmer modules).
- Neutral wall switches.
A network with reliable and well-distributed routers will have better coverage and more alternative routes. Routers keep the radio on to listen for requests from battery-powered devices.
In practice, not all Zigbee routers perform equally well. Some plugs and relays usually behave wonderfully, while certain cheap light bulbs can provide a less stable mesh. We’ll see this as we discuss specific hardware.
End Devices are those that run on batteries (CR2032, CR2450 coin cells, or AAA batteries).
Since their goal is to maximize battery life, they do not keep the radio on listening to traffic. Therefore, an end device does not route messages from other devices.
These sensors spend most of their time “asleep.” They only wake up when an event occurs (we open the door, they detect motion, or it’s time to send the periodic temperature), transmit their burst of data, and go back to sleep. To integrate into the network, an End Device always needs to associate with a “Parent,” which can be the Coordinator or the Router that is closest and has the best link quality (LQI).
The Problem of Interference: Zigbee vs WiFi
Before closing this theoretical section, we must give a fundamental technical warning that is often the source of 90% of instability problems in home automation networks.
As we mentioned, Zigbee and WiFi share the 2.4 GHz band. However, their channel numbering does not match.
A WiFi channel occupies 20 or 40 MHz of bandwidth. A Zigbee channel occupies only 2 MHz. If the WiFi channel overlaps with the Zigbee channel of the coordinator, interference can degrade the reception of weaker signals.
- The most commonly used WiFi channels are 1, 6, and 11.
- With Zigbee, it is advisable to choose the channel after checking which WiFi channels our access points actually occupy. There is no universally best channel for all homes.
It is a highly recommended practice to use a USB extension cable to connect your Zigbee dongle to the server. USB 3.0 ports and devices can generate interference in the 2.4 GHz band. Keep the coordinator separated from the server and, if possible, use a USB 2.0 port or hub.
How to Build a Stable Mesh
A common mistake is to start by pairing all the battery-powered sensors and then complain that the Zigbee network “is flaky.” The mesh is built much better the other way around: first, we place devices powered by the mains, and then we add the battery sensors.
That is, we start with plugs, relays, light bulbs, or switches that act as Routers, distributed throughout the house. When that infrastructure already exists, the end sensors have nearby parents to connect to, and the network is born much healthier.
For a medium-sized home, before pairing twenty door sensors, try to have at least several well-distributed Zigbee routers. A smart plug in a hallway can do more for network stability than changing the USB coordinator three times.