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
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.
-
ZorinOS 17.1 Released, Includes Improved Windows App Support
If you need or desire to run Windows applications on Linux, there's one distribution intent on making that easier for you and its new release further improves that feature.
-
Linux Market Share Surpasses 4% for the First Time
Look out Windows and macOS, Linux is on the rise and has even topped ChromeOS to become the fourth most widely used OS around the globe.
-
KDE’s Plasma 6 Officially Available
KDE’s Plasma 6.0 "Megarelease" has happened, and it's brimming with new features, polish, and performance.
-
Latest Version of Tails Unleashed
Tails 6.0 is based on Debian 12 and includes GNOME 43.
-
KDE Announces New Slimbook V with Plenty of Power and KDE’s Plasma 6
If you're a fan of KDE Plasma, you'll be thrilled to hear they've announced a new Slimbook with an AMD CPU and the latest version of KDE Plasma desktop.
-
Monthly Sponsorship Includes Early Access to elementary OS 8
If you want to get a glimpse of what's in the pipeline for elementary OS 8, just set up a monthly sponsorship to help fund its continued existence.
-
DebConf24 to be Held in South Korea
Busan will be the location of the latest DebConf running July 28 through August 4