Difference between revisions of "AutomationServer - OpenHAB"

From The TinkerNet Wiki
Jump to navigation Jump to search
 
Line 1: Line 1:
== Solve the Java problem[edit | edit source] ==
+
[https://www.openhab.org/ OpenHAB Web Site]
 +
 
 +
==Solve the Java problem[edit | edit source]==
 
'''NOTE:'''  OpenHAB really hates OpenJDK
 
'''NOTE:'''  OpenHAB really hates OpenJDK
  
Line 16: Line 18:
 
[https://www.azul.com/files/zulu_8.9_install.pdf Zulu Installation Guide]
 
[https://www.azul.com/files/zulu_8.9_install.pdf Zulu Installation Guide]
  
== Add the openHAB 2 Bintray repository key to your package manager[edit | edit source] ==
+
==Add the openHAB 2 Bintray repository key to your package manager[edit | edit source]==
 
<code>wget -qO - '<nowiki>https://bintray.com/user/downloadSubjectPublicKey?username=openhab'</nowiki> | sudo apt-key add -</code>
 
<code>wget -qO - '<nowiki>https://bintray.com/user/downloadSubjectPublicKey?username=openhab'</nowiki> | sudo apt-key add -</code>
  
Line 27: Line 29:
 
<code>sudo apt-get update</code>
 
<code>sudo apt-get update</code>
  
== Install openHAB[edit | edit source] ==
+
==Install openHAB[edit | edit source]==
 
<code>sudo apt-get install openhab2</code>
 
<code>sudo apt-get install openhab2</code>
  
Line 34: Line 36:
 
<code>sudo apt-get install openhab2-addons</code>
 
<code>sudo apt-get install openhab2-addons</code>
  
== Start openHAB and register it to be automatically executed at system startup[edit | edit source] ==
+
==Start openHAB and register it to be automatically executed at system startup[edit | edit source]==
  
=== Register it[edit | edit source] ===
+
===Register it[edit | edit source]===
 
<code>sudo systemctl daemon-reload</code>
 
<code>sudo systemctl daemon-reload</code>
  
 
<code>sudo systemctl enable openhab2.service</code>
 
<code>sudo systemctl enable openhab2.service</code>
  
=== Start it[edit | edit source] ===
+
===Start it[edit | edit source]===
 
<code>sudo systemctl start openhab2.service</code>
 
<code>sudo systemctl start openhab2.service</code>
  
=== Verify it's running[edit | edit source] ===
+
===Verify it's running[edit | edit source]===
 
<code>sudo systemctl status openhab2.service</code>
 
<code>sudo systemctl status openhab2.service</code>
  
 
You can also connect to it at <nowiki>http://YourServer:8080</nowiki>
 
You can also connect to it at <nowiki>http://YourServer:8080</nowiki>
  
== Useful management stuff[edit | edit source] ==
+
==Useful management stuff[edit | edit source]==
  
=== Learn about the current service status[edit | edit source] ===
+
===Learn about the current service status[edit | edit source]===
 
<code>sudo systemctl status openhab2.service</code>
 
<code>sudo systemctl status openhab2.service</code>
  
=== (Re-)Start the OpenHAB background service[edit | edit source] ===
+
===(Re-)Start the OpenHAB background service[edit | edit source]===
 
<code>sudo systemctl restart openhab2.service</code>
 
<code>sudo systemctl restart openhab2.service</code>
  
=== Stop the OpenHAB background service[edit | edit source] ===
+
===Stop the OpenHAB background service[edit | edit source]===
 
<code>sudo systemctl stop openhab2.service</code>
 
<code>sudo systemctl stop openhab2.service</code>
  
=== Disable the OpenHAB background service[edit | edit source] ===
+
===Disable the OpenHAB background service[edit | edit source]===
 
<code>sudo systemctl disable openhab2.service</code>
 
<code>sudo systemctl disable openhab2.service</code>
  
=== Get the service log since the last boot[edit | edit source] ===
+
===Get the service log since the last boot[edit | edit source]===
 
<code>sudo journalctl -f -u openhab2.service -b -o cat</code>
 
<code>sudo journalctl -f -u openhab2.service -b -o cat</code>
 
<br />
 
<br />

Latest revision as of 14:09, 7 June 2020

OpenHAB Web Site

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