OpenHAB 2 auf Arch Linux



JRE8 Zulu Embedded (EZDK) installieren


mkdir ~/workspace

cd ~/workpsace

git clone https://github.com/vitalogy/myPKGBUILDs.git

cd myPKGBUILDs/java8-ezdk/

makepkg -s

JRE EZDK Headless installieren (ggf. die Version anpassen)
pacman -U jre8-ezdk-headless-jdk8.u112-1-armv7h.pkg.tar.xz


OpenHAB2 installieren


groupadd -g 188 openhab

useradd -u 188 -g openhab -d /opt/openhab2 -c 'openHAB2 home automation software' -s /bin/nologin openhab

cd /tmp

OpenHAB2 stable 2.0.0.
wget -O openhab2.zip https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F2.0.0%2Fopenhab-2.0.0.zip

OpenHAB2 snapshot 2.1.0
wget -O openhab2.zip https://openhab.ci.cloudbees.com/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-2.1.0-SNAPSHOT.zip

unzip openhab2.zip -d /opt/openhab2

rm openhab2.zip

nano /usr/lib/systemd/system/openhab2.service

/usr/lib/systemd/system/openhab2.service

[Unit]
Description=OpenHAB2 home automation software
After=network.target

[Service]
Type=simple
User=openhab
Group=openhab
GuessMainPID=yes
WorkingDirectory=/opt/openhab2
ExecStart=/opt/openhab2/start.sh server
ExecStop=/usr/bin/kill -SIGINT $MAINPID
Restart=on-failure

[Install]
WantedBy=multi-user.target

Zugriffsrechte für das Verzeichniss /opt/openhab2 anpassen
chown -hR openhab:openhab /opt/openhab2
chmod 750 /opt/openhab2

openHAB2 starten
systemctl start openhab2

openHAB2 bei jedem Systemstart mitstarten
systemctl enable openhab2

im Browser folgende URL öffnen
https://<ip oder hostname>:8443 … und warten

das Zertifikat akzeptieren
die Standard Pakete installieren