Zigbee 101: A Beginner's Guide

image

Smart home: automation, protocols, devices, ecosystems and open source software. So many questions and so few answers. Let's open the veil of secrets of one of the most popular IOT protocols - Zigbee.



What is Zigbee?



Zigbee is a technology based on the IEEE 802.15.4 radio standard and is designed to standardize low-power M2M devices from different manufacturers. Among the features of the network, one can single out high fault tolerance, long service life of end devices from one battery, support for a large number of connections and the joint operation of devices from different manufacturers.



Among the features of the network architecture: support for mesh topology, the obligatory presence of a coordinator and, optional, a router. More about network architecture here .



ZigBee provides for the transmission of information within a radius of 5 to 75 (in open areas up to 200) meters with a maximum speed of 250 kbps. Supports operation in 27 channels of three frequency ranges:

2.4 GHz (16 channels)

915 MHz (10 channels)

868 MHz (1 channel)



Fun fact:

According to one version, the name ZigBee comes from the zigzag dance of bees, with which they show their neighbors the way to the next food source, in the same way as and the standard data packets must find their way into the mesh network.



What's new in Zigbee 3.0



Direct binding , or direct connection, allows end devices from different manufacturers to work directly without the involvement of a coordinator and router. This allows you to flexibly configure the scenarios of device behavior and increase the response speed.



Green Power is a set of technologies that minimize the use of battery resources by a device, and can also collect it from kinetic, light, and thermal energy. Sounds a little incomprehensible; in other words, the switch will be able to transmit a message due to the fact that you touch it. More details here

Unification . There used to be many so-called profiles. For example, Home Automation, Building Automation, Health. Zigbee 3.0 is a unified application profile.

Backward compatible with all products released prior to v3.0



Why is this needed?



In short - for measurement of indications and automation. There are many applications for this automation. And although there has been a trend towards unification lately, the technology supports various profiles, which are divided by scope. Here is some of them.



Home Automation - Home device control and scripting.

Remote Control - control of remote control devices.

Smart Energy - control and automation of energy delivery and use.

Green Power - support for power generation devices.

Light Link - lighting control.

Health Care - management of medical and near medical devices (bracelets for measuring indications, “sos” buttons).



Are there many Zigbee devices?



Approximately 2600 devices ( list of certified devices ). It is worth clarifying that in most cases each manufacturer has its own applications for connecting only their devices, but using third-party software, they can be made friends. More on this below.



The average price of one end device varies around $ 10.

Here is an example of end devices from several popular manufacturers:

Xiaomi Aqara - about 50 devices for various purposes.

Philips Hue - about 100 devices (most luminaires),

Ikea trådfri - about 40 devices (most luminaires),

Tuya - about 30 devices,

SONOFF - about 10 inexpensive relays.



Zigbee USB devices (sticks)



What are Zigbee sticks for?



If you use a third-party solution, it is convenient to use the stick as a network coordinator, connecting it to a computer as a router in order to reach places remote from the coordinator.



Here's an example of a few popular devices: the



cc2530 / 2531 is a cheap and popular stick. Not a bad choice for beginners. Of the minuses: a small coverage radius (10-15 m without an antenna) and restrictions on the number of connected devices.



cc2538 stick developed by modkam.ru project enthusiasts. Compared to 2531, it has a long range and has no restrictions on the number of connections (tests showed more than 200 devices).



deCONZ ConbeeThe stick also supports a wide variety of smart home systems. Of the minuses of native firmware - sometimes end devices fall off.



Also examples of less popular ones:



nRF52840 Dongle - a universal stick with Bluetooth 5, Bluetooth mesh, Thread, ZigBee, 802.15.4 and ANT support and a convenient development environment.



Zigbee gateways







Xiaomi / Aquara ready-made solutions are the three most popular devices - Xiaomi Gateway 2 and 3 versions and Aqara Hub. Gateway 2 is not homekit compatible and has Zigbee version 2. The third version has Zigbee 3.0 and Bluetooth Mesh 5.0 on board. A short video will help you to understand additional differences .



image



Less popular zigbee hubs just list

Orvibo

livolo

Wemo

Vera

Fibaro



Zigbee + Zvawe

Athom Homey

Wink hub 2

SmartThings Hub

VeraPlus



DIY, or DIY

SLS gateway- A device based on CC2538 + CC2592 and ESP32-Wrover-B. Supports Zigbee 3.0 and unlike Xiaomi, it is not limited to one ecosystem. And unlike the CC2531, CC2538 and Deconz sticks, it is a ready-made device and can work both independently and in the Home Assistant home automation system. Currently 113 devices are supported . Video review



ZESP32 is a firmware for the Xiaomi Gateway. Just like SLS, it is designed to connect Zigbee devices from different manufacturers. The basic concept is to make it easy to add a new device to the network using editable templates.



cc25 + computerA convenient option if you already have a raspberry pi, or an old PC that will act as a server. In this case, you can choose any convenient home automation system, which are described below.



What about ecosystems?



Apple home is a software solution from Apple. The number of supported devices is small, but the functionality can be expanded using homebridge and aqara hub. You can use Apple home on your home network using only an Iphone and a hub (Zigbee), but for remote control you need a home center, which can be an iPad (iOS 10 or higher), HomePod, or Apple TV.



Google home also does not work with Zigbee devices directly, but is compatible with Alexa.



