Integrations · Home Assistant

Zigbee Network.

Reading time
~12 min · 2,472 words
Section
All Home Assistant pages

Zigbee is the go-to protocol when an agricultural operation outgrows BLE but doesn't need LoRa's multi-mile range. A Zigbee network handles hundreds of devices through mesh networking, each mains-powered device acts as a router that extends the network's reach beyond any single hop. Battery-powered sensors sleep most of the time and wake briefly to report, yielding 1-2 year battery life. Devices from many manufacturers interoperate within a single Zigbee network, giving flexibility and breaking vendor lock-in. The core choice in a Zigbee deployment is between two Home Assistant integration paths: ZHA (native to Home Assistant) and Zigbee2MQTT (a separate service that bridges Zigbee to Home Assistant via MQTT). Both work. Each has its character.

Zigbee fundamentals.

Zigbee is a wireless mesh networking protocol operating in the 2.4 GHz ISM band (the same band as Wi-Fi and BLE). The mesh topology and the device-role model give Zigbee its distinctive properties.

Device roles.

Coordinator. The central device that manages the network. Every Zigbee network has exactly one coordinator. For Home Assistant, this is typically a USB stick or dongle attached to the host. The coordinator maintains the network's routing table, authenticates new devices, and is the gateway between the Zigbee network and Home Assistant.

Routers. Mains-powered devices (switches, smart plugs, bulbs) that actively route messages for other devices. Every router extends the network's physical reach. A deployment with many routers can span large areas reliably.

End devices. Battery-powered devices (sensors, buttons) that sleep most of the time and communicate briefly through their parent router. End devices cannot route for other devices but benefit from the routing that routers provide.

Mesh networking.

When a message needs to reach a device that's out of the coordinator's direct range, it hops through routers. Each router relays the message toward its destination. Hops happen transparently; the grower doesn't manage routing manually.

Practical implication: an operation with many mains-powered Zigbee devices (relays, switches, smart plugs) scattered across the facility has reliable coverage through mesh routing. An operation with only battery-powered end devices has a single-hop network that depends on coordinator range.

Range.

Per-hop range is typically 30-50 feet indoors. With mesh routing, the network's effective reach extends to the last router plus one end-device hop. A Zigbee network with routers spaced 40 feet apart covers hundreds of feet reliably.

Scale.

A single Zigbee coordinator supports 100-200 devices on many implementations. Mesh networking handles the connectivity; coordinator memory handles the device table. For very large operations, multiple coordinators (each managing a subset of the facility) can coexist.

Frequency and interference.

Zigbee and Wi-Fi both use 2.4 GHz. They can coexist but with care: heavy Wi-Fi traffic on overlapping channels degrades Zigbee performance. Common mitigation: keep Zigbee on channels that don't overlap the Wi-Fi channels in use (Zigbee channels 15, 20, 25, or 26 typically work; specific choices depend on the local Wi-Fi environment). Many coordinators support channel selection at network formation.

Coordinator hardware.

The USB coordinator is the starting point for a Home Assistant Zigbee deployment.

Popular coordinator options.

Sonoff ZBDongle-E.. Widely used, good compatibility, supported by both ZHA and Zigbee2MQTT. EFR32MG21-based.

ConBee II / ConBee III.. From dresden elektronik, the deCONZ developers. Well-supported.

TubeZB / TubesZB-EFR32.. Higher-end coordinator with PoE variants for network-mounted operation.

SMLIGHT SLZB-06 / SLZB-07.. Ethernet and PoE options; useful when the coordinator should be located away from the Home Assistant host for better mesh positioning.

Home Assistant SkyConnect / Yellow integrated radio. Part of the Home Assistant Connect ZBT-1 device or integrated into Home Assistant Yellow. Official Home Assistant-branded coordinator.

Coordinator placement.

A coordinator mounted at the Home Assistant host is convenient but may not be optimally placed for mesh coverage. Two placement patterns:

USB-extended. Use a USB extension cable (powered if long) to position the coordinator dongle in a better location than the host itself. 3-6 foot USB extensions are common. This is often enough to get the coordinator out of equipment-rack interference.

Network-connected coordinator. Coordinators like the SLZB-06 or TubeZB with Ethernet or PoE can be located anywhere on the network. The coordinator mounts at a central location in the facility; the Home Assistant host connects over the network. Useful for operations where the host's location is dictated by factors other than wireless coverage.

