ioBroker integrates different smart home protocols into a single easy interface
Cross-System Switching
Figure 3 shows an example that demonstrates how different smart home systems can exchange data using ioBroker. In this example, the ioBroker system supports three systems:
- Harmony Hub – an add-on hub for a Logitech universal remote control
- KNX – a standards-based building automation system
- Philips Hue – a lighting device, or more precisely, the Hue bridge, which manages the lighting device.
Although all three of these systems speak different languages, ioBroker lets you manage all three collections through a single interface.
Before you can integrate these three environments through ioBroker, you must configure each of the environments individually. For this example, I did the following:
- Created a
Television
activity via the Harmony Hub. - Created a KNX
Television
scene in the KNX system. - Taught all lamps via the Hue bridge.
The automation part now consists of the user selecting the KNX Television
scene by pressing the "Television" button on a Harmony remote control. The result of this scene is that the television switched on and the television lighting turned on via the Hue bridge.
The scene could also trigger other actions through the KNX bus, such as closing the blinds or dimming other light sources (outside the Hue system).
However, these transactions defined within the individual systems still have not achieved the integration possible through ioBroker. The ioBroker configuration will focus on building bridges between the Harmony Hub and KNX on the one hand and between KNX and the Hue system on the other.
Adapter Integration
In order for ioBroker to communicate with these subsystems, a total of four adapters are required:
- JavaScript:
javascript
(already exists after auto-discovery) - KNX system:
knx
- Logitech Harmony Hub:
harmony
- Philips Hue system/bridge:
hue
When installing the Philips Hue adapter, only the IP address of the Hue bridge is important (Bridge Address
field); you either create a new user or enter an existing user in the Bridge Users
field (Figure 4).
The Instances
option in the sidebar menu should list the newly added adapter named hue.0
and the status LED should turn green to indicate that the connection to the host (the Hue bridge) has been established. The Harmony adapter instance is created just as easily. The dialog box only requires two entries: the hub user and the hub password.
Slightly more configuration overhead is required for the KNX adapter. The wizard expects the IP address of the KNX IP interface or the KNX IP router, the corresponding port (3671), and the physical KNX address of the interface (say, 1.1.249). The wizard also offers to include an existing ETS project file (format .knxproj
). You can create the project file with the ETS software [3] via the export function. Importing the ETS file can take a few minutes on a small system such as a Rasp Pi.
The information in the KNX adapter configuration view (Figure 5) represents the KNX group settings contained in the ETS project file. The ioBroker objects that are created automatically after installing the adapters facilitate communication among the devices. Writing to one of these objects triggers an action on the connected system (such as retrieving a KNX scene). If the connected system generates information, the information is also reflected in an object within ioBroker.
The JavaScript adapter is usually installed during the auto-discovery process. For more debugging when programming in JavaScript, it is a good idea to activate the Expert view in the ioBroker Instances tab. Once the Expert view is activated, you can raise the log level from Info to Debug, which provides better console output during JavaScript development.
If all adapters are configured correctly, the Instances
view displays the green status LED for each adapter (Figure 6). By the way, you can also create multiple instances for an adapter. For example, a second existing Hue bridge could be included using the same procedure, but it would then have an instance name of hue.1
instead of hue.0
.
Communication via Objects
ioBroker automatically creates a large number of objects during the adapter installation. In the Object tab (Figure 7), you can open, modify, and inspect all objects in a hierarchical view. This central view of object data is one of the great strengths of ioBroker. In principle, the software handles the communication between the individual smart home systems. The view is refreshed automatically when objects change. It is also very easy to trigger an action in a connected system by manually overwriting the object value in the Value
column.
Communication with an external device is easy. The following example is intended to switch on a Hue light. In the object view, expand the hierarchical list until you find the objects you are looking for. The hierarchy is structured differently depending on the adapter. For example, the path for a Hue light would look like this:
hue.0 | Philips_hue | Liv | pendant_lamp_front
The designations Liv
(for living room) and pendant_lamp_front
come from the Hue bridge configuration and reflect the user settings at the time of Hue system commissioning.
When the last hierarchy level is expanded, ioBroker displays the usable objects. At this point, it is sufficient to change the value for the object in the Value
column from false
to true
to switch on the pendant_lamp_front
(Figure 7). In response to this, the level
object is automatically updated to 100
and bri
(brightness) to 254
.
Since the example is a multicolored LED luminaire, it makes sense to bring some color into play. If the effect
object is described by the colorloop
value, the Hue light permanently changes color. The value none
stops the show. More information about the Hue color model is available at the Phillips Hue developers website [4].
« 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
-
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.
-
New Slimbook EVO with Raw AMD Ryzen Power
If you're looking for serious power in a 14" ultrabook that is powered by Linux, Slimbook has just the thing for you.
-
The Gnome Foundation Struggling to Stay Afloat
The foundation behind the Gnome desktop environment is having to go through some serious belt-tightening due to continued financial problems.
-
Thousands of Linux Servers Infected with Stealth Malware Since 2021
Perfctl is capable of remaining undetected, which makes it dangerous and hard to mitigate.
-
Halcyon Creates Anti-Ransomware Protection for Linux
As more Linux systems are targeted by ransomware, Halcyon is stepping up its protection.
-
Valve and Arch Linux Announce Collaboration
Valve and Arch have come together for two projects that will have a serious impact on the Linux distribution.
-
Hacker Successfully Runs Linux on a CPU from the Early ‘70s
From the office of "Look what I can do," Dmitry Grinberg was able to get Linux running on a processor that was created in 1971.