Installing Home Assistant Supervised on Orange Pi 3B

I installed Home Assistant supervised on an Orange Pi 3B one week ago. So far so good, here’s the story.

This is not an officially supported solution.

Why
I was trying to find a sweet spot to run Home Assistant with all features on a dedicated system. I only want to run core home automation logic on this system, and use separate hardware for advanced and exotic services.
I believe that Orange Pi provides a good alternative to Raspberry Pi in general and looking at other reference hardware, I believe that the OrangePi 3B provides all I should need at a very reasonable price.

Hardware: OrangePi 3B

  • OrangePi 3B
  • 64Gb eMMC (the official module for Orange Pi 5 Plus / Orange Pi 3B*)

Total cost $50 including case (below), which is half the price of the Home Assistant green with exactly the same specs (I have more eMMC)
Bonus: the OrangePi 3B also comes with Wifi and Bluetooth interface (and antenna which is typically not pictured).

OS: Armbian
It’s specialized for ARM boards and likely to provide the best performance for Home Assistant on your Orange Pi 3B.
It won’t be officially supported by Home Assistant, but only vanilla Debian is anyway, the Debian distro for Orange Pi would be our next best choice, that should be close enough.

Accessoires
Case: Used this aluminium case Geekworm Orange Pi 3B Case with Fan & Heatsink (N510) which costs less than USD $10 and is really nice. But the fan is noisy and not usefull for this use case, so I removed it. If I were to add one, I would go for a JST 1.25mm 2-pin so I can use the dedicated plug on the Orange Pi board.

Zigbee dongle: Sonoff ZBDongle-E

1. Install Arabian on Orange Pi 3B eMMC
Debian-based Bookworm latest release at the time. Download here: Orange Pi 3B – Armbian

  • Used Balena Etcher
  • First boot HDMI output not working but found on network (ETH wired to my rooter)
  • ssh in with root/1234

Change root password and all…

2. Copy OS to eMMC

With root user:
/usr/sbin/nand-sata-install

Select ext4 file system.
Shut down after install.

** 3. System upgrade**

sudo apt-get update
sudo apt-get upgrade
reboot

4. Firmware Update and restart
Use the armbian-config utility to update the firmware:

armbian-config

In the interactive menu, select System>Firmware

Ready to go!

5. Install Home Assistant Supervised
Installed logged in as root

5.1 Update the OS name
Only Debian is supported by HA supervised, so we need to fake the OS name, otherwise install will fail on check:

in /etc/os-release update ARMBIAN_PRETTY_NAME:
ARMBIAN_PRETTY_NAME="Debian GNU/Linux 12 (bookworm)

5.2 Give a host name if you like
hostnamectl set-hostname yourhomeassistant

5.3 Configure AppArmor and cgroupv1
I am not going to explain what and why, this has beed discussed here before (see links below).

apt install apparmor
echo "extraargs=apparmor=1 security=apparmor systemd.unified_cgroup_hierarchy=false systemd.legacy_systemd_cgroup_controller=false" >> /boot/armbianEnv.txt
update-initramfs -u
reboot

Check if that worked:

systemctl status apparmor.service
aa-status

5.4 Install Home Assistant Supervised
Essentially follow the official instructions there: GitHub - home-assistant/supervised-installer: Installer for a generic Linux system.

Install dependencies:
apt-get install jq wget curl udisks2 libglib2.0-bin network-manager dbus apparmor-utils systemd-journal-remote lsb-release systemd-resolved -y

Install OS Agent:

wget https://github.com/home-assistant/os-agent/releases/download/1.5.1/os-agent_1.5.1_linux_aarch64.deb
dpkg -i os-agent_1.5.1_linux_aarch64.deb

Install Docker CE:

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh ./get-docker.sh

Install Home Assistant Supervisor:

wget https://github.com/home-assistant/supervised-installer/releases/latest/download/homeassistant-supervised.deb
dpkg -i homeassistant-supervised.deb

Chose raspberrypi4-64

After a few minutes on port :8123, I get the “Preparing Home Assistant” screen.

Installs in about 5mn

6. Post installation fixes

I have two issues after installation

  • Unhealthy system - Unprivileged
  • Unsupported system - systemd-resolved issues

…Which I think was really one and was resolved by enabling systemd-resolved.service and a network restart:

systemctl enable systemd-resolved.service
systemd-resolve --flush-caches
/etc/init.d/networking restart
reboot

7. Connect to a wifi network
Well, since we have wifi, let’s see if it works.
List the wifi networks available where I am with:
nmcli dev wifi list

And connect to your network:
nmcli dev wifi connect '<SSID>' password '<PASSWORD>'

Summary

No warnings, freeze or unexpected behaviour. The system takes about 20 seconds to boot and one minute start all Home Assistant services.
I haven’t deployed a full scale home automation yet, but I have been playing around quite a bit with the system, countless plugin install and sudden restarts, nothing I can complain about…

I hope someone find this helpful and any feedback is welcome!

6 Likes

I forgot… Credit and references:

  • James A. Chambers blog: Migrate Home Assistant to Orange Pi 5
  • Renato Costa gist: Installing Home Assistant on Orange Pi 5

