Skip to content

Latest commit

 

History

History

esphome

ESPHome Configs

Home for my ESPHome config files that power various pieces of DIY hardware around my house.

Air Sensor

Air-quality sensor to monitor temperature, humidity, particulate count, CO2, and TVOCs with an ESP32 and some cheap-ish sensors.

This project also exposes a service to run the calibration on the MHZ19, so I can automate calibration to happen after the house has been unoccupied for a period.

Garage Door

Garage door controller that uses a relay and a magnetic reed switch.

Hardware:

The electronics are very simple. The relay is switched by a digital output from the microcontroller (the relay board linked above has a transistor to supply the necessary current to the relay). The reed switch is connected to ground and one of the digital inputs (because the ESP8266 has internal pullups, no extra resistor is necessary). Just connect to the normally disconnected side of your relay to the same two wires running to your existing garage door button.

Fritzing diagram

IR Blaster

IR blaster for sending IR remote codes to my TV and soundbar. Electronics consist of two IR LEDs and a PN2222 transistor to switch the LEDs (since the ESP8266 can't source enough current to drive those LEDs).

Hardware:

  • Wemos D1 Mini
  • IR LED (from my parts box)
  • PN2222 transistor (from my parts box)

Basement Fan

Small DC exhaust blower fan to exhaust fumes from my basement. I use this to extract fumes from my solder station and other burn-y tools.

Hardware:

ESP32 Camera

Simplest (and cheapest) security camera out there. Just an ESP32 with a camera module in a 3d-printed box.

Installing / Running

ESPHome makes it very simple to install the software for this project.

First time installation

Install the esphome tool

sudo pip install esphome

Make a secrets.yaml with your WiFi credentials

cp secrets.yaml.example secrets.yaml

If you don't have it already, you probably need a driver for the CH340 USB->Serial chip. This janky looking website is the chip manufacturer's official download page.

To upload the firmware

Replace air_sensor.yaml with the desired config and compile and upload the generated firmware. The first time you do this you'll need to connect over USB, but subsequent uploads can happen over wifi.

esphome air_sensor.yaml run

To read the logs while running

esphome air_sensor.yaml logs