OpenHAB on odroid n2+ install

Ubuntu Mate is an overkill for running openHAB etc.

I’m not sure why your reseller is going to send you a copy, all the info and download links are on the Odroid wiki page

https://wiki.odroid.com/odroid-n2/odroid-n2

(Read it all before you do anything, don’t rush)

Unless you intend to use the desktop environment, I would recommend a “headless” system.

This just uses a command line environment, which is fairly easy to get your head around as most of the time you’ll be accessing the machine from a a bigger computer anyway.
WinSCP / FileZilla etc.

(You might want to add a Samba server to DietPi and setup folder shares, if you want to access the N2 like a network connected device, easy to do, but please search for instructions, there are plenty.

)

I would recommend you download an OS image and flash it onto the eMMC.

Check out www.DietPi.com , it’s very easy to deploy.

There are plenty of others to choose from, I just find DietPi to be really straightforward.

(I assume you have the eMMC to SD or USB adapter?)

Follow these instructions if you’re unsure how to “flash an image to an eMMC”

Once you’ve flashed the OS image to the eMMC, put the eMMC into the N2.
Connect a keyboard and monitor, add an ethernet cable and power it up.

On first boot, the OS will unpack itself and expand to use all of the eMMC card.

Login is

root

Password is dietpi

It will prompt you to change the password, my advice would be not to until you’re really comfortable with what you’re doing, as there is no way to get access if you forget the new password.
(Do change it when you’re happy)

Run these commands

dietpi-update

Follow the on screen instructions.

dietpi-software

Look for “search software” and look for Java

Add a star (press Space bar) to Java

Go back to the main menu and choose “install”

When that’s finished, choose “exit”

Back at the command prompt, follow the instructions from this webpage to install openHAB (stable) for a DEB / Debian
Apt based system”.

Which basically is a few lines

You’ll have to type these in, unless you suddenly decide that you’re happier to use something like puTTY or a MAC / Windows / Linux command line on your main computer and can then use cut & paste. (Paste in a terminal is either a right click / shift & insert / from the window menu)

curl -fsSL "https://openhab.jfrog.io/artifactory/api/gpg/key/public" | gpg --dearmor > openhab.gpg
sudo mkdir /usr/share/keyrings
sudo mv openhab.gpg /usr/share/keyrings
sudo chmod u=rw,g=r,o=r /usr/share/keyrings/openhab.gpg

Once you have added the above, you’re ready to install openHAB

This line will tell the computer that you want to use the stable version

echo 'deb [signed-by=/usr/share/keyrings/openhab.gpg] https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main' | sudo tee /etc/apt/sources.list.d/openhab.list

Now you need to tell the computer / N2 to update it’s list of available software.

apt update

Then you have the last command to install openHAB

apt install openhab -y

When it’s all finished, you just need to start openHAB.

This following line will not only start openHAB, but will start it every time the N2 boots

systemctl enable openhab --now

About 5 minutes later, you can swap to your bigger computer and access openHAB via a web browser

If you’re unsure of the IP address of the N2, just look at the header on screen of the N2 when you boot it.

If you need more information, just read the installation instructions carefully or search this forum.

Good luck

3 Likes