Migrate Home Assistant to Orange Pi 5

Orange Pi 5 running Home Assistant
Orange Pi 5 running Home Assistant

I’ve been running my Home Assistant instance on a very old Tinker Board S with a 16GB eMMC. This has been working fine for a month or two but I recently started getting notifications that my Home Assistant instance was out of drive space. Sure enough, even after removing all of my backups there is almost no space left.

I’ve already received reports from my readers about how much better of an experience Home Assistant is running on an Orange Pi 5. Not only is the CPU much more powerful than something like a Raspberry Pi 4 or Tinker Board S but it has a NVMe storage slot. These two things combined make it a great choice for running your Home Assistant instance.

My previous install is a core installation but I’m going to use supervised on the Orange Pi 5. In this guide I’ll show you how I migrated my instance step by step and evaluate the performance improvement at the end. Let’s get started!

Hardware Used

Orange Pi 5 - Top View
Orange Pi 5

The Orange Pi 5 the latest release from Orange Pi and is the most powerful model yet. It has a 6 core CPU and options from 4GB of RAM all the way up to 32GB of RAM!

Links: Amazon.com*, AliExpress*, Amazon.ca*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*, Amazon.nl*, Amazon.pl*

Geekworm Copper Heatsink Set
Geekworm Copper Heatsink Set

The Geekworm copper heatsink set is designed to fit many different single board computers. It uses thermal conductive adhesive which many “cheap” heatsink kits for SBCs don’t have. Eliminates hotspots and reduces throttling. Can be further enhanced by powered cooling over the heatsinks.

Links: Amazon.com*, Amazon.ca*, Amazon.co.jp*, Amazon.co.uk*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*

Kioxia 2230 M2 NVMe Drive
Kioxia 2230 M2 NVMe Drive

The Kioxia (Toshiba) 128GB M.2 2230 PCIe NVMe drive is much shorter than most NVMe drives (full size is 2280). It fits great with single board computers / tablets / other smaller form factors.

Links: Amazon.com*, Amazon.ca*, Amazon.co.uk*, Amazon.co.jp*, Amazon.com.au*, Amazon.de*, Amazon.es*, Amazon.fr*, Amazon.it*, Amazon.nl*, Amazon.pl*, Amazon.se*, Amazon.sg*

Backup Instance

The first thing we need to do is back up your existing Home Assistant installation. To do this go to Settings->System->Backups.

I recommend creating a fresh one right at the time you do your migration. Click “+ Create backup” in the bottom right of the screen. Choose to do a full backup.

Once it’s done click on the backup and you should see this screen:

Home Assistant - Backup
Home Assistant – Backup

Click the 3 dots in the bottom right of the popup to get an option to download the full backup. Go ahead and download a copy now for us to restore later.

Orange Pi 5 Configuration

Installing Dependencies

I first recommend becoming root with:

sudo su

Now install the dependencies with:

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

Install OS Agent

Check what the latest version of the OS Agent is here at their GitHub page. At time of writing it was 1.5.1. You should update the commands below with the latest version from the GitHub page instead of 1.5.1. Download the aarch64.deb version.

We’re now going to install the Home Assistant OS Agent with:

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

Docker is required as well. To install it:

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

Install Supervisor

Next up is the Home Assistant supervisor. We can install the latest version with:

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

Choose raspberrypi4-64 as the type in the menu that comes up.

Trick Supervisor to install on Armbian/Ubuntu (optional)

Recently I moved my installation to Armbian using Ubuntu. I did this by editing /etc/os-release:

PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.2 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

If you are having trouble installing the homeassistant-supervised.deb package try changing the PRETTY_NAME in your /etc/os-release file like I am showing above. This tricks the supervisor into thinking you are running the correct operating system. I have not experienced any problems doing this with Armbian.

If you are using Armbian then when you reach the “Configure orangepienv.txt” section below your file will actually be armbianEnv.txt. You should put the extraargs in that step in /boot/armbianEnv.txt instead of /boot/orangepienv.txt.

Change Hostname (optional)

I wanted to give my Orange Pi 5’s installation the exact same host name as my core Home Assistant installation. To do this you can use this command:

sudo hostnamectl set-hostname homeassistant

I also changed the static lease in my router to point to the Orange Pi with the old IP address instead of the Tinker Board S.

Configure orangepienv.txt

We need to make some changes to the kernel boot parameters so that you don’t receive warnings related to AppArmor. Add the following line to the bottom of /boot/orangepiEnv.txt:

extraargs=apparmor=1 security=apparmor systemd.unified_cgroup_hierarchy=false systemd.legacy_systemd_cgroup_controller=false

Now reboot the Orange Pi with:

sudo reboot

Restore Backup

Now you should be able to navigate in your browser to your Home Assistant IP address on port 8123 with:

http://192.168.X.X:8123

You should see this screen:

Home Assistant - Restore
Home Assistant – Restore

Click to restore from a backup as I’ve circled in the screenshot above. Choose your backup you downloaded earlier.

You’ll get a confirmation on whether you’d like to wipe the device and restore the backup. Confirm your choice and it will begin restoring the backup.

Final Result

Home Assistant - Unsupported
Home Assistant – Unsupported

Since I used Armbian I get a “Unsupported system – Operating System” warning. You can safely ignore this warning honestly. They even give you an “Ignore” option.

The Armbian distribution is based on Debian Bullseye so I am not expecting any problems from this.

Everything is back to how it was:

Home Assistant - Final Result
Home Assistant – Final Result

Recompiling my devices in things like ESPHome is *much* faster now. I never doubted it because the tips my readers give me are usually outstanding.

I also now have access to NVMe storage which is not only much faster but much larger than my Tinker Board’s built in eMMC. I don’t expect my Orange Pi 5’s 128GB drive to get filled up very quickly but if it does I’ll put one of my 512GB or 1TB modules in there. This process was easy enough that swapping out the drive wouldn’t be too big of a deal (even reinstalling the OS).

I highly recommend the Orange Pi 5 as a Home Assistant host and will be keeping mine on there!

Other Resources

I’ve also covered how to install Steam on the Orange Pi 5 here

Make sure to check out my Orange Pi 5 review here

I’ve also made a smart button and a smart one-key action key for Home Assistant

You can see all of my Home Assistant related articles here

Subscribe
Notify of
guest

40 Comments
Inline Feedbacks
View all comments
Mario
Mario
1 year ago

sorry I meant to say Container and no Core …

Mario
Mario
1 year ago

I have stopped using HA supervised … They turning into Apple, not allowing other software/docker images than the ones they approve of. I go now with HA core and watchtower for updating.

TuzoGT
TuzoGT
1 year ago

Hello, I have HA running on an RPi4 on a 128GB NVMe,the power consumption on it is around 6,5W. On my Orange Pi 5,with the same Nvme and running only PiHole it consumes 2w. How much watt is your OP5 with HA consuming? Thank you

TuzoGT
TuzoGT
1 year ago

Thank you, that’s really awesome. I will try your tutorial with the containers. I just bought another OPi5, I just like to run HA, PiHole and OMV (Rock 5 with 2TB NVMe with 4,5W btw…) on separate sbc’s, so I can shut them down remotely and separately via shelly smart plugs.

TuzoGT
TuzoGT
1 year ago

Hey James,
so my OPi5 is running HA flawlessly. The power consumption ist just around 1,9-2,1 watt. Thank you for your detailed instructions.

Razor Burn
Razor Burn
1 year ago

Hi James,

Thanks for posting this tutorial as you convinced me to swap over from a RPi 4B to the OPi 5 and so far its very stable and doesn’t cut out my wireless network like the RPi did.

I’m certain the 16GB RAM is overkill but it should allow me to grow my setup as I start integrating new devices and just as well as I have some more ESP32 gear on the way.

Jimmy
Jimmy
1 year ago

Could this be done on the orange pi3 LTS?
I can’t seem to find any information on it .. I can install for but I want supervised version

Thanks

Jimmy
Jimmy
1 year ago
Reply to  Jimmy

I did the install and got an error saying it didn’t support Ubuntu 22.4.0.. what version of Ubuntu should I be running?
Thanks

Jimmy
Jimmy
1 year ago

Am I supposed to be running docker? or is this stand alone?
and I really want to thank you for your help!!

Jimmy
Jimmy
1 year ago

arn]
[warn] If you want more control over your own system, run
[warn] Home Assistant as a VM or run Home Assistant Core
[warn] via a Docker container.
[warn]
Adding 'diversion of /etc/NetworkManager/NetworkManager.conf to /etc/NetworkManager/NetworkManager.conf.real by homeassistant-supervised'
Adding 'diversion of /etc/NetworkManager/system-connections/default to /etc/NetworkManager/system-connections/default.real by homeassistant-supervised'
Adding 'diversion of /etc/docker/daemon.json to /etc/docker/daemon.json.real by homeassistant-supervised'
Adding 'diversion of /etc/network/interfaces to /etc/network/interfaces.real by homeassistant-supervised'
Unpacking homeassistant-supervised (1.4.2) ...
dpkg: dependency problems prevent configuration of homeassistant-supervised:
homeassistant-supervised depends on docker-ce; however:
Package docker-ce is not installed.
this is the message i receivedwhen i dpkg

Jimmy
Jimmy
1 year ago
Reply to  Jimmy

I don’t mind running docker ..if i was able to find it.. every install I’ve tried ties back to docker.com and it returns file not found

thanks Jimmy

Jimmy
Jimmy
1 year ago
Reply to  Jimmy

i was able to get it running …the problem now is docker doesnt have any ports assigned to homeassistant so i cant actually see that its running but docker says it is

thanks Jimmy

Roy
Roy
1 year ago

Bonjour,

Merci pour votre post
J’ai acheté un orangepi5
J’ai essayé d’installer HA sur OS debian 11 mais au moment d’installer le dpkg -i homeassistant-supervised.deb j’ai une erreur .. j’ai choisi l’os agent armv7 ? Est ce la mon erreur ?
Qu’avez vous choisi comme image pour le système d’exploitation de l’orange Pi svp ?

Cordialement
E.Roy

michael
michael
1 year ago

I am completely new to homeassistant in SBCs. Is it possible to install Home Assistant core on orange pi 5? If so can you provide a little guidance with that.