A guide to a supervised install
This guide describes how I installed home assistant, on top of Debian 11 for the Odroid M1. I used steps described by others, and altered the sequence of steps to take, to get a supervised homeassistant install on the M1, that runs in ‘supported’ mode.
I hope this helps you. all the best!
Step by step installation
installing Debian 10
To get this to work you need to first install debian 10 first unfortunately, since the M1 default debian 11 installation is not stable enough yet in my experience; the default debian 11 having DNS issues that prevented proper operation of HomeAssistant.
configure eth0 in de boot options
exit petitboot and enter on the command line:
udhcpc
netboot_default
exit
You should now see preselectable installation options.
Select the Debian 10 option and check the log (press l)
Await the boot process of Debian 10 installer.
Install ubuntu server with ssh server. And continue with the following:
Add the user to the sudo group:
su -
usermod -aG sudo <your username>
exit
log out and log in again to make sure you have sudo privileges
sudo apt update && sudo apt upgrade
installing home assistant supervised
sudo -i
Step 1: Install the following dependencies with this command:
apt-get install \
apparmor \
jq \
wget \
curl \
udisks2 \
libglib2.0-bin \
network-manager \
dbus \
lsb-release \
systemd-journal-remote -y
Remove modem manager
sudo systemctl disable ModemManager
sudo apt-get purge modemmanager
Install AppArmor:
sudo apt update && sudo apt -y install apparmor
Add AppArmor and cgroup as Linux kernel boot parameter (else HA wil give a warning about it):
Add the following kernel parameters to the /etc/default/grub
file:
systemd.unified_cgroup_hierarchy=false apparmor=1 security=apparmor
And commit the changes to the boot
sudo update-grub
Reboot and find out if AppArmor is enabled (returns Y if true):
cat /sys/module/apparmor/parameters/enabled
Step 2: Install Docker-CE with the following command:
sudo -i
curl -fsSL get.docker.com | sh
Step 2b: Upgrade to Debian 11
To completely update the system issue the following command as root
or with the ‘sudo‘ utility:
sudo apt update
sudo apt upgrade
sudo apt full-upgrade
sudo apt --purge autoremove
Once updates finish, you need to reboot the system to apply the kernel and other updates:
sudo systemctl reboot
Now it is time to do is prepare the system to look at the new repositories for ‘Bullseye‘. Assuming a standard /etc/apt/sources.list file.
First, make sure to backup sources.list file and then do changes as shown.
sudo cp -v /etc/apt/sources.list /root/
sudo nano /etc/apt/sources.list
The next step now is to refresh the list of packages available for installation.
sudo apt update
Once the utilities have updated the list of packages, it is time to start the upgrade from Debian 10 to Debian 11 process.
sudo apt full-upgrade
As with the fresh Debian 11 install, it is suggested that the user let the system run the upgrade and periodically check in on it as this process will take some time. When it finishes, simply reboot the machine and enjoy Debian 11 in all of its wonder!.
sudo systemctl reboot
After reboot, make sure to verify the upgrade.
uname -r
lsb_release -a
Continue installing supervised home assistant
sudo -i
Step 3: Install the OS-Agent:
Download the latest Debian package from OS Agent GitHub release page at:
https://github.com/home-assistant/os-agent/releases/latest
wget <url>/os-agent_x.x.x_linux_aarch64.deb
(in my case:)
wget https://github.com/home-assistant/os-agent/releases/download/1.4.1/os-agent_1.4.1_linux_aarch64.deb
Next, install (or update) the downloaded Debian package using:
sudo dpkg -i os-agent_x.x.x_linux_aarch64.deb
Note: Replace the deb file in the above example with the file you have downloaded from the releases page.
You can test if the installation was successful by running:
gdbus introspect --system --dest io.hass.os --object-path /io/hass/os
This should not return an error. If you get an object introspection with interface
etc. OS Agent is working as expected.
You might need to install libglib2.0-bin
to get the gdbus
command.
Step 4: Install the Home Assistant Supervised Debian Package:
Execute step 4 (install homeassistant-supervised.deb) of the HA github tutorial and select ODROID N2 and reboot after that (give it some time before the reboot).
After the reboot just wait for it and then access HA via the url. (Port 8123)
wget https://github.com/home-assistant/supervised-installer/releases/latest/download/homeassistant-supervised.deb
dpkg -i homeassistant-supervised.deb