Installing openHAB3
Preparing the installation
openHAB3 builds on Java 11, so let us make sure that we have installed and defined as default JVM used on our Natrix Gateway.
java -version
openjdk version "11.0.12" 2021-07-20
OpenJDK Runtime Environment (build 11.0.12+7-post-Raspbian-2deb10u1)
OpenJDK Server VM (build 11.0.12+7-post-Raspbian-2deb10u1, mixed mode)
Performing the installation
We start with adding the openHAB repository key to our package manager, plus allowing ‘apt’ to use https:
wget -qO - 'https://openhab.jfrog.io/artifactory/api/gpg/key/public' | sudo apt-key add -
apt-get install apt-transport-https
As we always go with stable releases, we add the openHAB stable repository to our ‘systems apt sources list’:
echo 'deb https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main' | sudo tee /etc/apt/sources.list.d/openhab.list
deb https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main
Next steps are resynchronizing the package index, installing openHAB and openHAB add-on packages
apt-get update
apt-get install openhab
apt-get install openhab-addons
Let’s make sure that the openHAB service is automatically started after a reboot respectively system new start.
systemctl enable openhab
Created symlink /etc/systemd/system/multi-user.target.wants/openhab.service → /lib/systemd/system/openhab.service.
After the installation, we can check the accuracy and location of the openHAB installation.
openhab-cli info
Version: 3.1.0 (Build)
User: openhab (Environment Variable Set)
User Groups: openhab tty dialout audio bluetooth
Directories: Folder Name | Path | User:Group
----------- | ---- | ----------
OPENHAB_HOME | /usr/share/openhab | openhab:openhab
OPENHAB_RUNTIME | /usr/share/openhab/runtime | openhab:openhab
OPENHAB_USERDATA | /var/lib/openhab | openhab:openhab
OPENHAB_CONF | /etc/openhab | openhab:openhab
OPENHAB_LOGDIR | /var/log/openhab | openhab:openhab
URLs: http://192.168.188.30:8080
https://192.168.188.30:8443
openHAB preliminary configuration
After a reboot our openHAB system is ready to use.
Our first login under http:// or https:// brings us to the initial landing page were we have to administer our default account.
We go for
User: admin
Password: <<your password here <<

Afterwards we continue with some system settings such as defining default language, region and timezone and location settings based on <latitude> and <longitude> parameter settings:

In the last setup configuration menu, we install our first openHAB Binding which is required in all of our Maker projects, the MQTT Binding:

Finally, we get to the official openHAB landing page:
