If you’re familiar with ZigBee, you’ve no doubt seen a picture of the stack with IEEE 802.15.4 at the bottom, ZigBee in the middle, and applications and profiles sitting on top. This article looks at the top bit of the stack, and at how ZigBee profiles make it easier for you to create your own interoperable applications.
ZigBee is an open standard, which is ideal for applications that require long battery life, low cost, small footprint, and mesh networking to support communication between large numbers of devices in an interoperable and multi-application environment.
One of the ways interoperability is achieved is through application profiles. These profiles are defined by the ZigBee Alliance, and provide a description of the devices supported for a specific application together with the messaging scheme used by those devices for communication–in effect, defining the type, shape and features of the network.
Adherence to these profiles guarantees the interoperability of different vendors for the same application space.
Each application profile addresses the needs of a specific application market. Profiles are currently available or in development for the following types of applications:
- Smart Energy
- Home Automation
- Telecom Applications
- Commercial Building Automation
- Personal Home and Hospital Care
Endpoints and clusters
Devices are defined by profiles and implemented as application objects. Each application object is connected to the rest of the ZigBee stack by an endpoint, which is an addressable component within a device.
For example, a remote control might allocate endpoint 6 for the control of lights in the master bedroom, endpoint 8 to manage the heating and air-conditioning system, and endpoint 12 for controlling the security system. This allows the remote control to independently communicate with these devices and identify which packets are intended for each application and device.
Communication is made from endpoint to endpoint through data structures called clusters. Clusters contain a set of attributes that represent device state together with commands that enable communication between application objects. Each cluster is identified with a unique ID.
Clusters used in a specific application are defined within its profile. For example, the Home Automation profile contains a cluster dedicated to the control of lighting subsystems.
Each cluster has two ends:
- The client/output requests and manipulates the data.
- The server/input has the source data.
The ZigBee Cluster Library (ZCL)
All ZigBee application profiles are defined using clusters from the ZigBee Cluster Library.
This library allows common clusters to be reused across a number of different functional domains, for example, the same lighting clusters can be used for any application that requires lighting control, such as home automation and commercial building automation.
Clusters within the ZCL are organized into a number of different functional domains, including Lighting, HVAC (Heating, Ventilation, Air Conditioning), Measurement and Sensing, Security and Safety, and General.
Each cluster specification within the ZigBee Cluster Library defines
- mandatory and optional attributes
- cluster-specific commands
- functional description
Each device specification within an application profile defines
- mandatory and optional cluster usage
- values of free parameters in the ZCL
- any additional functional description
At a high level, binding is the process of establishing a relationship between two devices that can communicate in a meaningful way, for example, which switch controls which lights. Each binding supports a specific application profile, and each message type is represented by a cluster within that profile.
Bindings can be created between either individual or groups of endpoints, such as lights and switches, that have matching input and output clusters (with the same cluster ID). ZigBee devices can have up to 240 endpoints, so each physical device can support multiple bindings.
By providing the ZigBee Cluster Library and application profiles, the ZigBee Alliance has already done a lot of the hard work for you.
If you need your device to perform a specific function or behave a specific way, there is no need to create things from scratch. You can simply implement the ZigBee cluster that already exists for that purpose.
Adherence to the application profiles and the ZCL also helps to achieve ZigBee certification to ensure interoperability with other ZigBee devices.