start using home assistant (esphome 1)
what you need to run your own home automation server
- Raspberry Pi – a kit with Raspberry Pi 3+ or later with the recommended power supply, 32Gb SD card, heatsinks and/or cooling fan. A Raspberry Pi 4 will also need a micro-HDMI to full HDMI cable. A Raspberry Pi 3 will need a regular HDMI cable. You can buy an inexpensive ‘compatible’ HDMI to DVI cable on ebay.
- You may initially need a USB keyboard and monitor (see below*) .
- Ethernet cable for a wired connection to your broadband router.
- A spare SD card and an SD card reader or disc space for a backup of your setup
First timers: use a Raspberry Pi to run Home Assistant (aka Hassio). Here’s a video, with thanks to Juan, that I found useful – Home Assistant Part 1: Hass.io Installation. Juan shows how to download a hassio image and download a copy of balenaEtcher. Next he shows how to use balenaEtcher to copy hassio to your SD card and how to edit a file to add your wifi settings.
Expert users: if you’re comfortable with a command line, you can create Home Assistant in Virtualbox. It runs faster than a Raspberry Pi. I used this detailed youtube tutorial: migrating to a virtual machine
a list of things to do when Home Assistant is up and running
- When Home Assistant is running, you use it from your desktop machine from a link such as http://hassio.local:8123 or http://192.168.x.x:8123.
- Several Home Assistant add-ons require you to set a password. Do reuse the same password.
- Some features are not available until you click your account ’roundel’ and switch on ‘Advanced’.
- Find out how to make backups and how to download them to your machine.
- Don’t yank out the Pi’s power. If you must stop it, do this from Hassio.
- On your router, give the Raspberry Pi a fixed IP addresses for both the wired and wireless ethernet connection
- In Hassio go to the add-on store to set up Samba (to copy files from the Pi) and Configurator (to edit your configuration).
- If you want to use ESPHome, as in many of my projects, you must install it – but that’s on this page
- If you want to access the RPi remotely on your phone, you’ll need to open a port on your router.
- If you’re comfortable with FTP and FileZilla, install the Hassio FTP add-on to access files on your Pi.
- If you want secure remote access go to the Hassio Add-on store, install DuckDNS and follow the instructions with care. Henceforth your access URL may change! It might now be https://xxx.duckdns.org:8123 or https://192.168.x.x:8123.
go to step 2 to install ESPhome
You can skip step 2 if you want to explore what Home Assistant can do on its own.
*when do I use a keyboard on the Raspberry Pi? You need it to use the Hassio CLI
You don’t much use a keyboard and monitor with the Raspberry Pi but if you do you’ll see a black and white world running behind the scenes. Don’t be alarmed by this command line interface. It’s purpose is not well advertised but knowing that this exists can be a life saver. If like me you got to it because you thought your Home Assistant was broken, here’s what to do.
- Consider that your HA might not be broken – you might be using a wrong URL or your Home Assistant might be very busy.
- In this CLI you press ENTER to gain attention and then enter the word ‘root’. You then see a Hass.os graphic and the screen will show some commands you can use. Type help for a list of commands
- Type homeassistant for a list of what you can do with home assistant including restore a backup of the configuration. Try homeassistant check OR homeassistant restart
- Try these shortcuts: ha check – ha stop – ha restart
- Type host for a list of what you can do with the host. Examples host reboot.