18  Zigbee Topologies & Roles

Understanding star, tree, and mesh configurations with Coordinator, Router, and End Device roles

In 60 Seconds

Zigbee supports three network topologies: star (all devices connect to Coordinator), tree (hierarchical parent-child), and mesh (any Router can forward to any other). The mesh topology is most common because it provides self-healing and multiple routing paths. Three device roles exist: Coordinator (one per network, forms the PAN), Routers (mains-powered, extend range and relay messages), and End Devices (battery-powered, can sleep to save power). More routers means a stronger, more reliable mesh.

18.1 Learning Objectives

By the end of this chapter, you will be able to:

  • Contrast the tradeoffs among Zigbee star, tree, and mesh network topologies
  • Classify devices into Coordinator, Router, and End Device roles based on their power source and capabilities
  • Evaluate which device role is appropriate for a given hardware configuration and deployment scenario
  • Design network topologies that balance coverage, reliability, and power efficiency
  • Calculate the number of routers needed for adequate mesh coverage in a target environment

18.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.

18.3 Network Topologies

18.3.1 Star Topology

In a star topology, all devices communicate directly with the central Coordinator:

Zigbee star topology showing all end devices and routers connecting directly to a central coordinator with single-hop communication, lowest latency of 10 to 50 milliseconds, and range limited to coordinator coverage area
Figure 18.1: Star topology with all devices connecting directly to the 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

18.3.2 Tree Topology

Tree topology adds hierarchical structure with Routers between End Devices and the Coordinator:

Zigbee tree topology with hierarchical routing through parent-child relationships where routers extend range between end devices and the coordinator with 1 to 5 hops and medium latency of 50 to 200 milliseconds
Figure 18.2: Tree topology with hierarchical routing through Routers

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

18.3.3 Mesh Topology

Mesh topology allows multiple routing paths between any two devices:

Zigbee mesh topology with multiple redundant routing paths between devices providing self-healing capability, maximum range through multi-hop routing, and fault tolerance when individual routers fail
Figure 18.3: Mesh topology with multiple redundant routing paths

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

18.4 Device Roles

Zigbee defines three device roles, each with specific capabilities and power profiles:

18.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.

18.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

18.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

18.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

18.5 Quick Check: Device Roles

A smart plug that is always connected to a wall outlet and needs to relay Zigbee messages to nearby sensors would be configured as which device role?

  1. Coordinator, because it manages the network
  2. Router, because it is mains-powered and can relay messages continuously
  3. End Device, because it only sends its own data
  4. Any role, because the power source does not affect the device role

B) Router. A mains-powered smart plug is an ideal Router because it is always on and can continuously relay messages for nearby End Devices. The Coordinator role is reserved for the single network-forming hub. End Devices sleep to save battery, which a wall-powered plug does not need to do. Power source is the primary factor: mains-powered devices should be Routers, battery-powered devices should be End Devices.

18.6 Designing Network Topology

18.6.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

18.6.2 Worked Example: Warehouse Zigbee Network Design

A 5,000 m2 single-story warehouse needs temperature monitoring with 40 battery-powered sensors (End Devices) reporting every 5 minutes.

Step 1 – Router count:

  • Indoor range through metal shelving: 8-10 m (conservative)
  • Coverage per router: pi x 82 = ~200 m2
  • Minimum routers: 5,000 / 200 = 25 routers
  • Redundancy factor (warehouse, 2.5x): 25 x 2.5 = 63 routers
  • Practical approach: place a router every 2 shelving rows (~6 m spacing)

Step 2 – End Device battery life:

A CR2450 coin cell (620 mAh) with 5-minute reporting:

State Duration Current Charge per cycle
Deep sleep 299.95 s 3 uA 899.85 uAs
Wake + poll parent 15 ms 8 mA 120 uAs
TX sensor data (127 B) 4.3 ms 17 mA 73.1 uAs
RX ACK 1 ms 14 mA 14 uAs
Total per 5-min cycle 1,107 uAs
  • Average current: 1,107 / 300 = 3.69 uA
  • Battery life: 620,000 uAh / 3.69 uA = 168,022 hours = 19.2 years (theoretical)
  • Real-world (battery self-discharge, temperature): 5-8 years

How long does a Zigbee End Device battery really last? Let’s calculate for a warehouse temperature sensor on a CR2450 coin cell.

Battery capacity: CR2450 = 620 mAh at 3V $ E_{} = 620 = 1{,}860 $

Energy per 5-minute cycle (deep sleep 299.95s, wake 15ms, TX 4.3ms, RX ACK 1ms): $ E_{} = (3 ) + (8 ) + (17 ) + (14 ) $ $ E_{} = 0.90 + 0.12 + 0.073 + 0.014 = 1.11 = 0.00031 $

