How to install Hass.io on Armbian Bionic OS

How to install Hass.io on Armbian Bionic OS

Summary:

The article contains whole manual how to install Hass.io instance on Armbian with ARM-64 architecture.

Hass.io is Home-Assistant instance running inside docker containers and has included Hass.io add-on store what brings nice easy way to extend Home-Assistent functionality.

Hardware – board

The list of supported Armbian boards is really long and just choose. And a complete list is available in the download section on the web Armbianu.

I’ll show you steps for two of them that I physically own.

1. Orange Pi Zero Plus 2

First board in very small – dimension only 50x50mm and for many cases it could be sufficiently powerful.

I’ts good options when you want to try or test something, but you will sooner or later find its limits.

Main technical specifications

  • H5 CPU with 512 MB DDR3
  • SD + eMMC (on board 8GB)
  • WiFi 2.4 GHz
  • HDMI

Where to buy

2. NanoPi M4

Second board is still small – approx as credit card, but more powerful. It has double CPU with 6 cores together and memory could be 4 GB of RAM.

It’s good option when you need more powerfull device for longer term.

Main technical specifications

  • RK3399 CPU with 2/4 GB DDR3
  • SD + eMMC (both as socket)
  • WiFi 2.4 + 5 GHz
  • HDMI 2.0

Where to buy

Let me know in comment if you have different board supported by Armbian and you are happy with it.

Armbian OS

Armbian OS is Linux based operating system focusing ARM development boards.

1. Download image

Visit Armbian website and go to the download section where you have to click on your board and then you usually have two versions available for download:

  • Armbian Bionic – includes Ubuntu 18.04
  • Armbian Stretch – includes Debian 9

It’s up to you what version you prefer – I am usually select Ubuntu Bionic, because have more experiences with Ubuntu then Debian – but they are very similar.

2. Burn image to SD card

I recommend using Ether.io as it is easy to use and works on all major operating systems.

The burning process consists of three steps:

  1. Selecting disk image – find image you downloaded
  2. Selecting drive with SD card
  3. Flash it into SD card

3. Run Armbian OS

The last step to make Armbian OS running is put SD card inside SD slot and power your board.

You will be asked to login – use this credential: root / 1234 (it’s default root user and password for Armbian OS).

If you want create your own user or only change password for root and then I recommend to do update for all packages:

sudo apt update && sudo apt upgrade

I recommend to set up remove connection via SSH. You can do it in armbian-config tool.

Docker CE

Docker is a kind of virtualization to make service reusable and manageable via. prepared Docker images.

1. Add Docker’s official GPG key

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

2. Setup correct repository

According to architecture version we will need to setup correct Docker repository. Both mentioned boards have same architecture aarch64. If you are not sure what architecture is used on your computer use command:

uname -m

For our case we will use the command to add a repository:

sudo add-apt-repository \
   "deb [arch=arm64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"

3. Install Docker CE

sudo apt-get install docker-ce docker-ce-cli containerd.io

4. Verify Docker is installed correctly

We will use hello-world image.

sudo docker run hello-world

If everything is installed correctly then we should see the following on the screen:

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (arm64v8)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

Hass.io

1. Install prerequisites

Actually list of prerequisites is short – three items, so let’s install it:

sudo apt install jq avahi-daemon apparmor

2. Download installation script

From HomeAssistant repository we need to get installation script. We could save file itself directly by entering command:

curl -sL https://raw.githubusercontent.com/home-assistant/hassio-build/master/install/hassio_install > hassio_install

And make the script runnable:

chmod 775 ./hassio_install

3. Run installation

As with Docker, you will need to set up the installation according to your computer’s architecture. We have to setup -m parameter to one of these values:

  • intel-nuc
  • odroid-c2
  • odroid-xu
  • orangepi-prime
  • qemuarm
  • qemuarm-64
  • qemux86
  • qemux86-64
  • raspberrypi
  • raspberrypi2
  • raspberrypi3
  • raspberrypi3-64
  • tinker

For our case we will use value qemuarm-64, so command for installation will be:

./hassio_install -m qemuarm-64

And on your screen you should see:

[Info] Install supervisor Docker container
[Info] Install supervisor startup scripts
Created symlink /etc/systemd/system/multi-user.target.wants/hassio-supervisor.service → /etc/systemd/system/hassio-supervisor.service.
[Info] Install AppArmor scripts
Created symlink /etc/systemd/system/multi-user.target.wants/hassio-apparmor.service → /etc/systemd/system/hassio-apparmor.service.
[Info] Run Hass.io

4. Finishing installation

After a few minutes after installation script is finished – docker have to start all images – enter this address in your browser: http://<YourBoardMachineIP>:8123 and you should see preparing screen.

… and after creating account and login you will see welcome screen. I already have a couple of items automatically because using ESPHome and it’s automatically added to all HomeAssistents in local network.

That’s all. Let me know if you wll stuck anywhere.

Join the discussion

5 comments