Zigbee Coordinator, Router, and End Device Explained
coordinator starts and manages the network, the router extends the network by passing messages, and the end device is a simple device that communicates only with its parent (coordinator or router) and saves power by sleeping when idle.How It Works
Think of a Zigbee network like a small town. The coordinator is the town hall that sets up the town and keeps track of all the houses and roads. It creates the network and allows new devices to join.
The routers are like streetlights or relay stations that help messages travel farther by passing them along to other devices. They keep the network connected and strong.
The end devices are like homes that only talk to their nearest streetlight or town hall. They don’t pass messages for others and can go to sleep to save energy, making them perfect for battery-powered gadgets.
Example
This example shows how to identify device roles in a Zigbee network using Python with the zigpy library, which interacts with Zigbee devices.
from zigpy.application import ControllerApplication async def print_device_roles(): app = await ControllerApplication.new() for device in app.devices.values(): print(f"Device {device.ieee} role: {device.node_desc.logical_type}") # Expected roles: 0 = Coordinator, 1 = Router, 2 = End Device
When to Use
Use a coordinator when you need to create and manage a Zigbee network, such as in a smart home hub.
Routers are useful to extend the network range and improve communication reliability, especially in larger homes or buildings.
End devices are ideal for simple sensors or switches that need to save battery life by sleeping most of the time and only waking to send data.
For example, a smart light switch is often an end device, a smart plug can be a router, and the central hub is the coordinator.
Key Points
- The
coordinatorcreates and controls the Zigbee network. Routershelp pass messages and extend network coverage.End devicescommunicate only with their parent and save power by sleeping.- Each device role has a specific job to keep the network efficient and reliable.