Home automation with a Raspberry Pi
Objects and Custom Scripts
The Objects dialog lists all the existing adapters with their respective configuration options. They are summarized in a tree below the respective instance (Figure 6). You can typically modify the configuration of the end devices in the individual folders by adjusting the predefined values. Because the individual attributes of the devices are also required for creating corresponding controls in the Vis editor visualization dialogs (discussed in the next section), you will want to assign meaningful names to the object attributes and enter them in the corresponding lines of the attribute view to ensure a better overview of the features in the Vis editor interface.
Because the current configuration of a component does not yet allow automated control, ioBroker offers a scripting option for installing a convenient interface: the JS Script Engine adapter. In the interface, you can choose whether you want to create the script in JavaScript, Blockly, or TypeScript. If you choose Blockly, ioBroker integrates a modular system that allows programming of components through the underlying JavaScript back end with graphical puzzle pieces.
Once you have integrated the script engine into the system, a new Scripts entry appears in the sidebar, where you can call the engine. Script programming requires some prior knowledge, but the ioBroker developers do offer detailed documentation to help you out [5].
Uniform Interface
With the help of the Vis interface, you can combine your entire private IoT into a unified control center. Vis is also implemented as an adapter and installed when the control software in ioBroker is installed. The visualization module combines all common control elements such as switches, scripts, and scenes of the smart home infrastructure in a uniform, web-based interface that you can access with any end device (Figure 7). To access the interface, either call the corresponding adapter in the Instances group from the adapter web page icon, or enter the IP address of the Raspberry Pi followed by port number 8082 in the address bar of a browser.
If you call the Vis adapter from the Instances view, the Vis editor appears, where you can define the individual attributes for the end devices to be controlled. The editor has complex optional settings for the respective actuators, switches, sensors, and terminal devices; it is a good idea to read the manual up front to avoid creating faulty controls. The individual device attributes can be found by choosing the Objects item in the ioBroker sidebar (Figure 6).
If you call the Vis adapter manually from the web browser, you are taken to a dialog that presents an editor; clicking the VIS RUNTIME button opens the preconfigured control interface, which you can use to switch the individual devices on and off or to display information. A tablet that displays this interface in the browser is ideal for this task, letting you monitor and control your infrastructure conveniently, simply by tapping.
In the Vis interface, you can also include widgets in the editor that provide you with information such as the weather situation or a time display. Widgets are enabled in the same way as traditional device controls [6]. The system lets you freely design the widgets in terms of appearance; the same applies to the Vis interface background. The developers provide basic layout templates that can be freely customized.
Developing Scenarios
ioBroker lets you program and use scenes to control your device groups individually. To do so, use the Adapters selection to integrate the scenes adapter into the system. After doing so, the new Scenes option appears in the vertical bar on the left side of the program window. On opening, you are taken to the scene editor, which lets you define individual, changing settings profiles for individual components or component groups.
ioBroker stores the settings profiles in a tree structure. Once you have captured one or more of these scenes, incorporate them into your control interface in the Vis editor; then, you can manage multiple devices together by predefined scene profiles (e.g., automatically dimming the lights and lowering the blinds for a home theater setting).
« Previous 1 2 3 Next »
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
-
Gnome 48 Debuts New Audio Player
To date, the audio player found within the Gnome desktop has been meh at best, but with the upcoming release that all changes.
-
Plasma 6.3 Ready for Public Beta Testing
Plasma 6.3 will ship with KDE Gear 24.12.1 and KDE Frameworks 6.10, along with some new and exciting features.
-
Budgie 10.10 Scheduled for Q1 2025 with a Surprising Desktop Update
If Budgie is your desktop environment of choice, 2025 is going to be a great year for you.
-
Firefox 134 Offers Improvements for Linux Version
Fans of Linux and Firefox rejoice, as there's a new version available that includes some handy updates.
-
Serpent OS Arrives with a New Alpha Release
After months of silence, Ikey Doherty has released a new alpha for his Serpent OS.
-
HashiCorp Cofounder Unveils Ghostty, a Linux Terminal App
Ghostty is a new Linux terminal app that's fast, feature-rich, and offers a platform-native GUI while remaining cross-platform.
-
Fedora Asahi Remix 41 Available for Apple Silicon
If you have an Apple Silicon Mac and you're hoping to install Fedora, you're in luck because the latest release supports the M1 and M2 chips.
-
Systemd Fixes Bug While Facing New Challenger in GNU Shepherd
The systemd developers have fixed a really nasty bug amid the release of the new GNU Shepherd init system.
-
AlmaLinux 10.0 Beta Released
The AlmaLinux OS Foundation has announced the availability of AlmaLinux 10.0 Beta ("Purple Lion") for all supported devices with significant changes.
-
Gnome 47.2 Now Available
Gnome 47.2 is now available for general use but don't expect much in the way of newness, as this is all about improvements and bug fixes.