Do it your self Hobby

Install OpenHAB2 on Ubuntu Mate 16.04—Raspberry Pi 3

Install OpenHAB2 on Raspberry Pi 3 and turn this small computer to a home automation server. Its really easy installing OpenHab2 in Ubuntu Mate than in Raspbian.
This tutorial requires

  • Raspberry Pi 3 with Ubuntu Mate 16.04 installed
  • Static IP Address set
  • Putty

 
Run Putty and connect to your Raspberry Pi.
Update your Raspberry Pi

sudo apt-get update

If error show like this:

Could not get lock /var/lib/dpkg/lock – open (11:resource temporarily unavailable) unable to lock the administration directory (var/lib/dpkg/), is another process using it?

then desktop environment maybe active. To deactivate type:

sudo raspi-config

Select #2 Boot Options >> B1 Desktop >> B1 Console Text console and the select Finish to reboot
Reconnect to Raspberry Pi, login and type:

sudo apt-get update

Add OpenHAB repository key

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

Install apt https protocol

sudo apt-get install apt-transport-https

Lets choose Official version

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

Update it again

sudo apt-get update

Install OpenHab

sudo apt-get install openhab2

Install Add-ons

sudo apt-get install openhab2-addons

Register OpenHAB service

Use the following commands to launch openHAB on a system restart

sudo systemctl start openhab2.service
sudo systemctl status openhab2.service
sudo systemctl daemon-reload
sudo systemctl enable openhab2.service

Wait for 2-5 minutes then open your browser with this address

[raspberrypi-IP]:8080

Select Standard and wait for 10 minutes to finish the installation