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 at boot, Watchdog, AutoUpdate and Show in sidebar are enabled. Add-Ons are essentially docker containers and run on the host’s operating system. This author is able to run the operating system, , , 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 Format2 min read
OBS Studio
Version: 30.0.2 Web: https://obsproject.com There are lots of good options for recording screencasts, but if you want to live-stream T your desktop, one of the best options is OBS Studio. The app works with all the major online streaming providers, s
Linux Format1 min read
Wine For Wayland
2023 was a great year for the Wayland driver for Wine. The goal was to move forward from the experimental phase and make the driver a proper upstream component. A year later, after several merge requests, many people are now already able to use the l
Linux Format2 min read
Back Issues Missed One?
ISSUE 313 April 2024 Product code: LXFDB0313 In the magazine Discover how to use the ultimate hacker’s toolkit, staying out of trouble while doing so. And join us as we take the Puppy Linux developer’s new distro for a run and explore its container

Related