Linux Format

Build your own smart home sensors

Credit: https://esphome.io

ESPHome is a project that comes under the banner of Nabu Casa (the company started by Home Assistant’s founder to provide funding for core developers). ESPHome creates firmware for microcontroller boards, which can communicate with Home Assistant. Communication is two-way and microcontroller outputs can be controlled from Lovelace dashboards/automations as well as data from the microcontroller being fed back to Home Assistant.

Around five years ago the ESP8266 model of microcontroller changed the world by offering a small, cheap circuit board. These boards contain a Wi-Fi controller, as well as support for many communication standards. These boards support digital input/output, analogue outputs, and pseudo-analogue output using Pulse Width Modulation – PWM is a way of turning a digital signal on and off very quickly so that the average value appears to be less than the full voltage.

As well as General Purpose Input Output (GPIO), these boards support I2C, SPI, one-wire serial and various other standards. GPIO is found on a lot of devices these days and is defined as a maximum voltage of 3.3V for digital I/O and for analogue input too. Be aware devices that use 5V digital signals will cause a failure unless additional circuitry is utilised.

As described in the boxout (bottom right), communication between ESPHome and Home Assistant is reliable and is performed via an API. Data can be encrypted, but because the data is retained on the home network, this is probably unnecessary.

can be run as a standalone system, but the easiest way to use it is to add it as an Add-On in the Add-Ons section of (see ). Navigate to Configuration>Add-Ons, Backups and Supervisor and search for . Once installed, ensure that Start, , and other add-ons in a performant manner on a Raspberry Pi 4.

You’re reading a preview, subscribe to read more.

More from Linux Format

Linux Format3 min read
Kernel Watch
Linus Torvalds announced the fourth RC (Release Candidate) for what will become Linux 6.9 in another few weeks. In his announcement, he noted that there was “Nothing particularly unusual going on this week – some new hardware mitigations may stand o
Linux Format2 min read
Specialist Tool Organisation
K ali works differently from the others as it has the security tools in the root of the app launcher. If you know what you’re looking for, the whole thing is searchable from the launcher. The ‘normal’ apps are located in the Usual Applications folder
Linux Format14 min read
Ubuntu at 20
Without Ubuntu, the current Linux landscape would be unrecognisable. Back in October 2004, the first 4.10 (2004.10) release of Ubuntu, with its intriguing Warty Warthog code name, leapt from obscurity to being one of the most downloaded Linux distrib

Related Books & Audiobooks