When I built a house about 10 years ago, I quickly realized that I wanted to realize a home automation system. First I used FHEM - a system that is freely configurable and programmable and offers many interfaces to third-party hardware. In the course of time, many interesting new tools came onto the market and I thought for a long time whether I should dare to make the switch. Now I am giving OpenHAB a chance.
Selection of components
The hardware for home automation runs around the clock. For this reason alone, I made sure that it runs as quietly and power-savingly as possible. In my opinion, the Raspberry offers an excellent compromise between low price, high flexibility and a good WAF (Woman Acceptance Factor), a value that should not be neglected when planning a good home automation system.
The FHEM solution ran relatively stable on a Raspberry B+ for many years. Only "relatively stable" because I initially supplied it with power via the USB port of the Fritz!Box hanging on the wall right next to it. But the Raspberry draws at least partly more power than the USB specification gives, which then leads to a crash of the Raspberry and the FritzBox.
For the OpenHAB experiment I definitely want the FHEM solution to continue running until OpenHAB provides at least one equivalent function. So another Raspberry was needed, and my choice was the new Raspberry 4 with an official USB-C power supply.
For reasons of fairness alone, load comparisons between the old and new solution are therefore not possible. But the FHEM solution was at no time felt slow or even had switching problems. In this respect I am not worried about the performance.
With FHEM I have in particular 1Wire solutions, Philips HUE, Osram Lightify and various HomeMatic sensors in operation. In addition, there are some devices that are addressed by FS20; however, since this standard does not work bidirectionally, I could do without them (basically, these are very inexpensive radio sockets from the DIY store that can be switched by the Smarthome. However, the FS20 system cannot provide any feedback whether the switching command has been received, so the application possibilities are limited to uncritical things - e.g. switching on Christmas lights or similar).
Besides OpenHAB I have also considered ioBroker and Home-Assistant.
My vision of an intelligent house
From my point of view, few terms are as trite as "smart home". In most cases, someone in marketing has decided that it should be particularly "smart" to switch on the light in the living room with the smartphone. Or TVs that bring along apps that are not usable and have switching times that directly spoil the fun.
None of this has anything to do with my vision of a smart house. My requirements are: Guests who are in the house should also be able to intuitively switch the light on and off via a light switch next to the door, as has been proven over decades.
But the house should react to certain parameters: e.g. retract the sun sail when it rains. Automatically dim the light to only 30% at night so that you don't get flashed out of sleep when you go to the bathroom at night. Recognize that the TV is on and automatically switch the lighting mood that we always use when watching TV.
For the "checkered lilies of the valley", i.e. when something outside the routine is supposed to happen, the smartphone is acceptable as a controller, e.g. when the living room is supposed to be lit up in undersea blue or unicorn pink for a party. But at any time, the pressure on the light switch should do something expectable and useful.
Most things in our smart home therefore happen in secret; without anyone controlling it or ideally even noticing it. For example, the controlled ventilation system is automatically regulated depending on the season, outside temperature and time of day, in order to get as much cool and fresh air into the house as possible in summer when everyone is asleep.
OpenHAB offers several options for installation. Surely the easiest of them is to download the OpenHABian image, flash it to an SD card and you're done. Instructions can be found directly on the OpenHAB website, including links to the software needed for flashing.
I have decided that the Raspberry should run a Raspbian Linux system. As described above, I want to reduce the necessary hardware to a minimum; for Raspbian, for example, packages for a 1Wire file system are available, the control module for the HomeMatic components can be integrated, etc. All this helps me to avoid further controllers.
Also the installation on a Raspbian is quite easy if you know a little bit about Linux. First of all the system is updated and some important packages are installed:
sudo apt-get update sudo apt-get upgrade sudo apt-get install screen mc vim git htop
Since OpenHAB is based on Java, the JDK must be installed in version 8. To do this, it is necessary to create a free account on the Oracle website. You can find the download page here: www.oracle.com/java/technologies/javase-jdk8-downloads.html
For the Raspberry the right package is the Linux ARM 32 Hard Float ABI; after login you can download the archive to your computer and transfer it to the Raspberry e.g. with scp:
scp jdk-8u241-linux-arm32-vfp-hflt.tar.gz email@example.com:
Then connect to the Raspberry and unpack the package:
sudo tar xvzf jdk-8u241-linux-arm32-vfp-hflt.tar.gz -C /opt sudo update-alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_241/bin/javac 1 sudo update-alternatives --install /usr/bin/java java /opt/jdk1.8.0_0_241/bin/java 1 sudo update-alternatives --config java sudo update-alternatives --config javac
and test if it works:
java -version javac -version
should always report back the main version 8.
After that you can delete the downloaded archive:
Finally, only OpenHAB itself is missing:
wget -qO - 'https://bintray.com/user/downloadSubjectPublicKey?username=openhab' | sudo apt-key add - sudo apt-get install apt-transport-https echo 'deb dl.bintray.com/openhab/apt-repo2 stable main' | sudo tee /etc/apt/sources.list.d/openhab2.list sudo apt-get update sudo apt-get install openhab2 sudo apt-get install openhab2-addons
makes the OpenHAB repository known and installs the package including the AddOns.
sudo systemctl start openhab2.service sudo systemctl status openhab2.service sudo systemctl daemon-reload sudo systemctl enable openhab2.service
registers OpenHAB as a service (which always runs in the background and is automatically started when the Raspberry is started).
OpenHAB writes on the installation website that the first startup can take up to 15 minutes. For me, the process was much faster and OpenHAB logs on to the internal network on the IP address of the Raspberry and port 8080.