Amazon assistants Echo Show, Spot and Plus can work directly because they have a built-in zigbee coordinator. Nevertheless, the problem is the limited number of compatible devices and the unpopularity of the solution in the CIS countries.



Xiaomi / Aqara- gateways from Xiaomi and Aqara only support their zigbee devices. Unlike Xiaomi Gateway, Aqara Hub does not provide the ability to integrate with alternative home automation systems.



Samsung SmartThings is positioned as a universal hub. Works with a wide variety of Z-Wave and Zigbee devices. Users often complain about the fall of the cloud (no connection to the server) and the lack of interest in the development of the project from the developers.



Yandex house... Dialogues Yandex Station and for the phone are different things. There are fewer dialogues for the column, they are primitive. Support for ZigBee and Bluetooth devices is declared, but does not work with them directly. Many scenarios depend on the availability of an Internet connection, but the solution may be to connect third-party smart home controllers, for example, using yandex2mqtt.



What about software support?



image



For convenience, I will divide the software solutions into categories.



Home automation



Homebridge NodeJS server, for integrating devices without HomeKit support.

HomeAssistant is an open source system with an emphasis on privacy.

OpenHAB opensource project with an emphasis on the convenience of configuring

MajorDoMo an open source integration system.



Dashboard



RoboDomo framework based on MQTT with an attractive graphical interface.

node-red-dashboard node-red module for creating dashboard, integrates into Zigbee2mqtt



Integration



it is a bridge program that allows devices from different vendors to be used together by translating zigbee commands to mqtt.

MQTT Explorer user-friendly mqtt client



Development



IAR Embedded Workbench environment with a friendly interface and support for a large number of microcontrollers

Simplicity Studio IDE and a set of tools for developing applications based on Silicon Labs

SimpleLink SDK development environment for Texas Instruments development chips, including API, TI-RTOS, and more ...

Red-node block programming tool for connecting hardware devices, APIs and online services.



Testing and audit



KillerBee is a tool for testing Zigbee networks.

SecBee - Testing ZigBee implementations for security issues.

Z3sec is the main goal of the framework for testing certified devices that implement the ZigBee Light Link (ZLL), or the ZigBee 3.0 standard.

pwnrf is a security testing tool for Wi-Fi, Bluetooth and Zigbee networks.



Should I choose Wi-Fi, Bluetooth, ZigBee or Z-Wave?



image



There are dozens of IOT technologies on the market, but the most popular solutions are Wi-Fi, Bluetooth, ZigBee and Z-Wave.



WiFi is a very popular technology, it is convenient and ideal for voice assistants, video surveillance systems, TVs, or if you have a small number of smart devices. But WiFi is very energy intensive, and if there are dozens or hundreds of smart devices, it is problematic to charge them all the time. In addition, a WiFi router is not designed for a large number of connections. Of course, there are solutions for such a case, but then the cost of deploying a network will increase significantly. WiFi has a single point of failure - a router.



Bluetooth LE(Low Energy) is an equally popular technology with low energy consumption, which allows for more than a year not to change the battery and a high transfer rate of 1-2 Mbps. Has a beacon function (customizable behavior of devices when approaching) and works with devices directly. Of the minuses, work in the 2.4 GHz band, and a small range indoors with other devices. Also, most BLE devices work on a point-to-point basis, which is poorly suited for creating advanced automation scenarios. But the solution to this problem can be considered the Bluetooth mesh specification.



ZigBeeopen standard with low power consumption of end devices (1-2 years), support for a mesh topology, high noise immunity, good scalability (in theory up to 65,000 nodes) and high market penetration. Of the minuses: Zigbee operates in the busy 2.4 GHz band, which, with strong interference, can lead to a decrease in noise immunity, and a decrease in the range. Each manufacturer creates a separate application to support only their products. But as for me, the biggest disadvantage is that devices from different manufacturers cannot “communicate” with each other “out of the box.” They can be combined using third-party software, but the lack of common solutions leads to a relatively high threshold of entry. The Alliance is aware of these problems and working on DotDot to fixand Connected Home over IP .



Z-Wave is a proven proprietary standard. It has a high level of device compatibility, low power consumption, support for mesh topology, has a stable signal in the 800-900 MHz range, which allows better avoidance of obstacles (the longer the wavelength (lower frequency), the better it overcomes obstacles). Supports up to 232 devices on a single network and speeds up to 100 kbps. Among the shortcomings, it is worth pointing out that in different countries different frequencies are allocated for short-range devices. And devices designed for one country may not be compatible for another. Also, Z-Wave is somewhat more expensive than ZigBee devices.



Where to start if you are a beginner?



If you are trying to choose what to build your smart home on, start with this entertaining scheme. Also, for me personally, the article House Fool 2.0 was inspiring.

If you have difficulties in setting up your smart home, you can ask for advice in the SmartHome group .

If you want to buy an SLS gateway and other Zigbee devices for you in Zigberu

Discussion of devices, firmware and other software that works with Zigbee - Around and around Zigbee and

Zigbee



Instead of a conclusion



It's hard to say who will win the smart home protocol war. Zigbee is not without its drawbacks, it has strong competitors, but at the same time its strength is its large interested community (Zigbee Alliance, enthusiasts and geeks). Both eminent brands and young companies show interest in Zigbee.



It should be noted that there is no one-size-fits-all solution. Choose what is right for you, in your case. Although WiFi and Bluetooth are cumbersome, there are times when their use is justified.



All Articles