Firmware versions.

Zigbee coordinators run firmware that should be kept reasonably current. Outdated firmware sometimes has compatibility issues with newer devices or fails to support newer Zigbee features. Firmware updates are typically done through a specific tool (varies by coordinator) and should be done with a backup of the Zigbee network configuration first.

ZHA vs. Zigbee2MQTT.

Home Assistant offers two paths for Zigbee integration. Both work; each has its character.

ZHA (Zigbee Home Automation).

Native Home Assistant integration. Runs directly in Home Assistant, no separate service required. Configuration through the Home Assistant UI. Simpler setup: pair the coordinator, add devices, they appear.

Strengths. - Simpler installation. No MQTT broker needed just for Zigbee. - Tighter Home Assistant integration. Device discovery, entity types, and updates happen natively. - Less moving parts. Fewer failure modes at the service level.

Weaknesses. - Device support is narrower than Zigbee2MQTT. Some devices work with Zigbee2MQTT but not ZHA. - Configuration flexibility is more limited. - Quirks (device-specific workarounds) are sometimes slower to arrive in ZHA than in Zigbee2MQTT.

Zigbee2MQTT.

Separate service (runs as an add-on, Docker container, or standalone service) that bridges the Zigbee coordinator to Home Assistant via MQTT. Home Assistant sees Zigbee devices as MQTT devices.

Strengths. - Broader device support. The Zigbee2MQTT project's device database is very extensive; support for quirky or new devices often appears in Zigbee2MQTT before ZHA. - More configuration flexibility. Device-specific settings, detailed logging, custom converters. - Active community development. The Zigbee2MQTT project moves quickly and adds new devices regularly.

Weaknesses. - Additional service to run, maintain, and update. - Requires MQTT broker (Mosquitto typically). - Slightly more complex setup and troubleshooting. - Separate update cycles from Home Assistant core.

Choosing.