Battery life: \(\frac{620 \text{ mAh}}{0.00031 \text{ mAh/cycle}} \times 5 \text{ min} = 10{,}000{,}000 \text{ min} \approx 19.2 \text{ years}\)

Reality check: Battery self-discharge (~1-2%/year) and temperature effects reduce this to 5-8 years in practice.

Step 3 – Latency analysis:

  • Maximum hops (corner to coordinator): 5,000 m / 80 m diagonal = ~6 hops (with zig-zag routing)
  • Per-hop latency: 4 ms (MAC ACK + processing)
  • AODV route discovery (first message): ~100-200 ms (RREQ/RREP flood)
  • Subsequent messages (cached route): 6 x 4 = 24 ms

Step 4 – Channel selection:

  • Warehouse has Wi-Fi APs on channels 1, 6, 11 (2.4 GHz)
  • Best Zigbee channels: 15, 20, 25, 26 (minimal Wi-Fi overlap)
  • Channel 26 is often recommended but has lower TX power on some chips
  • Recommendation: Channel 25 (above Wi-Fi ch 11, full TX power)

18.6.3 Interactive: Router Density Calculator

Use this tool to estimate how many Zigbee routers your deployment needs based on floor area and environment type.

18.6.4 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

18.6.5 Topology Selection Guide

Decision tree for selecting Zigbee network topology based on deployment requirements including coverage area, device count, reliability needs, and latency constraints, guiding selection between star, tree, and mesh topologies
Figure 18.4: Decision tree for selecting Zigbee network topology

18.7 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

18.8 Common Mistakes

18.8.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.

18.8.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

Max the Microcontroller is the Coordinator: “I’m the team captain! I start the network and make sure everyone has an address.”

Lila the LED is a Router: “I’m plugged into the wall, so I’m always awake. I can relay messages for other devices. Think of me as a hallway monitor passing notes between classrooms!”

Sammy the Sensor is an End Device: “I run on batteries, so I sleep most of the time. When I wake up, I talk to my parent Router and go back to sleep. Like a student who raises their hand, answers the question, and goes back to working quietly.”

Bella the Battery explains topologies: “In a star, everyone talks directly to Max. In a tree, messages go parent-to-child like a family tree. In a mesh, any Router can talk to any other Router – like everyone in school being friends with everyone. Mesh is strongest because if one friend is absent, you can always find another path!”

Key ideas for kids:

  • Coordinator = The team captain who starts the network
  • Router = Plugged-in devices that relay messages (like hallway monitors)
  • End Device = Battery devices that sleep to save power
  • Mesh = Everyone connected to everyone – the most reliable topology

18.9 Knowledge Check

Q1: Why must Zigbee Routers be mains-powered (plugged in) rather than battery-powered?

  1. Routers need more processing power than batteries can provide
  2. Routers must always be awake to relay messages, which would drain batteries quickly
  3. Battery-powered devices cannot transmit at the required power level
  4. It is a regulatory requirement in all countries

B) Routers must always be awake to relay messages, which would drain batteries quickly – Routers act as relay points in the mesh, so they must be ready to forward messages at any time. If a Router slept to save battery, messages would be lost and the mesh would have gaps. End Devices can sleep because their parent Router holds their messages until they wake up and poll.

18.10 Scaling Case Study: IKEA TRADFRI Mesh Evolution

IKEA’s TRADFRI smart lighting system provides a revealing case study of how Zigbee topology decisions change as deployments scale. IKEA initially launched with a simple star topology around their TRADFRI Gateway (Coordinator), but as customers added more devices, the topology evolved and exposed design trade-offs.

Phase 1: Small apartment (5–15 devices, 2017 launch)

IKEA shipped the TRADFRI Gateway with star topology as default. All bulbs and remotes communicated directly with the gateway. This worked reliably because:

  • Average Swedish apartment size: 60–70 m2
  • 2.4 GHz Zigbee range indoors: 10–15 m through 1–2 walls
  • All devices within single-hop range of the gateway

Customer satisfaction in this phase was high (4.2/5 on IKEA.com reviews).

Phase 2: Larger homes (15–40 devices, 2019–2020)

As IKEA expanded the product line (blinds, outlets, sensors), customers in larger homes (120+ m2) began reporting connectivity issues. The root cause: devices in far rooms were outside the gateway’s single-hop range.

IKEA’s solution was to enable mesh routing on mains-powered devices (bulbs and smart plugs). The TRADFRI firmware update in late 2019 promoted all mains-powered devices to Zigbee Routers, automatically forming a mesh topology.

