AutomationServer - OpenHAB

From The TinkerNet Wiki
Revision as of 14:06, 7 June 2020 by Tinker (talk | contribs) (Created page with "== Solve the Java problem[edit | edit source] == '''NOTE:'''  OpenHAB really hates OpenJDK '''NOTE:''' OpenHAB also really hates java newer than 8 So start by removing Open...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Solve the Java problem[edit | edit source]

NOTE:  OpenHAB really hates OpenJDK

NOTE: OpenHAB also really hates java newer than 8

So start by removing OpenJDK.

sudo apt-get remove openjdk-*

Then download & install a suitable replacement.

Zulu 8 download (or see their download page)

Get zulu 8... not 11...  11 sucks & fails...

Zulu Installation Guide

Add the openHAB 2 Bintray repository key to your package manager[edit | edit source]

wget -qO - 'https://bintray.com/user/downloadSubjectPublicKey?username=openhab' | sudo apt-key add -

sudo apt-get install apt-transport-https

echo 'deb https://dl.bintray.com/openhab/apt-repo2 stable main' | sudo tee /etc/apt/sources.list.d/openhab2.list

& resynchronize the package index:

sudo apt-get update

Install openHAB[edit | edit source]

sudo apt-get install openhab2

& the addons if you like

sudo apt-get install openhab2-addons

Start openHAB and register it to be automatically executed at system startup[edit | edit source]

Register it[edit | edit source]

sudo systemctl daemon-reload

sudo systemctl enable openhab2.service

Start it[edit | edit source]

sudo systemctl start openhab2.service

Verify it's running[edit | edit source]

sudo systemctl status openhab2.service

You can also connect to it at http://YourServer:8080

Useful management stuff[edit | edit source]

Learn about the current service status[edit | edit source]

sudo systemctl status openhab2.service

(Re-)Start the OpenHAB background service[edit | edit source]

sudo systemctl restart openhab2.service

Stop the OpenHAB background service[edit | edit source]

sudo systemctl stop openhab2.service

Disable the OpenHAB background service[edit | edit source]

sudo systemctl disable openhab2.service

Get the service log since the last boot[edit | edit source]

sudo journalctl -f -u openhab2.service -b -o cat