Setting up a smart home command center with Z-Wave

Connecting Worlds

Article from Issue 230/2020

The RaZberry daughter board for your Raspberry Pi unlocks the power of the Z-Wave home automation environment.

Several vendors compete in the field of home automation. The solutions differ in price and also in terms of openness and interoperability: Many smart home solutions only work within the limits set by the manufacturer, and the devices only collaborate with a controller from the same company.

The Z-Wave Alliance [1] takes a different approach: The underlying system's protocol is open, and many manufacturers now offer Z-Wave-compatible devices or services. In addition to Z-Wave founder Sigma Designs, several hundred companies now belong to the consortium [2]. Among them are numerous well-known IT names, such as D-Link, devolo, Logitech, and Zyxel; large electronics groups, such as Bosch, LG, and Panasonic; and many lesser well-known companies. Certification ensures compliance with compatibility standards.

Z-Wave for the Rasp Pi

One of the most attractive features for home users is the fact that a Raspberry Pi is all you need for a Z-Wave control center – all you have to do is teach your Rasp Pi the Z-Wave protocol. You can do this either with the UZB [3], a Z-Wave-ready USB stick suitable for Linux, Mac OS X, and Windows, or with the additional RaZberry board [4], which I will describe in this article.

The RaZberry is a small daughter board that fits over the Rasp Pi's GPIO pins. One advantage of the RaZberry board is that the board is so small that it usually fits into standard Rasp Pi packages without any components protruding. The USB ports also remain free for further expansion. In addition, the EUR50 RaZberry is half as expensive as the EUR100 UZB. One disadvantage of the RaZberry board is that it only works with a Raspberry Pi. The UZB, on the other hand, can connect to other single board computers (SBCs) and even conventional PCs.

Install the RaZberry on the first 10 pins of the Raspberry Pi GPIO. The board is powered directly via the GPIO pins. The board is a bit lower than the USB ports on the Rasp Pi, so the Rasp Pi and RaZberry can be mounted in any standard case. You will want to use a plastic case – metal cases screen off radio signals.

Z-Way on the Rasp Pi

Z-Wave opens many doors when it comes to hardware selection and also offers alternatives when it comes to software. As a counterpart to the open source software for home automation FHEM presented in this issue, the RaZberry manufacturer Z-Wave.Me offers its own Z-Way [5] software. To use Z-Way, you'll need a license, which the RaZberry module already includes. UZB is available with or without license. If necessary, you can always purchase the license later.

If you want to install Z-Way, you have to log in from a freshly installed Raspbian system based on a RPi2 or RPi3, either via SSH or locally, and execute the command shown in Listing 1. If you don't want to install manually, you can alternatively reinstall the memory card of the Rasp Pi with the image provided by Z-Wave.Me.

Listing 1



Before you install, keep in mind that the Raspberry Pi has to learn the correct time zone for its location via:

sudo raspi-config 5 Internationalisation Options | 2 Change Timezone

Otherwise, the system may react incorrectly to time-controlled actions later on, even though the web interface displays the correct time (Figure 1).

Figure 1: Users have to be careful to set Raspian to the correct time zone with the configuration tool. Otherwise, time-controlled actions will not work correctly.

In addition, you'll need to reconfigure the serial port of the Raspberry Pi. In the default setting, the serial port operates as a terminal port for operating the Rasp Pi directly. In this case, FHEM will use the serial port to control the RaZberry. You will need to open the Rasp Pi's configuration tool by typing sudo raspi-config and answer No to the question Would you like a login shell to be accessible over serial? below 9 Advanced Options | A8 Serial (Figure 2).

Figure 2: To enable FHEM to integrate the RaZberry module, you'll need to deactivate the terminal function of the serial interface.

Installing Z-Way

The command from Listing 1 loads an installation script from the Internet and immediately calls it with root privileges. After confirming the terms of use, the installer automatically imports any missing dependencies into the system and creates start-stop scripts so that the service starts together with the computer. Finally, the routine offers to register you with the Z-Wave.Me email distribution list.

The installation routine sets up the program and also updates it. To complete the installation, you need to run the script again with the same command. After setting up the software, you can access the interface in a browser via port 8083. If name resolution on the network works properly and only one active Rasp Pi is on the network, http://raspberrypi:8083 should also work.

If you work directly on the Rasp Pi system, you need to address localhost instead, i.e., In case of difficulties finding the Rasp Pi, a help page from Z-Way [6] automatically searches for the Rasp Pi and links directly to the web interface of the Z-Way system discovered on the net.

Since the FHEM developers are continuously developing improvements for various modules of the Smart Home system, you need to be sure to update FHEM by entering the update command at the FHEM console.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Z-Wave Home Assistant

    Z-Wave components, a RaZberry module, and the free Home Assistant software make the Raspberry Pi a powerful smart home control center.

  • Z-Wave

    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.

  • FHEM

    If you want to equip your home with smart technology, you will need to deal with a variety of providers and what are often incompatible standards. FHEM is a free integration platform that houses the building blocks under one roof and offers visually appealing interfaces.

comments powered by Disqus
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.

Learn More