Here’s a quick guide to getting OH3 up and running on a Raspberry Pi 4 with OpenSUSE Leap 15.3.
If you are not using a Raspberry Pi or another ARM-based device, in theory most of these instructions should still be applicable, except for the installation Java SDK method – x86_64 platforms have RPMs available so you would add the relevant repository (e.g., by first installing the
zulu-repopackage) and then use
zypper installto download the SDK. I have not tried this.
This is based on my installation notes and may be missing a step or two but should get you most of the way there. This is current as of 2021-07-01. Mind the natural evolution of all the relevant bits.
Clear and concise instructions are given on the OpenSUSE site itself.
The only thing to keep in mind is that the links given in that page may lead to a 404 in between rebuilds as the new versions propagate through the mirrors – in that case, do follow the advice to ‘please check the general download directory for the images.’
As a general comment, getting OpenSUSE up and running on the Pi is super easy. Just burn the image into an SD card, pop it into the Pi and off you go.
You will need the Java 11 version recommended by OpenHAB, plus the OpenHAB binaries themselves. There is also a minor bit of faffing with permissions and some easy configuration changes to do.
Unless otherwise implied by the presence of an
sucommand, all the instructions below assume the root user.
Get the latest *.tar.gz for ARM-64 from here: Java Download | Java 8, Java 11, Java 13 - Linux, Windows & macOS
cd /tmp wget "https://cdn.azul.com/zulu-embedded/bin/zulu11.48.21-ca-jdk11.0.11-linux_aarch64.tar.gz" su cd /opt tar -xzvf /tmp/zulu-embedded/bin/zulu11.48.21-ca-jdk11.0.11-linux_aarch64.tar.gz # Cleanup rm /tmp/zulu-embedded/bin/zulu11.48.21-ca-jdk11.0.11-linux_aarch64.tar.gz # This lets OpenSUSE find Java ln -s /opt/zulu-embedded/bin/zulu11.48.21-ca-jdk11.0.11-linux_aarch64.tar.gz /usr/java
There are ways and ways to do this, but:
cat <<EOF >openhab.repo [openHAB-Stable] name=openHAB Stable baseurl=https://openhab.jfrog.io/artifactory/openhab-linuxpkg-rpm/stable gpgcheck=1 gpgkey=https://openhab.jfrog.io/artifactory/api/gpg/key/public enabled=1 autorefresh=1 EOF zypper ar ./openhab.repo zypper refresh # Cleanup rm ./openhab.repo
Calling directly for
openhab-addons will drag
openhab itself as a dependency.
zypper install openhab-addons
Consider also installing
ffmpeg if you will be adding an IP camera.
If you want to use the full set of codecs, including possibly patent-encumbered ones, see the OpenSUSE site for the latest instructions to adding the Packman repos. If you’re happy with fully open codecs, proceed straight on.
zypper install ffmpeg
If you will be using RFXCOM or anything else serial-looking, the
openhab user should be a member of
dialout – the installer should have taken care of this – but also a member of
lock so that it can write to
The command line for that is:
usermod -a -G lock openhab
Note: I actually use Yast2 for almost all configuration and admin. This is in my opinion what sets OpenSUSE apart from anything else out there, so might as well take advantage of it.
This will be under
Security and Users→
User and Group Management,
System Users, select
Yes, it is a lot of clicking, but probably quicker than reading the
usermod, the corresponding command-line instruction, for an operation I have to do once every couple of years.
There might be a better way to do this, for instance by making Java available at a location other than
/usr/java, but what I’ve done is edit
/etc/defaults/openhab and somewhere in there I added:
If you will be using serial-based Things, you might have come across instructions on the Internet that advise to also edit
EXTRA_JAVA_OPTS in that file. In fact, that should not be necessary as OpenHAB will look for common patterns automatically.
/bin/systemctl daemon-reload /bin/systemctl enable openhab.service /bin/systemctl start openhab.service
If all went well, now you should be able to connect to your OpenHAB via HTTP on port 8080 and follow the rest of the instructions in the tutorial.
With many thanks to: