ioBroker install - Docker
With ioBroker different automation solutions or devices can be combined in one system. To address specific gateways or devices, different adapters are used in ioBroker;
Docker Basics
A container is an isolated environment independent of the operating system (OS):
When a container is first launched, Docker independently loads all the necessary sources
from the internet.
Docker can be installed on Windows, macOS or an Linux Distribution
Software | IoBroker |
---|---|
GitHub | https://github.com/ioBroker/ioBroker |
current version | 2024-10-22-2 |
found | 2024-10-23 |
Start ioBroker in Docker
To start ioBroker, I used the following command:
sudo docker run -d \
--net=host \
--hostname=iobroker \
--restart=always \
--name iobroker \
-v /opt/iobroker \
buanet/iobroker -p
The example uses Docker volumes and no Bind mounts for permanent storage of data. See: Docker data storage: Docker Volumes vs. Host Folders
The first connection to the web interface will launch a setup wizard:
Login password
To secure access to ioBroker, authentication must be enabled. If not done using the wizard, a password can be assigned via “User”:
The Authentication is used on instances, “admin.0”:
Connect adapter, as an example: deConz ZigBee.
For the control of ZigBee devices, Conbee has its own adapter,
After adding, the Phoscon GW of the ConBee stick must be set to “Authenticate app”. For information on commissioning ConBee, see: Conbee 2 Startup.
then: Create API Key and save:
If the connection to deCONZ works, the API key is automatically filled.
InfluxDB
The adapter “InfluxDB” makes it possible to write historical values into an Influx database, for setup, see: Docker InfluxDB.
After the setup, the Influx database can be stored in the settings of the adapter:
For recording meter readings, on objects and "Settings":
Activating it will write all status & changes to the database:
connect, control different devices
Direct control of devices via their objects is possible, but not really comfortable.The Objects menu is used to display all statuses and to test certain actions. In order to connect sensors or switches with certain devices, a certain logic is required, for this there are several possibilities in ioBroker. For simple links, the “Scenes” adapter can be used, while the “Script Engine” adapter offers somewhat more possibilities:
Scenes - react to specific values
A very simple variant to link certain triggers with certain actions is offered by the adapter “Scenes”. As an example, I control a dehumidifier via a controllable socket based on the displayed humidity of a sensor:
Script Engine - logical operations
The Script Engine adapter generates JavaScript code via visual elements (blockly).
The visual elements automatically generates a JavaScript block:
on({id: 'deconz.0.Sensors.10.humidity', change: "ne"}, function (obj) {
var value = obj.state.val;
var oldValue = obj.oldState.val;
if (getState("deconz.0.Sensors.10.humidity").val >= '65') {
setStateDelayed("deconz.0.Lights.7.on"/*Smart plug 7 on*/, true, 600000, false);
}
if (getState("deconz.0.Sensors.10.humidity").val < '60') {
setState("deconz.0.Lights.7.on"/*Smart plug 7 on*/, false);
}
});
Conclusion
The ioBroker can connect a wide variety of smart home solutions with each other. A variety of adapters in ioBroker offers numerous connection and expansion options. Using Docker, it is also easy to run and connect containers outside of ioBroker but on the same hardware, for example a ZigBee gateway Conbee 2, a InfluxDB and Grafana for visualization. As an alternative to ioBroker, see also: Home-Assistant.
{{percentage}} % positive