-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hass.io Installation Fails #442
Comments
No, how you've reported the problem is fine. I've also run into issues with Hass.io which I have traced to the script behind the "native installs" no longer working. I had borrowed the IOTstack script for PiBuilder. I was doing a test build with Bullseye which wouldn't work. I repeated the test with Buster and that wouldn't work either. I was really confused because it wasn't all that long ago that it "worked" (and I still have the running system to prove it). But it turns out the IOTstack "native installs" script was borrowed from somewhere else and that, in turn, was borrowed from yet another place. Meanwhile, over at Home Assistant, the whole approach to installation seems to have changed to be based on
I'm still in the process of testing a revamped solution for PiBuilder but, thus far, it works for both Buster and Bullseye, at least in the sense that HA installs and the containers come up OK.
If you're in a hurry, you could start with this: #!/usr/bin/env bash
# should not run as root
[ "$EUID" -eq 0 ] && echo "This script should NOT be run using sudo" && exit -1
# the name of this script is
SCRIPT=$(basename "$0")
if [ "$#" -gt 0 ]; then
echo "Usage: $SCRIPT"
exit -1
fi
# has the user asked for home assistant?
if [ "$HOME_ASSISTANT_SUPERVISED_INSTALL" = "true" ] ; then
# yes! use a default release if not otherwise provided
HOME_ASSISTANT_AGENT_RELEASE="${HOME_ASSISTANT_AGENT_RELEASE:-"1.2.2"}"
# check how the hardware describes itself
case "$(grep "^Model[ :]*" /proc/cpuinfo | cut -c 10-23)" in
"Raspberry Pi 3" )
HINT="raspberrypi3"
;;
"Raspberry Pi 4" )
HINT="raspberrypi4"
;;
*)
echo "Home Assistant Supervised Install is enabled but this hardware does not"
echo "identify as either Raspberry Pi 3 or 4. Either this configuration is not"
echo "supported by Home Assistant or has not been tested for PiBuilder. If you"
echo "wish to try anyway, modify this script to include your hardware in this"
echo "case statement."
exit 1
;;
esac
# the agent is ALWAYS armv7 - aarch64 does not work
# dpkg: error processing archive /tmp/Imx1h-DOWNLOADS/os-agent_1.2.2_linux_aarch64.deb (--install):
# package architecture (arm64) does not match system (armhf)
AGENT="os-agent_${HOME_ASSISTANT_AGENT_RELEASE}_linux_armv7.deb"
echo -e "\n\n\n========================================================================\n"
echo "Hint: during Home Assistant installation, please choose:"
echo " \"$HINT\""
echo " at the \"Select machine type\" prompt"
echo -e "\n========================================================================\n"
sleep 5
# construct a temporary directory to download into
DOWNLOADS=$(mktemp -d /tmp/XXXXX-DOWNLOADS)
# construct the URLs to download from
AGENT_URL="https://github.com/home-assistant/os-agent/releases/download/$HOME_ASSISTANT_AGENT_RELEASE/$AGENT"
PACKAGE_URL="https://github.com/home-assistant/supervised-installer/releases/latest/download/homeassistant-supervised.deb"
# define what we will be downloading
AGENT_DEB="$DOWNLOADS/$AGENT"
PACKAGE_DEB="$DOWNLOADS/homeassistant-supervised.deb"
# try to download the agent
wget -O "$AGENT_DEB" "$AGENT_URL"
# did the agent download succeed?
if [ $? -eq 0 -a -e "$AGENT_DEB" ] ; then
# yes! attempt to download the package
wget -O "$PACKAGE_DEB" "$PACKAGE_URL"
# did the package download succeed?
if [ $? -eq 0 -a -e "$PACKAGE_DEB" ] ; then
# yes! install dependencies
echo "Installing Home Assistant dependencies"
sudo apt install -y \
apparmor \
apparmor-profiles \
apparmor-utils \
apt-transport-https \
avahi-daemon \
ca-certificates \
curl \
dbus \
jq \
libglib2.0-bin \
software-properties-common \
udisks2 \
wget \
network-manager
# install Docker
echo "Installing docker"
curl -fsSL https://get.docker.com | sudo sh
# iterate home assistant components
echo "Installing Home Assistant"
for DEB in "$AGENT_DEB" "$PACKAGE_DEB" ; do
sudo dpkg -i "$DEB"
if [ $? -ne 0 ] ; then
echo "Unable to install Home Assistant package $DEB. Try running:"
echo " gdbus introspect --system --dest io.hass.os --object-path /io/hass/os"
break
fi
done
else
# no! did not succeed in downloading package
echo "Unable to download Home Assistant package from $PACKAGE_URL"
fi
else
# no! did not succeed in downloading agent
echo "Unable to download Home Assistant agent from $AGENT_URL"
echo " HOME_ASSISTANT_AGENT_RELEASE=$HOME_ASSISTANT_AGENT_RELEASE"
echo "Is that still correct? Check:"
echo " https://github.com/home-assistant/os-agent/releases/latest"
echo "then set HOME_ASSISTANT_AGENT_RELEASE in $USEROPTIONS"
echo "and retry $SCRIPT."
fi
# clean up
rm -rf "$DOWNLOADS"
else
# otherwise just install Docker
echo "Installing docker"
curl -fsSL https://get.docker.com | sudo sh
fi
echo "Setting groups required for docker and bluetooth"
sudo usermod -G docker -a $USER
sudo usermod -G bluetooth -a $USER
echo "Installing docker-compose and IOTstack dependencies"
sudo pip3 install -U docker-compose
sudo pip3 install -U ruamel.yaml==0.16.12 blessed
# reboot (applies usermods and any network manager change)
echo "$SCRIPT complete - rebooting..."
sudo reboot That installs Hass.io, Docker and Docker-Compose plus everything needed for IOTstack to work. Assuming you gave the script a name like
The script displays a "hint" recommending choosing either "raspberrypi3" or "raspberrypi3" when the HA installer asks. I've found that the "-64" variants don't work. It also seems to be problematic to be running the 64-bit kernel while running this script. My take-home is that switching to the 64-bit kernel should be the last step, not the first. Hope this helps. If you try the script, I'd appreciate feedback, whether it works or fails. Do please note that there is an underlying assumption (made by Home Assistant) that Docker is not installed. Trying to run this script on a system where Docker is installed results in a mess. |
Thanks Paraphraser. I used your script and it worked perfectly. The only change I made to the script was to remove the reboot so I could review the output before it rebooted. Everything is running as it should. I appreciate the help! |
Hello, unfortunately it does not work for me on a fresh Raspberry Pi Os install on a Raspberry Pi 3. |
I've read a little further, no progress. It seems Home Assistant Supervised on Raspberry OS is simply dead. What a shame. |
KlausHans - its not dead. I've had Home Assistant supervised running on an RPi 4 for a couple weeks now. I used the script posted by paraphraser. Here's the process I used. btw, the image of the error is in German, so I'm not able to read it. |
I am confused. I checked an other, old installation with working supervisor, the supervisor check there spits out even more errors/warnings. But why am i missing the supervisor in the side menu in the new installation? Edit: ok, the supervisor is usable if i go to integrations -> supervisor -> configuration. So the only issue apparently is the missing supervisor entry in the side menu. Why is it missing though? Edit2: I got the reason. With version 2021.12.0 the entry in the side menu is just gone. I verified this by upgrading my other HA installation from 2021.11.x to 2021.12.0. Very confusing indeed. After that i found the official announcement https://www.home-assistant.io/blog/2021/12/11/release-202112/#brand-new-configuration-panel |
That's a different problem. I'm still running 2021.11.5 and Supervisor side menu is there. |
Perhaps take a look at PiBuilder. If you start with a clean Raspbian image (Buster or Bullseye; I recommend the former if you depend on camera support), PiBuilder will:
The docker-compose you get from PiBuilder is the modern "plugin" version (currently v2.2.2). If you let the menu install docker-compose, you get an obsolete version which also somehow futzes with docker's version number, and then the menu has conniptions. Then, when you try to fix that, uninstalling docker-compose takes docker with it. A real mess. Similarly, the Supervised Home Assistant you get from PiBuilder is the current recommended method. Everything is installed in the proper order and you get a set of Home Assistant containers running independently of IOTstack. After PiBuilder has completed, you can either:
The only part I don't know is how to save/restore Home Assistant data. I don't actually use Home Assistant so I don't know where it stores its data. You'll have to figure that bit out yourself. Sorry. |
In case there was any doubt, I started with a clean Bullseye image, ran PiBuilder on it and restored an IOTstack backup for good measure. 25 minutes go to whoa. Docker thinks Supervised Home Assistant is running alongside the IOTstack containers: Home Assistant thinks it is running and presents its GUI. Not being a user of Home Assistant, I'm not quite sure what is meant by the "side menu". I'm assuming it means the panel on the left in this shot: I can't find anything that matches the pattern mentioned earlier (integrations -> supervisor -> configuration). I only see "configuration": Within "Configuration", the "Info" tab has a list of "integrations": If that's not what you mean, please give me instructions as to what I should click on and capture and I'll see what I can do. Complete build log on PasteBin. |
Ran Native installs Hass.io installation fails on a new Raspian 10.11 (buster) installation on a Raspberry Pi 4 Model B.
I am using the 10.11 buster version of Raspian because the xrdp does not work on bullseye.
Although the script says it was successful in installing Home Assistant, it actually fails to install properly as evidenced by running the following after exiting the menu:
sudo su
root@raspberrypi:/home/pi/IOTstack# systemctl status hassio-supervisor.service
Unit hassio-supervisor.service could not be found.
root@raspberrypi:/home/pi/IOTstack# systemctl status hassio-apparmor.service
Unit hassio-apparmor.service could not be found.
Additionally docker.service also fails to run - and here is the first clue
/etc/docker/daemon.json contains "404 Not Found"
deleting /etc/docker/daemon.json and rebooting gets docker.service running again, but home assistant still fails w/ the above
So I traced through the code and found the following:
IOTstack/menu.sh calls IOTstack/scripts/menu_main.py
IOTstack/scripts/menu_main.py calls snative_installs.py
IOTstack/scripts/native_installs.py calls IOTstack/.native/hassio_supervisor.sh
IOTstack/.native/hassio_supervisor.sh contains:
curl -sL "https://raw.githubusercontent.com/Kanga-Who/home-assistant/master/supervised-installer.sh" | sudo bash -s -- -m $hassio_machine
https://raw.githubusercontent.com/Kanga-Who/home-assistant/master/supervised-installer.sh" contains:
URL_RAW_BASE="https://raw.githubusercontent.com/home-assistant/supervised-installer/master/files"
which resolves to 404 Not Found
Here is the offending code:
URL_DOCKER_DAEMON resolves to "https://raw.githubusercontent.com/home-assistant/supervised-installer/master/files/docker_daemon.json" which does not exist
Please understand I am new to github, so please excuse me if I did not report this issue properly. I am more than willing to learn. If there is a better way to report the issue, or if additional information is needed, please let me know.
The text was updated successfully, but these errors were encountered: