Installing OpenHAB2 on Raspberry Pi

Installing OpenHAB2 on Raspberry Pi

This will be a multiple part series as we (John Wills) and I (Joshua Abramson) partner on a internet of things project. The goal is to provide a guide that will produce a secure IOT implementation at your home or work. PuTTY a free SSH and telnet client for Windows. (if your are using windows)Step 1: A Little Raspbian House CleaningConnected via SSH, execute the Raspbian configuration menu by running sudo raspi config. “openhabpi”) From the advanced menu, change the memory split for the GPU to “16” RestartAs a good practice, run a full upgrade and install packages you like or need (a set of helpful packages is given as an example):

sudo apt get update sudo apt get upgradesudo apt get install screen mc vim git htopRaspbian in the latest full versions already includes the required Oracle Java 8. If you are using “Raspbian Lite” you need to install it:

Step 2: Package Repository InstallationInstallation through a package repository is the recommended choice on Debian/Ubuntu derivatives. Alternatively resort to the manual installation approach.

Choose between the latest Beta release or a Snapshot with all incoming contributions, rebuild on every change. As openHAB 2 is still in an evolving state,
Installing OpenHAB2 on Raspberry Pi
the snapshot may be the preferred choice. Be careful to not have conflicting repositories in your sources list. If your system fails at the next step, install the missing dependency:

sudo apt get install apt transport httpsUpdated 11 27 16 Some are reporting an error after the command above; however, it appears to work after the second attempt.

Added 11 27 16 Scan the newly added repository and resynchronize the package index:

sudo apt get updateFinally install openHAB 2 as either offline or online distribution. The offline distribution is full blown and comes with all add ons, the online distribution will install additional add ons on request from the internet. We are going with offline here.
Installing OpenHAB2 on Raspberry Pi