%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#2C3E50', 'primaryTextColor': '#fff', 'primaryBorderColor': '#16A085', 'lineColor': '#E67E22', 'secondaryColor': '#7F8C8D', 'tertiaryColor': '#ECF0F1', 'fontSize': '13px'}}}%%
graph TB
C[Coordinator<br/>0x0000]
E1[End Device<br/>0x0001]
E2[End Device<br/>0x0002]
E3[End Device<br/>0x0003]
E4[End Device<br/>0x0004]
E5[End Device<br/>0x0005]
C --- E1
C --- E2
C --- E3
C --- E4
C --- E5
style C fill:#E67E22,stroke:#2C3E50,stroke-width:3px,color:#fff
style E1 fill:#2C3E50,stroke:#16A085,stroke-width:2px,color:#fff
style E2 fill:#2C3E50,stroke:#16A085,stroke-width:2px,color:#fff
style E3 fill:#2C3E50,stroke:#16A085,stroke-width:2px,color:#fff
style E4 fill:#2C3E50,stroke:#16A085,stroke-width:2px,color:#fff
style E5 fill:#2C3E50,stroke:#16A085,stroke-width:2px,color:#fff
983 Zigbee Network Topologies and Device Roles
Understanding star, tree, and mesh configurations with Coordinator, Router, and End Device roles
983.1 Learning Objectives
By the end of this chapter, you will be able to:
- Distinguish between Zigbee star, tree, and mesh network topologies
- Explain the roles and responsibilities of Coordinator, Router, and End Device
- Determine which device role is appropriate for different hardware configurations
- Design network topologies that balance coverage, reliability, and power efficiency
- Calculate the number of routers needed for adequate mesh coverage
983.2 Introduction
Zigbee supports three network topologies: star, tree, and mesh. Each topology offers different tradeoffs between simplicity, range, and reliability. Understanding these topologies and the device roles within them is essential for designing effective Zigbee networks.
Imagine a company with offices and employees:
- Star topology: Everyone reports directly to the CEO (simple but CEO is overloaded)
- Tree topology: Employees report to managers, managers report to CEO (hierarchical)
- Mesh topology: Everyone can talk to multiple colleagues (many paths, very resilient)
In Zigbee networks, devices similarly can connect in different patterns. The choice affects how messages travel and what happens when a device fails.
983.3 Network Topologies
983.3.1 Star Topology
In a star topology, all devices communicate directly with the central Coordinator:
Characteristics:
| Aspect | Star Topology |
|---|---|
| Hop count | Always 1 hop |
| Latency | Lowest (10-50ms) |
| Range | Limited to Coordinator range (10-30m) |
| Single point of failure | Coordinator |
| Complexity | Simplest |
| Best for | Small deployments, single room |
Advantages: - Lowest latency (single hop) - Simplest to deploy and debug - Predictable message delivery times
Disadvantages: - Limited range (all devices must reach Coordinator) - Coordinator is single point of failure - No redundancy in communication paths
983.3.2 Tree Topology
Tree topology adds hierarchical structure with Routers between End Devices and the Coordinator:
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#2C3E50', 'primaryTextColor': '#fff', 'primaryBorderColor': '#16A085', 'lineColor': '#E67E22', 'secondaryColor': '#7F8C8D', 'tertiaryColor': '#ECF0F1', 'fontSize': '13px'}}}%%
graph TB
C[Coordinator<br/>0x0000]
R1[Router<br/>0x0001]
R2[Router<br/>0x0002]
E1[End Device<br/>0x0011]
E2[End Device<br/>0x0012]
E3[End Device<br/>0x0021]
E4[End Device<br/>0x0022]
C --> R1
C --> R2
R1 --> E1
R1 --> E2
R2 --> E3
R2 --> E4
style C fill:#E67E22,stroke:#2C3E50,stroke-width:3px,color:#fff
style R1 fill:#16A085,stroke:#2C3E50,stroke-width:2px,color:#fff
style R2 fill:#16A085,stroke:#2C3E50,stroke-width:2px,color:#fff
style E1 fill:#2C3E50,stroke:#16A085,stroke-width:2px,color:#fff
style E2 fill:#2C3E50,stroke:#16A085,stroke-width:2px,color:#fff
style E3 fill:#2C3E50,stroke:#16A085,stroke-width:2px,color:#fff
style E4 fill:#2C3E50,stroke:#16A085,stroke-width:2px,color:#fff
Characteristics:
| Aspect | Tree Topology |
|---|---|
| Hop count | Variable (1-5 typical) |
| Latency | Medium (50-200ms) |
| Range | Extended through Routers |
| Single point of failure | Parent Router |
| Complexity | Medium |
| Best for | Buildings with clear floor/room structure |
Advantages: - Extended range through multiple hops - Efficient addressing (hierarchical) - Clear parent-child relationships
Disadvantages: - Single path to Coordinator (no redundancy) - Router failure orphans all children - Limited self-healing capability
983.3.3 Mesh Topology
Mesh topology allows multiple routing paths between any two devices:
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#2C3E50', 'primaryTextColor': '#fff', 'primaryBorderColor': '#16A085', 'lineColor': '#E67E22', 'secondaryColor': '#7F8C8D', 'tertiaryColor': '#ECF0F1', 'fontSize': '13px'}}}%%
graph TB
C[Coordinator<br/>0x0000]
R1[Router<br/>0x0001]
R2[Router<br/>0x0002]
R3[Router<br/>0x0003]
E1[End Device<br/>0x0011]
E2[End Device<br/>0x0021]
C --- R1
C --- R2
R1 --- R2
R1 --- R3
R2 --- R3
R1 --- E1
R3 --- E2
style C fill:#E67E22,stroke:#2C3E50,stroke-width:3px,color:#fff
style R1 fill:#16A085,stroke:#2C3E50,stroke-width:2px,color:#fff
style R2 fill:#16A085,stroke:#2C3E50,stroke-width:2px,color:#fff
style R3 fill:#16A085,stroke:#2C3E50,stroke-width:2px,color:#fff
style E1 fill:#2C3E50,stroke:#16A085,stroke-width:2px,color:#fff
style E2 fill:#2C3E50,stroke:#16A085,stroke-width:2px,color:#fff
Characteristics:
| Aspect | Mesh Topology |
|---|---|
| Hop count | Variable (1-10+) |
| Latency | Higher (100-500ms) |
| Range | Maximum (multi-hop) |
| Redundancy | Multiple paths |
| Complexity | Highest |
| Best for | Large deployments, reliability-critical |
Advantages: - Self-healing: automatic rerouting when paths fail - Maximum range through multi-hop routing - High reliability through redundant paths - Load balancing across multiple routes
Disadvantages: - Higher latency due to multi-hop routing - More complex debugging - Increased network traffic for route maintenance
983.4 Device Roles
Zigbee defines three device roles, each with specific capabilities and power profiles:
983.4.1 Coordinator (ZC)
The Coordinator is the network controller and trust center:
Responsibilities: - Forms the network (selects PAN ID and channel) - Acts as Trust Center for security - Maintains device address assignments - Stores binding and group tables - Always mains-powered (cannot sleep)
Hardware Requirements: - Mains power (USB, wall adapter, PoE) - Sufficient memory for device tables - Typically a hub device (SmartThings, Hubitat, Zigbee2MQTT)
Example Coordinators:
- SmartThings Hub (1,000 devices)
- Hubitat Elevation (128 devices)
- Zigbee2MQTT with CC2652P (200 devices)
- ConBee II USB adapter (100 devices)
Key Point: There is exactly ONE Coordinator per Zigbee network. Losing the Coordinator means the network cannot accept new devices and may lose critical state.
983.4.2 Router (ZR)
Routers extend the mesh network by forwarding messages:
Responsibilities: - Relay messages between devices - Allow End Devices to join as children - Maintain neighbor and routing tables - Always powered (cannot sleep)
Hardware Requirements: - Mains power (plugged-in devices) - Examples: smart bulbs, smart plugs, powered sensors
Determining Router Capability:
| Power Source | Device Type | Router Capable? |
|---|---|---|
| Wall outlet | Smart plug | Yes |
| Light socket | Smart bulb | Yes |
| 24V wired | Thermostat | Yes |
| Battery | Door sensor | No |
| Battery | Motion sensor | No |
| Solar | Outdoor sensor | Usually No |
983.4.3 End Device (ZED)
End Devices are leaf nodes that cannot route messages:
Responsibilities: - Send and receive messages through parent Router - Sleep most of the time to conserve power - Poll parent periodically for pending messages
Hardware Requirements: - Battery or mains power - Limited memory (no routing tables) - Examples: door sensors, motion sensors, temperature sensors
Power Management:
End Device Power States:
1. Deep Sleep: 1-5 µA (99% of time)
2. Wake: Check for work (10ms)
3. Poll: Ask parent for messages (15ms)
4. Transmit: Send sensor data (10ms)
5. Return to sleep
Result: 5-10 year battery life on CR2450 coin cell
983.4.4 Device Role Comparison
| Feature | Coordinator | Router | End Device |
|---|---|---|---|
| Power | Always on | Always on | Sleeps |
| Routing | Yes | Yes | No |
| Children | Yes | Yes (20-50) | No |
| Network per | 1 only | Many | Many |
| Memory | High | Medium | Low |
| Battery life | N/A (mains) | N/A (mains) | 5-10 years |
983.5 Designing Network Topology
983.5.1 Coverage Calculation
To determine router placement for mesh coverage:
Indoor range (conservative): 10-15 meters
Outdoor range (open area): 30-100 meters
Coverage area per router (indoor): ~150 m² (10m radius)
Overlap requirement: 30% for redundancy
Example: 200 m² apartment
- Minimum routers: 200 / 150 = 2 routers
- With redundancy: 3-4 routers recommended
983.5.2 Router Density Guidelines
| Deployment | Area per Router | Redundancy Factor |
|---|---|---|
| Apartment | 150-200 m² | 1.3x |
| House | 200-300 m² | 1.5x |
| Office | 300-500 m² | 2.0x |
| Warehouse | 500-1000 m² | 2.5x |
| Industrial | Custom survey | 3.0x |
983.5.3 Topology Selection Guide
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#2C3E50', 'primaryTextColor': '#fff', 'primaryBorderColor': '#16A085', 'lineColor': '#E67E22', 'secondaryColor': '#7F8C8D', 'tertiaryColor': '#ECF0F1', 'fontSize': '12px'}}}%%
flowchart TD
Q1{All devices within<br/>30m of Coordinator?}
Q2{Reliability-critical<br/>application?}
Q3{More than 20<br/>devices?}
STAR[Use Star Topology]
TREE[Use Tree Topology]
MESH[Use Mesh Topology]
Q1 -->|Yes| Q2
Q1 -->|No| MESH
Q2 -->|No| STAR
Q2 -->|Yes| Q3
Q3 -->|No| TREE
Q3 -->|Yes| MESH
style STAR fill:#16A085,stroke:#2C3E50,stroke-width:2px,color:#fff
style TREE fill:#E67E22,stroke:#2C3E50,stroke-width:2px,color:#fff
style MESH fill:#2C3E50,stroke:#16A085,stroke-width:2px,color:#fff
983.6 Smart Home Example
A typical 2-story home deployment illustrates device role assignment:
Inventory:
- 1 SmartThings Hub (Coordinator)
- 10 Smart bulbs (Routers)
- 1 Smart thermostat (Router)
- 8 Door/window sensors (End Devices)
- 4 Motion sensors (End Devices)
- 2 Smart plugs (Routers)
Device Role Summary:
- Coordinator: 1 (hub)
- Routers: 13 (bulbs + thermostat + plugs)
- End Devices: 12 (sensors)
Router:End Device ratio: 13:12 (excellent coverage)
Why this works well: - Smart bulbs installed throughout provide mesh backbone - Every room has at least one router - End devices (sensors) always within range of multiple routers - If one bulb is off at wall switch, alternate routes available
983.7 Common Mistakes
983.7.1 Mistake: All Battery Devices
Bad deployment:
- 1 Coordinator (hub in basement)
- 20 door sensors (all battery-powered end devices)
- 0 routers!
Result:
- Only sensors within 10-15m of hub work
- Far sensors drop offline constantly
- No mesh - just a very limited star
Fix: Add mains-powered devices (smart plugs, bulbs) as routers between the Coordinator and distant sensors.
983.7.2 Mistake: Switching Off Router Bulbs
Problem:
- User turns off bedroom smart bulb at wall switch
- Bulb loses power
- Router goes offline
- Bedroom sensor loses parent
- Automations stop working
Fix: - Use smart switches instead of wall switches - Smart switch sends Zigbee “off” command - Bulb stays powered as router, just light is off
983.8 Summary
This chapter covered Zigbee network topologies and device roles:
Star Topology: Simple, lowest latency, limited range
Tree Topology: Extended range, hierarchical structure
Mesh Topology: Maximum reliability, self-healing, highest complexity
Coordinator: One per network, forms PAN, trust center
Router: Extends mesh, always powered, forwards messages
End Device: Leaf node, battery-powered, sleeps to conserve power
Key design principles: - Match device role to power source (battery = End Device, mains = Router) - Maintain adequate router density for coverage - Plan for redundancy in reliability-critical applications - Consider mesh topology for deployments over 20 devices
983.9 What’s Next
In the next chapter, Zigbee Routing and Self-Healing, we explore how AODV routing enables automatic path discovery and mesh self-healing when devices fail.
- Zigbee Protocol Stack - Layered architecture
- Zigbee Routing and Self-Healing - AODV and mesh recovery
- Zigbee Network Formation - Joining process