ZigBee Alliance Standards
Introduction
A good reference about ZigBee is Silicon Labs’s 2015 youtube playlist
- ZigBee Concepts 1: Architecture Basics
- ZigBee Concepts 2: MAC and PHY Concepts for ZigBee Networks
- ZigBee Concepts 3: Node Types, PAN IDs, and Addresses
- ZigBee Concepts 4: Network Activities
- ZigBee Concepts 5: Application Profiles, Clusters, and Endpoints
- ZigBee Concepts 6: Overview of Popular ZigBee Application Profiles (ZHA, ZSE, ZLL)
IEEE 802.15.4
- designed for low power, low data rate, lot cost network
- PAN (Personal Area Network)
- raw bit rate with 2.4GHz DSS PHY = 250 kbps
- channel access vis CSMA-CA
- Collision avoidance using CCA, random backoffs
- link layer ack (MAC ACK) on unicast transmissions
- frequency
- 16 channels in 2.4GHz ISM band (2MHz each, numbered from 11 to 26)
- 10 channels in 915MHz ISM band
- 1 channel in the European 868MHz band
- packet size has 128 bytes maximum (including a 16 bit CRC)
- REF: [Youtube] ZigBee Concepts 2: MAC and PHY Concepts for ZigBee Networks
Node types
- ZigBee Coordinator (ZC)
- exactly 1 per network
- ZigBee router (ZR)
- always on (don’t sleep)
- ZigBee End Device (ZED)
- does not relay packets
- may be sleepy
- requires ZC/ZR for network participation
- REF: [Youtube] ZigBee Concepts 3: Node Types, PAN IDs, and Addresses
PAN ID
- 16-bit identifier shared by all nodes in PAN
- used in MAC header filter
- ZC picks values upon forming network
- stacks detects conflicts and updates network automatically
Extended PAN ID
- 64-bit extended PAN ID (EPID) know to all nodes in PAN
- unique per PAN
- chosen by ZC at time of network formation
- only sent over-the-air in response to Active Scan
- enables recognition of network after PAN ID change
- might not be totally random
Individual Node Address
---------------------------------------------------
| EUI-64 | Net Addr | Endpoint | Cluster ID |
|----------------|----------|----------|------------|
| 64-bits | 16-bit | 8-bit | 16-bit |
---------------------------------------------------
- EUI-64
- 64-bit unique address (IEEE “MAC Address”)
- never changes
- network address
- 16-bit (“node ID”)
- assigned to a device when it joins the network
- may change over time
- endpoint
- 8-bit logical address within a device (similar to TCP port)
- cluster ID
- 16-bit field used as an application specific message type
Application Profiles
- similar to a miniature protocol on top of ZigBee stack
- defines device types with different capabilities (clusters)
- 16-bit “device ID” enumerates device type withing the profile
- identified by 16-bit application profile ID
- assigned by ZigBee Alliance
- Examples
- Home Automation (HA)
- Commercial Building Automation (CBA)
- Smart Energy (SE)
- Manufacturer-Specific Profile (MSP)
Clusters
- each device definition in a profile contains clusters
- Cluster is a set of message types related to a certain device function
- enumerated by 16-bit Cluster ID
- ZigBee Cluster Library (ZCL)
- defines clusters for use in public profiles
- same cluster (and ID) can be used in multiple profiles
- defines “attributes” and “commands” for a given cluster
- group clusters into “functional domains” (e.g. Lighting, HVAC)
- uses “client” and “server” model of communication
- client sends messages to server
- server maintains attributes
- defines clusters for use in public profiles
- REF: [Youtube] ZigBee Concepts 5: Application Profiles, Clusters, and Endpoints
ZigBee Endpoints
- An endpoint is a service point within a ZigBee node (up to 255 per node)
- up to 255 endpoints per node
- endpoints 0, 240 to 255 are reserved for special functions
- endpoints 1 to 239 = available for user applications
- endpoint 0 = ZigBee Device Object (ZDO). used for network config / admin
- endpoint 255 = broadcast endpoint
- each endpoint implements a single device type from a single application profile
- different endpoints on a single node may represent devices from different application profiles
- each endpoint has a descriptor and a cluster list
- cluster list describes capabilities of device by enumerating supported inbound (client) and outbound (server) clusters
- Endpoint descriptor contains
- Application Profile ID
- Device ID (withing the specific profile)
- Number of supported inbound and outbound clusters
- Bitmask indicating version/capabilities
- REF: [Youtube] ZigBee Concepts 5: Application Profiles, Clusters, and Endpoints
Popular ZigBee Application Profiles
- ZHA
- ZLL
- ZSE
- REF: [Youtube] ZigBee Concepts 6: Overview of Popular ZigBee Application Profiles (ZHA, ZSE, ZLL)
ZigBee Home Automation (ZHA) Profile
- ZigBee Residential Security (NWK layer encryption - Network Wide Key)
- clusters used
- general (basic, on/off, groups, scenes, …)
- measurement / sensing (light, temp, pressure)
- lighting (color control)
- HVAC (thermostat, fans, pumps)
- closures (shade control)
- security / safety (alarm, zones, …)
- device types
- general
- range extender
- on/off switch
- level control switch
- mains outlet
- remote control
- lighting
- light
- switch
- dimmer
- occupancy and Light Sensor
- closures
- shade control
- HVAC
- heater/cooler
- thermostat
- temp / pressure / flow sensor
- pump controller
- Intruder alarm system (IAS)
- warning device
- controller/indicator zone
- general
ZigBee Light Link (ZLL) Profile
- Designed for consumer-grade lighting device, small networks
- uses similar cluster to ZHA
- groups
- scenes
- lighting control
- on/off
- No Coordinator
- Touch Linking
- Coexists easily with HA
ZigBee Smart Energy (SE) Profile
- Interface between AMI (Advanced Metering Infrastructure) and HANs (Home Area Network)
- Security is a key concern
- NWK layer encryption among all nodes
- APS layer encryption among pairs of device
- trust center facilitates key installation
- key establishment cluster to negotiate unique key via ECC
- anonymous messaging for AMI to HAN comms hub (pricing events, etc)
- fragmentation for larger messages
- prioritize channels that don’t overlap with WiFi
- Clusters used
- Key Establishment
- Price
- Demand response / Load Control (DRLC)
- Simple Metering
- Message (for updating displays)
- Tunneling
- Pre-payment
- Device Types
- Metering Device (gas, water, electric, …)
- In-Home Display (IHD)
- Programmable Communicating Thermostat (PCT)
- Load Control Device (e.g. remote disconnect)
- Smart Appliance
- Prepayment terminal
- Range extender