For a first Zigbee deployment with common devices, either works. The specific device compatibility (does the grower's existing or planned hardware work well with one integration) often drives the choice. Checking both integrations' device databases for the specific products tells the grower which integration is more likely to work cleanly.

Migration between ZHA and Zigbee2MQTT is possible but not trivial. The Zigbee network itself has to be re-paired; devices need to be re-added to the new integration. Operations that might switch should budget the migration effort.

The collective's general observation. Zigbee2MQTT has broader device support and deeper community involvement; ZHA has simpler integration. For growers comfortable running an additional service, Zigbee2MQTT's broader compatibility is usually worth it. For growers who prefer the simplest possible setup, ZHA is appropriate.

Common Zigbee devices for agriculture.

The device ecosystem is large. Some categories relevant to agricultural operations:

Temperature and humidity sensors.

Aqara (various models). each. Reliable, good accuracy, long battery life. Widely used in smart home and adaptable to agricultural monitoring.

Sonoff SNZB-02 and SNZB-02D.. Inexpensive option, reasonable accuracy, widely supported.

Third Reality, Tuya-based sensors, and others. Variable pricing and compatibility. Consult integration device databases before purchase.

Contact sensors.

Door/window sensors, leak sensors, vibration sensors. little each. Useful for door-left-open alerts on walk-in coolers, leak detection in irrigation mains, security applications.

Switches and relays.

Sonoff smart plugs and relays. Good Zigbee support, little each. Useful for controlling fans, pumps, lights from Home Assistant automations.

Aqara smart plugs and relays. Similar use cases with different build quality and price.

In-wall relay modules. Various manufacturers. Mount behind existing switches to add Zigbee control without changing the switch face.

Lighting controls.

Zigbee dimmers and switches. Replace standard wall switches with Zigbee-capable versions. Provides dimming control, automation, and status feedback.

Zigbee LED strip controllers. Control LED strips through Zigbee; useful for supplemental lighting in propagation areas.

Buttons and scene controllers.

Physical buttons that trigger Zigbee signals. Useful for manual overrides, mode switches, emergency stops accessible physically in the greenhouse.

Soil and environmental sensors.

A smaller category: most agricultural-specific sensors are BLE or wired rather than Zigbee. Some Zigbee options exist (Third Reality and several Tuya-based makers sell Zigbee soil moisture sensors, for example) but the selection is narrower than for general sensing.

Specialty agricultural equipment.

Some commercial agricultural equipment (certain fertigation controllers, some environmental sensors) supports Zigbee. These tend to be less common than Modbus in industrial-grade equipment.

Pairing Zigbee devices.

The pairing workflow is similar between ZHA and Zigbee2MQTT.

Prepare the device.

Most Zigbee devices have a specific button press or sequence to enter pairing mode (long-press the reset button, button sequence, or removal and reinsertion of batteries). Check the device's documentation.

Enable pairing in the integration.

ZHA. Settings → Devices & Services → Zigbee Home Automation → Add Device.

Zigbee2MQTT. Through the Zigbee2MQTT frontend at http://host:8080 or similar, click "Permit join" and configure the duration.

The integration enters a permit-join state during which new devices can join the network.

Put device in pairing mode.

Perform the device-specific pairing action. The device broadcasts a pairing request that the coordinator receives.

Device joins.

The device appears in the integration interface after pairing. The device's type is identified (temperature sensor, switch, etc.), and its entities are created.

Rename, assign area.

Per the Organizing Home Assistant for a Farm conventions, rename the device descriptively and assign it to its area.

Exit pairing mode.

After all devices are added, exit pairing mode. This prevents accidental or unauthorized device additions.

Mesh network health.

A Zigbee network is a dynamic system. Over time, the mesh's structure changes as devices come and go; understanding the network state helps keep it healthy.

Network visualization.

Both ZHA and Zigbee2MQTT provide network visualization tools showing the current mesh topology: which devices are connected to which routers, signal strengths, and recent activity. The visualization is useful for:

  • Confirming mesh is forming as expected
  • Identifying devices on marginal links (candidates for relocation)
  • Finding isolated devices that aren't routing for others as expected
  • Understanding the network before making changes

LQI (Link Quality Indicator).

Each connection has an LQI value from 0 to 255; higher is better. LQI above 100 is strong; below 50 is marginal. LQI varies with environmental conditions and time; a single reading is less useful than a trend.

Adding routers to improve coverage.

A network with many end devices and few routers has single-hop topology limited by coordinator range. Adding mains-powered routers (smart plugs in strategic locations, for example) extends mesh coverage.

The collective pattern: deploy routers first (in advance of sensors), then add end devices. Or equivalently, ensure every zone that will have end devices also has at least one mains-powered Zigbee device that acts as router.

Network healing.

If routing becomes suboptimal (devices preferring distant parents over closer ones, for example), network healing re-forms the routing tree. Both ZHA and Zigbee2MQTT can trigger this. Healing is disruptive (devices briefly disconnect and re-associate) but can resolve accumulated routing problems.

Zigbee failure modes.

Specific problems that affect Zigbee deployments.

The device that won't join. Device keeps trying to pair but never completes. Causes: Zigbee channel conflict with Wi-Fi, coordinator at max device capacity, device not in pairing mode despite appearance, firmware version mismatch. Fixes: check channel settings, verify device count, consult device-specific documentation, update coordinator firmware.

The device that drops off the network. Device was paired and working, now shows offline. Causes: battery died, device out of mesh range, interference event, firmware issue. Fixes: check battery, verify physical location, check mesh topology, re-pair if needed.

The sensor that reports stale data. Sensor shows as online but values haven't changed in hours. Causes: sensor has wake-up problem, mesh routing failed during updates, battery low enough to affect transmission but not reporting low. Fixes: check reporting interval, force a report, replace battery if at low voltage.

The mesh that works in summer but fails in winter. Greenhouse-located routers rely on mains power. Winter closure schedules may leave routers unpowered during some periods, collapsing the mesh. Fix: ensure routers remain powered year-round, or accept mesh degradation during low-season operations.

The channel conflict with Wi-Fi. A Zigbee network on channel 11 experienced heavy interference after a new Wi-Fi AP was installed on Wi-Fi channel 1 (which overlaps Zigbee channel 11). Fix: move Zigbee to a non-overlapping channel (15, 20, 25, or 26).

The coordinator firmware that was outdated. Some newer Zigbee 3.0 devices wouldn't join an older coordinator firmware. Fix: update coordinator firmware.

The ZHA-to-Zigbee2MQTT migration that lost devices. A grower migrated from ZHA to Zigbee2MQTT hoping for better device support, but didn't re-pair all devices correctly after the migration. Some devices remained orphaned. Fix: migration planning, systematic re-pairing, verification that each device appears in the new integration.

The proprietary device that didn't fully integrate. A specific Zigbee lock used proprietary extensions that didn't map cleanly to Home Assistant entities. Basic functionality worked; advanced features were missing. Fix: device-specific research before purchase, or accept feature limitations.

The coordinator that was too close to equipment. Coordinator mounted in an equipment rack with many switching power supplies experienced interference that caused missed messages. Fix: USB-extended coordinator placement away from RF-noisy equipment, or network-connected coordinator in a quieter location.

The upgrade that changed channel selection. A firmware update to the coordinator defaulted to a different channel, collapsing the mesh temporarily. Fix: review firmware update release notes, preserve channel configuration, or re-form network if needed.

What not to do.

Don't mix Zigbee and Wi-Fi on overlapping 2.4 GHz channels. Plan channel selection. Zigbee channels 15, 20, 25, 26 typically avoid Wi-Fi conflicts.

Don't skip routers and rely on end devices alone. Without mesh routing, range is single-hop and the network is brittle.

Don't put all Zigbee devices in one zone without routers in between. Coverage will be sparse where it shouldn't be.

Don't pair devices casually. Name them, assign them to areas, set calibration offsets if needed. Do the cleanup at the time of pairing rather than accumulating unnamed devices.

Don't switch integrations without planning. ZHA-to-Zigbee2MQTT migration (or the reverse) requires re-pairing devices. Plan the migration; don't discover the effort mid-process.

Don't neglect coordinator firmware. Outdated firmware causes subtle device compatibility issues. Periodic updates keep the coordinator current.

Don't buy Zigbee devices without checking compatibility. Both ZHA and Zigbee2MQTT maintain device databases. A quick check before purchase prevents post-purchase disappointment.

Don't expect proprietary ecosystems to work fully. Some manufacturers implement proprietary Zigbee extensions. Basic functionality works with standard integrations; advanced features may not.

Frequently asked questions.

What is Zigbee and how does it work?

Zigbee is a wireless mesh networking protocol in the 2.4 GHz band, built for low-power smart devices. Every network has one coordinator, typically a USB dongle, that manages routing and authenticates devices. Mains-powered devices like smart plugs act as routers that relay messages and extend range, while battery-powered sensors sleep most of the time and report through a nearby router, giving one to two years of battery life.

What is the difference between ZHA and Zigbee2MQTT?

ZHA is Home Assistant's native Zigbee integration: simpler to set up, no MQTT broker required, fewer moving parts. Zigbee2MQTT is a separate service that bridges Zigbee to Home Assistant over MQTT; it supports more devices, adds support for new and quirky hardware faster, and offers more configuration flexibility, at the cost of running an extra service. Switching later requires re-pairing every device, so check both device databases before choosing.

What is the range of a Zigbee network?

A single Zigbee hop typically covers 30 to 50 feet indoors. The mesh extends that: each mains-powered router relays messages, so a network with routers spaced about 40 feet apart covers hundreds of feet reliably. A network made only of battery-powered end devices has no routing and is limited to the coordinator's single-hop range, which is why deploying routers before sensors is the standard practice.

Does Wi-Fi interfere with Zigbee?

It can. Zigbee and Wi-Fi share the 2.4 GHz band, and heavy Wi-Fi traffic on overlapping channels degrades Zigbee performance. The standard mitigation is to run Zigbee on channels 15, 20, 25, or 26, which typically avoid the common Wi-Fi channels. Installing a new Wi-Fi access point on an overlapping channel can suddenly disrupt a Zigbee network that had been working fine.

How many devices can a Zigbee network support?

A single coordinator supports roughly 100 to 200 devices on many implementations. Mesh routing handles the connectivity while the coordinator's memory limits the device table. Very large facilities can run multiple coordinators, each managing its own section. A device that refuses to join can indicate the coordinator has hit its device capacity, alongside other causes like channel conflicts or outdated coordinator firmware.

Why does my Zigbee device keep going offline?

The usual causes are a dead battery, a device outside mesh range, radio interference, or a firmware problem. A sensor can also show online while reporting stale values when its battery is low or its routing failed. Check the battery first, then the network map for weak links, indicated by a link quality reading below about 50, and add a mains-powered router near the problem device if coverage is thin.