Sorry, I can’t place the links here it seems, but it shouldn’t be too difficult to find them! :wink:

2 Likes

Thanks for the great step by step.

@madHatter

Which of the interfaces below did you download?

My pleasure! :slight_smile:
Go for the CLI (we don’t need a desktop), Bookworm (Debian-based).

Many thanks!
Worked like a charm on a Odroid C2

1 Like

@madHatter do you know how can I solve this error that happens when I try to restore the backup?

BackupManager.do_restore_full' blocked from execution, no host internet connection

On my Odroid HC4 I haven’t /etc/init.d/networking

@Tony2k Can you ping a website like google.com? I’ve been trying to do the same thing with a real Debian image on my Orange Pi Zero, but when I install systemd-resolved it breaks DNS lookups.

Hi @madHatter . As I mentioned above I’m trying to do this on Orange Pi Zero. The systemd-resolved issue does present itself, but your fix doesn’t work because there’s no systemd-resolve executable available in any package. This is the output of apt-file search systemd-resolve:

homeassistant@homeassistant:~$ apt-file search systemd-resolve
aide-common: /usr/share/aide/config/aide/aide.conf.d/31_aide_systemd-resolved
dracut-core: /usr/lib/dracut/modules.d/01systemd-resolved/module-setup.sh
dracut-core: /usr/lib/dracut/modules.d/01systemd-resolved/resolved-tmpfile-dracut.conf
manpages-de: /usr/share/man/de/man8/systemd-resolved.8.gz
manpages-de: /usr/share/man/de/man8/systemd-resolved.service.8.gz
manpages-zh: /usr/share/man/zh_CN/man1/systemd-resolve.1.gz
manpages-zh: /usr/share/man/zh_TW/man1/systemd-resolve.1.gz
openvpn-systemd-resolved: /etc/openvpn/update-systemd-resolved
openvpn-systemd-resolved: /usr/share/doc/openvpn-systemd-resolved/README.md.gz
openvpn-systemd-resolved: /usr/share/doc/openvpn-systemd-resolved/changelog.Debian.gz
openvpn-systemd-resolved: /usr/share/doc/openvpn-systemd-resolved/changelog.gz
openvpn-systemd-resolved: /usr/share/doc/openvpn-systemd-resolved/copyright
openvpn-systemd-resolved: /usr/share/doc/openvpn-systemd-resolved/update-systemd-resolved.conf
systemd-resolved: /lib/systemd/system/systemd-resolved.service
systemd-resolved: /lib/systemd/systemd-resolved
systemd-resolved: /usr/lib/sysusers.d/systemd-resolve.conf
systemd-resolved: /usr/lib/tmpfiles.d/systemd-resolve.conf
systemd-resolved: /usr/share/bash-completion/completions/systemd-resolve
systemd-resolved: /usr/share/doc/systemd-resolved/NEWS.Debian.gz
systemd-resolved: /usr/share/doc/systemd-resolved/changelog.Debian.gz
systemd-resolved: /usr/share/doc/systemd-resolved/copyright
systemd-resolved: /usr/share/lintian/overrides/systemd-resolved
systemd-resolved: /usr/share/man/man8/systemd-resolved.8.gz
systemd-resolved: /usr/share/man/man8/systemd-resolved.service.8.gz

That file is an executable (on my debian system)

Try

file /lib/systemd/systemd-resolved

Thanks @nickrout. It seems I can run that executable (the file command also shows it as executable), but it does not accept the --flush-caches parameter.

jodie@debian:~$ /lib/systemd/systemd-resolved --flush-caches
/lib/systemd/systemd-resolved: unrecognized option '--flush-caches'

No ‘d’ on the end of the command, ie

/lib/systemd/systemd-resolve --flush-caches

Thanks @nickrout . Unfortunately that binary does not exist.

jodie@debian:~$ /lib/systemd/systemd-resolve --flush-caches
-bash: /lib/systemd/systemd-resolve: No such file or directory

I have installed pure debian on my Orange Pi Zero again and it has a script called systemd-resolve at /usr/share/bash-completion/completions/systemd-resolve. When catting that file it doesn’t seem to have the --flush-caches option, but I marked it as executable and ran it anyway.

Unfortunately even after this I cannot seem to start supervisor (using sudo docker run ghcr.io/home-assistant/armv7-hassio-supervisor), which complains that it can’t find SUPERVISOR_SHARE, SUPERVISOR_NAME or “any kind of machine/homeassistant details”, nor can it find a Docker socket. If I can’t figure this out I’ll post a new thread.

resolvectl flush-caches seems to work

Hi, Sorry… I have been away for a while… No, I never faced this issue. Did you get it to work?

Hi, sorry, I have been away for a while… This is strange that you don’t have the systemd-resolve in the first place… What version of Armbian did you use?

Have you seen this post? (I didn’t look into the details, but it looks suspiciously similar).

I can’t remember, but it was one directly off Armbian’s website for the Orange Pi Zero. I’ve since installed pure Debian. I then installed systemd-resolved normally and had to run nmtui and set the network back to DHCP (For some reason installing systemd-resolved sets network-manager to a static IP address).

1 Like