HOME ASSISTANT
Make your home as smart as possible
Exploring NFC tags, energy monitoring and the Wireguard VPN to add further capabilities to your smart home with Matthew Holder.
OUR EXPERT
Matt Holder has been a fan of the open source methodology for over two decades and uses Linux and other tools where possible.
QUICK TIP
While a lot of configuration takes place using the GUI, YAML is still required in places. See https://bit.ly/lxf289-yaml-ha.
The previous two articles of this series introduced a large number of concepts, which are important in gaining an understanding of how Home Assistant works and how devices can integrate with it.
Other items that have been covered include using data from entities in automations, adding users to the system, customising Lovelace dashboards, adding hardware on the local network and adding integrations that pull in data from online sources.
This article will cover the Energy tracking dashboard in Home Assistant, how to use power-monitoring data from smart plugs to create automations, which can alert you when appliances such as the washing machine or dishwasher has completed a cycle. Also being covered is the WireGuard VPN, which can be used to securely access the system from outside of the home network, and the usage of RFID tags, which can be scanned by a smartphone and used to trigger automations.
As previously discussed, the Raspberry Pi is an excellent device to run Home Assistant. However, the unreliability of micro SD cards can let it down. It’s possible to boot the Raspberry Pi directly from an SSD, which this author currently does.
More recent Raspberry Pi firmware makes direct boot from USB possible for some models. This was used with a USB SSD to enable Home Assistant to be installed directly to the SSD – no Micro SD card was needed. To configure this, a Micro SD card was written with the Bootloader>USB boot image file to configure the Pi in the correct way. This can be written to the SD card by using the Raspberry Pi Imager tool (www.raspberrypi.com/software): under Operating System scroll down to Misc Utility Images and click to open the next menu. From this menu, USB boot can be selected.
The target device can then be selected (be careful that the correct device is selected because this operation will wipe whichever device is chosen), followed by clicking the Write option. Once written, the Micro SD card can then be inserted into the Raspberry Pi and it can then be switched on. Once completed the activity light will flash a uniform pattern and if a HDMI cable is connected the screen will turn green.
With this step completed, the Home Assistant image can be written to the USB SSD. This can be done by following the usual instructions, with special care being taken to select the correct device to write the image to. When booting from an SSD for the first time, Home Assistant will take the necessary steps to ensure that space on the entire drive can be used. If being used for a new installation, simply complete the welcome wizard. If replacing the Micro SD card of an existing installation, then a recent backup file can be used to restore everything to its previous state.