Setting up Home Assistant Supervised w/ WiFi on DietPi 64 bit running on Raspberry Pi 4

Start by downloading DietPi. First navigate to the website, navigate to the download section, and select the 64 bit version for Raspberry Pi.

Burn it to your micro SD card with your software of choice (I use Balena etcher on Windows). Once burned, unplug the SD card and re-insert it into your computer so you can edit your config and setup your Wifi. Use the following steps from the DietPi website:

  1. Open the file named dietpi.txt. Find AUTO_SETUP_NET_WIFI_ENABLED and set to value 1.
  2. Open the file dietpi-wifi.txt and set aWIFI_SSID[0] to the name of your WiFi network.
  3. In the same file dietpi-wifi.txt, set aWIFI_KEY[0] to the password of your WiFi network.
  4. Save and close the files

Once completed you can eject your SD, insert it into your pi and boot up! SSH into your Pi (default user: root | password: dietpi) and complete the setup. Go ahead and install Docker using dietpi-software. Now you’ll install a few dependencies:

apt install -y software-properties-common apparmor-utils apt-transport-https ca-certificates curl dbus jq network-manager

For the next step you’ll need to have your Pi plugged into either ethernet or a screen w/ keyboard. Because Home Assistant requires network-manager to function, while DietPi uses ifupdown, you’re about to run into some issues. In order to get Wifi working you’ll want to go and edit: /etc/network/interfaces. Use nano or your editor of choice and remove all of the lines associated with the WiFi configuration. Now you’re going to install Home Assistant:

cd /tmp/
curl -Lo installer.sh https://raw.githubusercontent.com/home-assistant/supervised-installer/master/installer.sh
chmod +x installer.sh
bash installer.sh --machine raspberrypi4-64

Running the above commands will get the automated installer started, and you’ll quickly be presented with a prompt to overwrite your network manager settings. NOTE: If you’re on Wifi, and say either Yes or No at this step you will be disconnected!! Select Y, and the installer will proceed to install home assistant. Now, to reconnect to WiFi, the easiest approach will be to run the network-manager GUI via: nmtui. Run the command, select “Activate a connection” and enter in your WiFi details. Now you should be all set, enjoy your new Home Assistant setup!

Leave a Reply

Your email address will not be published. Required fields are marked *