Created
March 27, 2022 20:57
-
-
Save Gh61/34091169b4051e514fb9bf397f349372 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This guide will go over how to install Home Assistant (Supervised) on Rasbian. | |
Pre-installation Steps | |
Step 1: Becoming Root | |
Before we start, you must make sure you are logged in as root, so in order to become root type: | |
----------------------------------- | |
sudo su | |
----------------------------------- | |
Before preceding, confirm you are root by typing: | |
----------------------------------- | |
whoami | |
----------------------------------- | |
You must be root in order to continue | |
Step 2: Updating your System | |
Before starting it is a good idea to update your system, to do so enter the three following commands: | |
----------------------------------- | |
apt-get update | |
apt-get upgrade -y | |
apt-get dist-upgrade -y | |
----------------------------------- | |
Step 3: Install Dependency’s | |
Install all the required dependency’s with the following command: | |
----------------------------------- | |
apt-get install \ | |
jq \ | |
wget \ | |
curl \ | |
udisks2 \ | |
libglib2.0-bin \ | |
network-manager \ | |
dbus -y | |
----------------------------------- | |
Step 4: Reboot | |
It might be needed to reboot. So for sure make the reboot: | |
----------------------------------- | |
reboot | |
----------------------------------- | |
After the device started, log again as root `sudo su` and continue... | |
Step 1: Install The Docker Engine | |
1. Run the Docker CE installation script | |
Simply run the Docker CE for Linux installation script: | |
----------------------------------- | |
curl -fsSL get.docker.com | sh | |
----------------------------------- | |
2. Test your Docker Install (Optional) | |
To test your docker install run the hello-world script: | |
----------------------------------- | |
docker run hello-world | |
----------------------------------- | |
If Docker is working correctly the following message will be displayed: | |
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. | |
(amd64) | |
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. | |
To try something more ambitious, you can run an Ubuntu container with: | |
$ docker run -it ubuntu bash | |
Share images, automate workflows, and more with a free Docker ID: | |
https://hub.docker.com/ | |
For more examples and ideas, visit: | |
https://docs.docker.com/get-started/ | |
Step 2: Install Home Assistant | |
Installing Home Assistant is easy simply follow these steps | |
1. Install the OS Agent | |
The OS Agent allows the Home Assistant Supervisor to communicate with D-Bus and will soon be required | |
To Install it simply use the follow commands: | |
----------------------------------- | |
wget https://github.com/home-assistant/os-agent/releases/download/1.2.2/os-agent_1.2.2_linux_armv7.deb | |
dpkg -i os-agent_1.2.2_linux_armv7.deb | |
----------------------------------- | |
Of course being sure you replace `os-agent_1.2.2_linux_armv7.deb` with the latest version which matches your CPU architecture. | |
Available at the GitHub Releases page (https://github.com/home-assistant/os-agent/releases/latest) | |
2. Run the Home Assistant Install Script | |
Now that you are root simply run these commands to download and install Home Assistant Supervised: | |
----------------------------------- | |
wget https://github.com/home-assistant/supervised-installer/releases/latest/download/homeassistant-supervised.deb | |
dpkg -i homeassistant-supervised.deb | |
----------------------------------- | |
3. The script may fail on some error like missing file /etc/default/grub | |
We need to edit post-installation script. | |
The script is located on path: /var/lib/dpkg/info | |
And we need to comment failing lines | |
1. Open the file: | |
----------------------------------- | |
cd /var/lib/dpkg/info | |
nano homeassistant-supervised.postinst | |
----------------------------------- | |
2. Find these lines (almost at the end) and comment them (add '#' before every line) | |
----------------------------------- | |
# Switch to cgroup v1 | |
#if ! grep -q "systemd.unified_cgroup_hierarchy=false" /etc/default/grub; then | |
# info "Switching to cgroup v1" | |
# cp /etc/default/grub /etc/default/grub.bak | |
# sed -i 's/^GRUB_CMDLINE_LINUX_DEFAULT="/&systemd.unified_cgroup_hierarchy=> | |
# update-grub | |
# touch /var/run/reboot-required | |
#fi | |
----------------------------------- | |
3. Now run | |
----------------------------------- | |
apt-get -f install | |
----------------------------------- | |
This will run the failed installation again and this time it will all proceed wihout error. | |
4. Make another 'reboot' | |
... and after some time Home Assistant will be running with supervisor support. | |
(Observer will say it's unsupported system - because of some missing parts, but it's working) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment