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.
Start your free 30 days