mirror of
https://github.com/jdillenburg/esphome.git
synced 2026-01-08 22:40:39 -07:00
b6d5d0f20a0be0ff88f456dd15861a3852a9282d
John's ESPHome Devices
Welcome to my ESPhome configuration directory. This repository contains the ESPhome devices I use in my home:
Garage Door Controller
Features
- TFmini-S Sensor code to measure vehcile's distance from front of garage.
- LED Strip to display green for pulling vehicle into garage, yellow to slow down, and red to stop.
- Sensor to read door open/close status.
- Relay to push garage door controller button to open/close garage door.
Files
| File | Description |
|---|---|
| garage-door-controller.yaml | ESPHome Code for garage door controller |
| TFmini.h | Reads TFmini-S distance to car as a custom component |
Parts List
Links go to Amazon.com.
- ESP32 Mini
- TFmini-S - measures distance to vehicle
- WS2812B LED Strip - only 1 meter needed
- SRD-05VDC-SL-C - 5V relay module to "push" door control button
- CYT1070 - Level shifter to convert ESP's 3.3V to LED Strip 5.0V
- 5V 2A Micro USB Power adapter to power ESP and LED Strip.
- Magnetic door sensor - there are hundreds of variants on Amazon, take your pick as long as it is normally open when the magnets are apart.
Hook Up
- (Optional) Solder pin headers to ESP32 Mini. You will only need the inner most set of pins. You can also solder connections directly to the ESP32 mini if desired. I like to mount my parts on a Solderable breadboard, so pin headers are needed.
- The TFminiS is connected to GPIO21 for RXD and GPIO22 for TXD. The YAML file configures a UART where TXD on the ESP32 connects to RXD on the TFmini and ditto for RXD to TXD. The TFminiS is powered via 5V.
- The data line on the LED strip is connected to GPIO16 through the level shifter LV (low voltage) pin. The YAML file configures an addressable light component on this pin.
- Connect the 5V relay to the ESP32 GPIO17. The other normally open (NO) end of the relay connects to your door opener's push button. The YAML file configures the GPIO17 to trigger with a 500ms pulse.
- Connect one wire from the door sensor to ground and the other wire to GPIO23 on the ESP32.
Software Install
You can copy/paste the YAML code to your ESPHome device's file. You'll need to skip over the "ap", "ota", and "wifi" sections to maintain your own secrets. Or, alternatively, place the secrets and passwords into your own secrets.yaml file.
You will also need to upload the TFmini.h file to your Home Assistant config/esphome directory in order for the compilation to succeed.
Description
Languages
C++
86.6%
Python
13.4%
