Z-Wave – Basics of wireless technology for the smart home
House Radio
Z-Wave connects components in the smart home and ensures that remote commands from the control station take effect on real household appliances. We look at how it works, its range, the security of the protocol, and some basics that every Z-Waver should know.
The door lock opens when the owner's mobile phone approaches the entrance. The light in the apartment switches on when the motion detector senses a being walking around and the light sensor determines that it is night. The garage door closes automatically when the car drives in, and a controller detects that the absent-minded driver once again forgot to press the close button on the garage gate before leaving through the back door, so the gate now closes itself.
These automatic actions are no longer a smart home fiction; they are available right now. However, before pressing the "Buy" button, house owners have to decide which method to use when sensors are picking up signals and report them to the controller, which then in turn initiates actions to control real physical household devices.
Simply Wireless
Not everyone is likely to build their own new home so they are able to route cables in the walls for all kinds of playful extravagances; wireless solutions work around these limitations for the common man. In the 1990s, hobbyists who had a knack for tinkering, mainly in the United States, began to switch lamps or even household appliances on and off with a technology called X10. Signals were transmitted either via power lines or wireless RF technology. But X10 did not offer reliable communication; it was often impossible to say with certainty whether a device had actually received a transmitted signal.
In the United States, where imperfection and unreliability are more easily accepted, the product fared quite well, but in Europe, it never caught quite on. Along with other wireless alternatives (e.g., ZigBee [1], EnOcean [2], and good old WiFi), the Z-Wave Protocol was launched in the 1990s [3] by a Danish company named Zensys. In 2008, chip maker Sigma Designs [4] acquired the rights to Z-Wave.
The industrial consortium Z-Wave Alliance, to which some 300 corporations with approximately 1,000 certified products belong today, guides the development and the certification of new products. Hobbyists can build small solutions for little money that they then can extend piece by piece to a professionally automated smart home with dozens of components.
Acknowledgement Needed
On a wireless Z-Wave network, the brains of the system are called controllers. They send commands to actuators, called slaves, which then initiate actions. As an example, a laptop with a USB stick like the one shown in Figure 1 acts as a controller and uses a wireless radio connection to control the mains switch in Figure 2, the slave, which turns electrical consumers such as a lamp or another computer on and off.
To set up new gadgets on the network, you will usually find a button to press on the device, for example at the side on the mains switch in Figure 2. This causes the device to advertise its presence on the network and any listening controllers, such as the USB stick in Figure 1, whom the user also switches to a special integration mode. The controller then picks up the beacon from the new gadget and teaches it its new name on the network, making sure that it knows which wireless commands it needs to pick off the air and respond to going forward.
The process is similar for deregistering a device from the network; the user typically has to confirm on the unit itself, usually by pushing a button, that the device is now leaving the collective.
Once integrated, the controller and slave rely on a handshake protocol in which the slave confirms the receipt of commands sent by the controller. When the slave's ACK reaches the controller, as shown in the top part of Figure 3, the controller knows that the slave has received and validated the packet with the command. It says nothing about whether the slave was able to execute the command or whether the desired effect has occurred. A subsequent status request sent by the controller to the slave can obtain clarity on the matter.
Until recently it was only possible to learn the details of the protocol by purchasing an expensive SDK from Sigma Designs, but the company finally released the Z-Wave specification online in September 2016 [3]. The Z-Wave Consortium still insists on the certification of new equipment, so nobody can simply dump new Z-Wave devices on the market. To certify a new gadget, you need to register as a commercial development partner. However, the specification allows hobbyists to write their own control software, for example for the controller in Figure 1.
Fault Tolerance
In the case of an unreliable wireless connection, it can happen that, as shown in the middle part of Figure 3, the command from the controller does not even reach the slave, or that the slave receives the command and sends an ACK, but it does not make its way back to the controller (bottom of Figure 3). In both cases, the controller simply assumes that the command failed and repeats the procedure up to two times. If the third attempt also fails, the controller reports an error and assumes that the connection to the slave is down.
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Red Hat Enterprise Linux 9.5 Released
Notify your friends, loved ones, and colleagues that the latest version of RHEL is available with plenty of enhancements.
-
Linux Sees Massive Performance Increase from a Single Line of Code
With one line of code, Intel was able to increase the performance of the Linux kernel by 4,000 percent.
-
Fedora KDE Approved as an Official Spin
If you prefer the Plasma desktop environment and the Fedora distribution, you're in luck because there's now an official spin that is listed on the same level as the Fedora Workstation edition.
-
New Steam Client Ups the Ante for Linux
The latest release from Steam has some pretty cool tricks up its sleeve.
-
Gnome OS Transitioning Toward a General-Purpose Distro
If you're looking for the perfectly vanilla take on the Gnome desktop, Gnome OS might be for you.
-
Fedora 41 Released with New Features
If you're a Fedora fan or just looking for a Linux distribution to help you migrate from Windows, Fedora 41 might be just the ticket.
-
AlmaLinux OS Kitten 10 Gives Power Users a Sneak Preview
If you're looking to kick the tires of AlmaLinux's upstream version, the developers have a purrfect solution.
-
Gnome 47.1 Released with a Few Fixes
The latest release of the Gnome desktop is all about fixing a few nagging issues and not about bringing new features into the mix.
-
System76 Unveils an Ampere-Powered Thelio Desktop
If you're looking for a new desktop system for developing autonomous driving and software-defined vehicle solutions. System76 has you covered.
-
VirtualBox 7.1.4 Includes Initial Support for Linux kernel 6.12
The latest version of VirtualBox has arrived and it not only adds initial support for kernel 6.12 but another feature that will make using the virtual machine tool much easier.