How to automate darts board lights with ESP32
My dartboard has its own light and a score display, both on Tapo smart plugs. I wanted them to turn on when I start throwing and off when I stop, without touching a switch or a phone. The solution is a vibration sensor on the board, an ESP32 running ESPHome, and two Home Assistant automations. Full source: github.com/artosalminen/esp32-vibration-sensor Hardware diymore ESP32-C3 board with a 0.42" OLED. Native USB-C and a built-in 72x40 SSD1306 display. SW-420 vibration sensor module. A spring vibration switch with an LM393 comparator, a sensitivity potentiometer and a digital DO output. Three Dupont jumper wires. A smart power strip for the light and display. I use a TP-Link Tapo P300, which has three individually switchable outlets. Through Home Assistant’s TP-Link Smart Home integration each outlet shows up in Home Assistant as its own switch, for example switch.office_p300_darts_board_light and switch.office_p300_darts_display, the entities used in the automations below. Wiring is three wires: ...