ZigBee Binding

The ZigBee binding supports an interface to a wireless ZigBee home automation network and allows ZigBee devices from numerous manufacturers to be used without a system specific gateway.

Supported Things

Coordinators

A ZigBee Coordinator is the network controller, and is therefore the heart of the ZigBee network. It also acts as the trust centre to control security access to the network.

Coordinators need to be installed manually and the serial port must be set.

TI2531 Coordinator

This is the Texas Instruments ZNP stack. The thing type is coordinator_ti2351.

TI2531 - Firmware

The TI2531 USB dongle must be flashed with the correct firmware in order to work with this binding. The file can be downloaded from TI website archives (http://www.ti.com/tool/z-stack-archive) as part of the Z-STACK-HOME v.1.2.2a package. The file name is CC2531ZNP-Pro-Secure_Standard.hex and its sha256 is 3cc5dc571ef0f49e3f42c6c2ca076d6f8fef33a945c71e6f951b839ba0599d3c.

Flashing on Linux

It's possible to flash the dongle using Linux, using cc-tool (https://github.com/dashesy/cc-tool.git). The software has been tested and confirmed working on Ubuntu 16.10 and 17.04. The required dependencies can be installed with sudo apt install build-essential libusb-1.0-0-dev libboost-all-dev, and the binary compiled with ./configure && make. Do not forget to install the udev rules, as described at https://github.com/dashesy/cc-tool/blob/master/README , or the software might not be able to access the USB programmer.

The firmware can be flashed with ./cc-tool -e -w CC2531ZNP-Pro-Secure_Standard.hex -v r. Change the path to the firmware accordingly.

Ember EZSP NCP Coordinator

The Ember EZSP NCP (Network Co-Processor) supports the Silabs EM358 or MightyGecko dongles with the standard NCP firmware. The thing type is coordinator_ember.

Telegesis ETRX3

The thing type is coordinator_telegesis.

Devices

The following devices have been tested with the binding

DeviceDescription
Busch-Jaeger 6711 URelay Insert
Busch-Jaeger 6715 ULED-Dimmer Insert
Busch-Jaeger 6735Control Element (1-channel)
Busch-Jaeger 6735/01Control Element (1-channel, battery-operated)
Busch-Jaeger 6736Control Element (2-channel)
GE Bulbs
Hue BulbsColor LED Bulb
Hue Motion SensorMotion and Luminance sensor
Innr Bulbsnote1
Osram Bulbs
SmartThings PlugMetered Plug
SmartThings Motion SensorCentraLite 3325-S Motion and Temperature sensor
SmartThings Contact SensorContact and Temperature sensor
Tradfri Bulbs
Tradfri Motion Sensor
Trust Bulbsnote1
Ubisys modulesD1 Dimmer, S1/S2 Switch modules

Note 1: Some bulbs may not work with the Telegesis dongle.

Discovery

Once the binding is installed, and an adapter is added, it automatically reads all devices that are set up on the ZigBee controller and puts them in the Inbox. When the binding is put into discovery mode via the user interface, the network will have join enabled for 60 seconds.

The binding will store the list of devices that have joined the network locally between restarts to allow them to be found again later. A ZigBee coordinator does not store a list of known devices, so rediscovery of devices following a restart may not be seemless if the dongle is moved to another system.

When a ZigBee device restarts (eg a bulb is powered on), it will send an announcement to advise the coordinator that it is on the network and this will allow the binding to rediscover devices that have become lost. Battery devices often have a button that may also perform this function.

Leave

When a thing is deleted, the binding will attempt to remove the device from the network by sending the leave command on the network.

Thing Configuration

The binding will attempt to automatically detect new devices, giving them a type based on the information they report, and will read their supported clusters to define the supported channels.

Thing Types

Currently all ZigBee things have the same thing type of zigbee_device.

Channel Types

A set of channels will be created depending on what clusters and endpoints a device supports. Channels are loosely linked to clusters in that for the majority of channels, a single cluster is used. However, some channels may utilise more than one cluster to provide the required functionality.

The following channels are supported -:

Channel UIDZigBee ClusterTypeDescription
switch_dimmerLEVEL_CONTROL (0x0008)Dimmer
switch_onoffON_OFF (0x0006)Switch
color_colorCOLOR_CONTROL (0x0300)Color
color_temperatureCOLOR_CONTROL (0x0300)Dimmer
electrical_activepowerELECTRICAL_MEASUREMENT (0x0B04)Number
ias_contactportal1IAS_ZONE (0x0500)Switch
ias_motionintrusionIAS_ZONE (0x0500)Switch
ias_motionpresenceIAS_ZONE (0x0500)Switch
ias_standard_systemIAS_ZONE (0x0500)Switch
measurement_illuminanceILLUMINANCE_MEASUREMENT (0x0400)Number
measurement_temperatureTEMPERATURE_MEASUREMENT (0x0402)Number
sensor_occupancyOCCUPANCY_SENSING (0x0406)Switch

Updates

The binding will attempt to configure a connection with the device to receive automatic and instantaneous reports when the device status changes. Should this configuration fail, the binding will resort to using a fast polling (note that "fast" is approximately 30 seconds at this time).

When things don't appear to be working

When things don't appear to be working as expected you should check the logs to try and find what is happening. Debug logging can be enabled with the following Karaf commands -:

log:set debug org.openhab.binding.zigbee
log:set debug com.zsmartsystems.zigbee

This will log data into the standard openhab.log file.

Note that logs can only show what is happening at a high level - it can't show all data exchanges between the device and the coordinator - just what the coordinator sends to the binding. For this reason it can be difficult to debug issues where devices are not joining the network.