0
0
Drone-programmingConceptBeginner · 3 min read

Zigbee Coordinator, Router, and End Device Explained

In a Zigbee network, the 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.

python
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
Output
Device 00:0d:6f:00:0a:90:2e:7f role: 0 Device 00:0d:6f:00:0a:90:2e:80 role: 1 Device 00:0d:6f:00:0a:90:2e:81 role: 2
🎯

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 coordinator creates and controls the Zigbee network.
  • Routers help pass messages and extend network coverage.
  • End devices communicate only with their parent and save power by sleeping.
  • Each device role has a specific job to keep the network efficient and reliable.

Key Takeaways

The coordinator starts and manages the Zigbee network.
Routers extend the network by forwarding messages.
End devices save power by communicating only with their parent device.
Each role is essential for a stable and efficient Zigbee network.