Metric Star only (pre-2019) Mesh enabled (post-2019)
Max reliable range 15 m from gateway 45+ m (3 hops through bulbs)
Max practical devices 15–20 50+
Latency (far room) N/A (out of range) 120–180 ms (3 hops)
Latency (same room) 30–50 ms 30–50 ms

Phase 3: Dense mesh problems (40+ devices, 2021–present)

With mesh enabled, new problems emerged in densely-equipped homes:

  1. Routing table overflow: The TRADFRI Gateway’s NXP JN5168 chip has 32 KB RAM, limiting the routing table to ~40 entries. Homes with 50+ devices experienced random disconnections as the routing table overflowed and discarded routes.

  2. Bulb-as-Router fragility: When users turned off a light switch (cutting power to the bulb), the Router disappeared from the mesh, orphaning any End Devices using it as a parent. IKEA partially addressed this by recommending that users keep power switches on and use Zigbee remotes for control – a counterintuitive user experience for smart lighting.

  3. Channel 11 congestion: TRADFRI Gateway defaults to Zigbee channel 11 (2.405 GHz), which overlaps with Wi-Fi channel 1. In apartment buildings with many Wi-Fi networks, this caused 5–15% packet loss. IKEA did not provide a user-facing channel selection option until the DIRIGERA hub (2022).

The DIRIGERA redesign (2022):

IKEA’s replacement hub, DIRIGERA, addressed these scaling limitations:

  • Silicon Labs EFR32MG21 with 256 KB RAM (8x more than JN5168) – supports 128+ device routing table
  • Matter/Thread support in addition to Zigbee – provides migration path
  • Automatic channel scanning at setup – avoids Wi-Fi overlap
  • Dedicated smart plug routers – IKEA now recommends placing at least one smart plug per room as a stable, always-powered Router, rather than relying on bulbs

Design lesson: Star topology is correct for initial product launch (simplest, most reliable for small scale). But the transition to mesh must be designed from the start – hardware RAM, routing table capacity, and the “Routers must stay powered” requirement must be communicated to end users. IKEA’s experience shows that mesh topology is not a drop-in upgrade; it changes the user experience and requires purpose-built Router devices.

Common Pitfalls

Zigbee networks with few or no routers are effectively star networks — all devices depend on the coordinator for routing. Always deploy routers (always-on devices) to enable mesh routing benefits.

Zigbee mesh formation is automatic but not always optimal. After deployment, verify actual routing paths using coordinator diagnostics to ensure no unexpected bottlenecks or long hop-count paths.

Tree routing creates predictable latency proportional to depth; mesh routing can create variable latency as routes adapt. Applications with strict latency requirements need topology analysis, not just coverage analysis.

18.11 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

18.12 Knowledge Check

::

::

Key Concepts

  • Star Topology: All Zigbee devices communicate directly with the coordinator; simple but limited in range and creates coordinator bottleneck.
  • Mesh Topology: Routers create multi-path connectivity allowing data to travel through multiple paths; self-healing and scalable, the most common Zigbee deployment topology.
  • Tree Topology: Hierarchical structure with coordinator at root, routers as branches, and end devices as leaves; deterministic routing but vulnerable to router failures.
  • Full Function Device (FFD): A Zigbee device capable of acting as coordinator or router: always-on radio, participates in mesh routing, can relay messages.
  • Reduced Function Device (RFD): A Zigbee device that can only communicate with its parent FFD; cannot relay messages, typically battery-powered end devices.
  • Network Redundancy: Having multiple routing paths between any two devices; mesh topologies achieve this naturally while star and tree topologies require careful planning.

18.13 Concept Relationships

Concept Related To How They Connect
Star Topology Network Formation Simplest to deploy, all devices connect directly to Coordinator
Mesh Topology Self-Healing Multiple paths enable automatic rerouting when devices fail
Router Role Mesh Density More routers = stronger mesh with better redundancy
End Device Role Battery Life Sleeping capability enables 5-10 year battery operation
Coverage Calculation Router Placement Coverage area determines minimum router count needed
Hop Count Latency Each hop adds 10-30ms, affecting real-time control responsiveness

18.14 What’s Next

Chapter Why It Matters
Zigbee Routing and Self-Healing Learn how AODV route discovery and mesh self-healing keep messages flowing when devices fail
Zigbee Network Formation Understand the joining process that adds Routers and End Devices to a live network
Zigbee Protocol Stack See how the NWK, APS, and ZCL layers support the topologies covered here
Zigbee Deployment Planning Apply topology and role decisions to real-world router placement strategies
Network Topologies Fundamentals Revisit general star, tree, and mesh concepts across all IoT protocols