For a long time I’ve been using Ubuntu with Docker for my HomeAssistant setup, but when trying to get that working on my Pi 4 I realized that my regular «install docker, install portainer and grab hassio» did not work. I could easily just grab the HassOS-image for RPi 4, but I want an OS with a few more options, as well as running containers outside the ones integrated with HomeAssistant. Having the 7 inch touch screen working is also nice 🙂
The process is quite simple
Assuming you have raspbian (lite or desktop – doesn’t matter), make sure everything is updated (apt upgrade ; apt upgrade -y). Then
$ sudo apt-get install -y software-properties-common apparmor-utils apt-transport-https avahi-daemon ca-certificates curl dbus jq network-manager socat $ sudo systemctl disable ModemManager $ sudo curl -fsSL get.docker.com | sh $ sudo apt-get update [probably not necessary...] $ sudo curl -sL "https://raw.githubusercontent.com/home-assistant/supervised-installer/master/installer.sh" >> hassio_install.sh
Open this file in an editor and edit the section relevant for the RPi hardware.
"armv7l") if [ -z $MACHINE ]; then error "Please set machine for $ARCH" fi HOMEASSISTANT_DOCKER="$DOCKER_REPO/$MACHINE-homeassistant" HASSIO_DOCKER="$DOCKER_REPO/armv7-hassio-supervisor"
The required changes are in bold
if [ -z $MACHINE ]; then error "Please set machine for $ARCH" fi HOMEASSISTANT_DOCKER="$DOCKER_REPO/raspberrypi3-homeassistant" HASSIO_DOCKER="$DOCKER_REPO/armhf-hassio-supervisor"
Save the file and run
$ sudo bash hassio_install.sh -m raspberrypi4
This will force you to type «not supported» in order to get you going.
root@raspberrypi:~# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 25da7d736292 homeassistant/raspberrypi3-homeassistant:landingpage "/init" 16 seconds ago Up 14 seconds homeassistant 57326790e6ea homeassistant/armhf-hassio-audio:14 "/init" 24 seconds ago Up 22 seconds hassio_audio 1a8885d61ec6 homeassistant/armhf-hassio-dns:9 "/init coredns -conf…" 26 seconds ago Up 23 seconds hassio_dns 7f6323884631 homeassistant/armhf-hassio-cli:25 "/init /bin/bash -c …" 26 seconds ago Up 23 seconds hassio_cli 3c0f499aa316 homeassistant/armhf-hassio-multicast:2 "/init" 28 seconds ago Up 26 seconds hassio_multicast 2d5fc6976bb8 homeassistant/armhf-hassio-supervisor "/init" 41 seconds ago Up 39 seconds hassio_supervisor
This should hopefully do the trick and leave you with a real OS and a dockerized Hass.io on your RPi 4
Note – this method is NOT supported, and may work today, and maybe not tomorrow.