Home automation with a Raspberry Pi
Home Director
Control devices from different manufacturers of home automation devices from a single interface by combining free software and a Raspberry Pi.
Smart homes with many computer-controlled devices are in vogue, with increasing numbers of manufacturers jumping on the bandwagon. Smart light bulbs and individually controllable sockets are no longer the only items available: Air conditioners, washing machines, ovens, and multimedia and alarm systems can also be integrated through smart home apps.
Not all smart homes are created equal: Different specifications (e.g., the Zigbee and Z-Wave standards) render many components from different manufacturers incompatible. Ultimately, you can end up juggling several corresponding matching control devices and apps for the individual end devices.
However, armed with just a Raspberry Pi and ioBroker home automation software [1], you can use components from different manufacturers intelligently, while bundling a wide variety of standards – including legacy WiFi – in a single device. You no longer need several different apps on your smartphone to control each component, and you don't need a high-powered, permanently running, conventional PC to control the devices.
ioBroker for the Smart Home
ioBroker is written in JavaScript and is considered the bedrock among free software solutions for home automation, having been under continuous development for more than six years and available back when the Internet of Things (IoT) was still making strangely hesitant steps into private households.
The cross-platform software is modular, with each virtual adapter (now available for more than 300 components and services) communicating with its complementary device. ioBroker supports the integration of new adapters on the fly. Additionally, you can combine several ioBroker servers to create a multihost, an option that is likely to be of particular interest in large environments such as enterprise infrastructures.
Several ZIP archives for the Raspberry Pi cover the spectrum from the Raspberry Pi 2 to the current fourth generation device, although some of the archives are based on older versions of Raspbian. In addition to the images, the developers also provide a repository that supports integrating the software into an existing Raspberry Pi OS. The install is documented on the project's website [2].
The ZIP archives usually contain a minimal installation of Raspbian, without a graphical user interface and a login of username pi and password raspberry. The US keyboard layout is the default after installation.
Configuring the Software
ioBroker is managed entirely in a web browser, for which the client-server application integrates a web server. You can reach the management interface at http://<Pi IP>:8081 from a workstation on your home network. A license agreement appears, and you must agree to anonymous statistical data being collected before you can access the dashboard. This setting can be changed later.
The system then guides you to the basic settings menu, where you can modify some system options (Figure 1). By default, only the Admin, Discovery, and Info adapters are active in ioBroker. For a list of installed adapters with some adapter-specific status and management information, click Instances in the vertical options bar on the left side of the browser window.
To discover your existing smart home devices – and have the corresponding adapters installed – select the discovery.0 entry in the Instances view (Figure 2), which opens an area with a list of methods for adapter detection (e.g., Ping, UPnP, mDNS). You can enable/disable the individual options by checking or unchecking the boxes.
After clicking the Discover button, ioBroker finds responsive devices and services. Please note that it only detects components and control devices (so-called gateways) on the local and WiFi networks, but not end devices, such as smart switches or lamps with intelligent controls, addressed over other protocols.
The system lists the gateways and components it finds in a new window after the search, where you can enable the desired components by checking the boxes for the individual entries and then pressing the Create Instances button at the bottom of the window. The software then downloads the required packages and integrates them into the system.
Updating Adapters
After the initial installation of the main adapters, it makes sense to look at the Updates box in the Info group in the sidebar. If updates are available for installed adapters or components, you can install them by clicking on the update (circular arrows) icon in front of the adapter name. ioBroker then updates the software in question.
On the right side of the window, the New Adapters list shows adapters newly implemented in the software. If you have what were previously unsupported smart home components, it makes sense to check here to see if an adapter is now available for this device (Figure 3).
To insert adapters retroactively, use the Adapters entry in the sidebar (Figure 4). ioBroker lists all the available adapters on the right side of the window, with the previously installed adapters at the top of the list. Once you have found the right module for your smart home component, click on the small menu in a blue circle on the right above the name of the adapter to see a short description of the respective adapter. Pressing the plus button at bottom left in the description block installs the adapter. The module fires up automatically and appears in the list of available instances.
For most adapters, a configuration window opens where you can adapt the module to suit the hardware. Above all, the individual manufacturers' control devices first need to be connected to the Raspberry Pi in the corresponding dialogs after installing the adapter, so you can access the connected devices. To do this, you usually have to specify at least the IP address of the adapter and the port number on which it can be accessed.
You can discover the device's IP address either in your router's settings menu or with tools that show active devices on the local network, like Angry IP Scanner [3] for Linux or Fing [4] for your smartphone. For some adapters, you also need to make settings on the gateway during configuration in ioBroker. If this is the case, a corresponding message box usually appears (Figure 5).
In this case, the settings that appear are context-sensitive; the options displayed are specific to the device in question. After finishing the configuration, close the dialog and switch to the Objects category.
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
-
ESET Discovers New Linux Malware
WolfsBane is an all-in-one malware that has hit the Linux operating system and includes a dropper, a launcher, and a backdoor.
-
New Linux Kernel Patch Allows Forcing a CPU Mitigation
Even when CPU mitigations can consume precious CPU cycles, it might not be a bad idea to allow users to enable them, even if your machine isn't vulnerable.
-
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.