Introduction
This project will use a Sparkle Motion Mini, two time of flight detectors, an I2C extender, and 4m of neopixels to create a staircase which lights up as users pass by. The system can be integrated into Home Assistant, an open source, popular home control system. This allows the lights to automatically be turned on as users pass by or by any other automation within Home Assistant, giving much more flexibility to the use of the lights. The Sparkle Motion Mini is flashed with ESPHome (instead of WLED), allowing easier addition of the time of flight detectors to the Sparkle Motion Mini without requiring a separate microcontroller for those.
The idea is to mount lights on each side of the staircase that will light up as a person goes up or down the staircase. I'm using 60 LED/m RGBW strips (sk6812) and a diffusion channel to try to make the lights appear evenly lit all the way up the staircase. However, you could use any other kind of strip (RGB, RGBW, non-RGB, COB) you wanted and change the following yaml file to match. There is even NEON tubing-like RGB lights which may not even need a diffusion channel.
At the top and bottom of the staircase will be a VL53L0X time-of-flight (ToF) detector, providing a break beam system to determine when a person walks by. I employ an I2C extender to allow one of the ToF sensors to be over 2 meters away from the microcontroller and still function properly.
Flashing ESPHome
The SparkleMotion Mini will be flashed with ESPHome. ESPHome is an open-source firmware framework that simplifies the process of creating custom firmware for popular WiFi-enabled microcontrollers. Devices running ESPHome can be automatically detected by Home Assistant making automation easy.
The easiest way to install ESPHome on the Sparkle Motion Mini is to use the ESPHome add-on inside Home Assistant. The instructions to do this are outside the scope of this guide, but you can find the instructions here.
If you don't wish to use Home Assistant, you can manually add ESPHome by following the manual installation instructions here.
In order to use ESPHome on the Sparkle Motion Mini we need to create a YAML file, which defines the properties and devices hooked to the Sparkle Motion Mini. This YAML file is then used by ESPHome to create the actual code that will run on the device. The YAML file will add support for the SK6812 LEDs, the time of flight detectors, and set up basic animations.
YAML
The first
esphome:
name: sparkle-motion-mini
friendly_name: Sparkle Motion Mini
The yaml file consists of ...
This page (Automated Lights on Staircase using SparkleMotion Mini) was last updated on January 03, 2026.