Internet of Things – OpenHAB1 – Installeren op de Raspberry Pi

Website

Stap 1 – Installatie van Java

Raspberry Pi – Software – Java installeren

Stap 2 – OpenHAB installeren

– Installeer de pgp sleutel:
wget -qO - 'https://bintray.com/user/downloadSubjectPublicKey?username=openhab' | apt-key add -

– Voeg OpenHAB toe aan de repolijst:
echo "deb http://dl.bintray.com/openhab/apt-repo stable main" > /etc/apt/sources.list.d/openhab.list

– Update de repolijst:
apt-get update

– Installeer nu OpenHAB:
apt-get install -y openhab-runtime

Stap 3 – OpenHAB starten

– OpenHab Starten:  systemctl start openhab

  • start/stop script: /etc/init.d/openhab
  • herstarten: sudo /etc/init.d/openhab restart

– Daarna configureren om automatisch te starten:  systemctl enable openhab

– Je kan addons zoeken met:  sudo apt-cache search openhab

Alle addons installeren:

Stap 4 – OpenHAB configuratiebestand

– Kopieer het standaard configuratiebestand naar openhab.cfg

sudo cp /etc/openhab/configurations/openhab_default.cfg /etc/openhab/configurations/openhab.cfg

Daarin kan je alles instellen dat bij de addons gebruikt word.

Ps. om energie te besparen kan je HDMI uitzetten (afhankelijk van je configuratie (headless)):

/opt/vc/bin/tvservice --off

OpenHAB folder structuur

Installatiefolder: /usr/share/openhab

Configuratie: /etc/openhab

Scripts: /etc/openhab/configuration/scripts

LOG bestanden: /var/log/openhab

Icons: /usr/share/openhab/webapps/images

Map transformaties: /etc/openhab/configurations/transform

Persistent onderdelen: /etc/openhab/configurations/persistence


Bronnen:
inside-smarthome.com


Gebruikte bestanden:

Java 8 download (jdk-8u151-linux-arm32-vfp-hflt.tar.gz) @ oracle.com

Openhabian @ Github