I recently upgraded my staircase with an automated LED lighting system that responds to motion at both the top and bottom. Built around an ESP32-C3 Super Mini and two HC-SR04 ultrasonic sensors, the setup detects when someone enters the staircase and triggers a smooth lighting effect that runs along a hidden LED strip in the handrail.
The ESP32-C3 Super Mini is tucked away in the staircase closet, keeping all electronics hidden but accessible. From there, I ran wires to two HC-SR04 ultrasonic sensors—one positioned at the top and one at the bottom of the staircase. These sensors detect presence by measuring distance changes when someone walks into their range.
For the lighting itself, I routed a channel into the bottom of the wooden staircase handle using a router, creating a clean insertion point for an addressable LED strip. The strip runs the full length of the handrail, providing even illumination along the entire staircase.
The logic is straightforward but effective:
Unlike PIR motion sensors, which can be finicky with placement and angles, the HC-SR04 ultrasonic sensors give reliable distance-based detection. They work well in the confined space of a staircase and aren't affected by ambient light changes. Placing them in the closet keeps the wiring tidy and protects the ESP32 from accidental bumps.
The ESP32-C3 handles all the sensor readings and LED control in a single compact package. Its small footprint made it easy to fit into the closet, and its Wi-Fi capability leaves room for future Home Assistant integration if I want to add scheduling, brightness control, or automation triggers later.
The result is a clean, functional upgrade that makes navigating the stairs safer at night while adding a bit of smart-home flair to the house.
alias: Stairs movement
description: ''
triggers:
- type: value
device_id: [DEVICE ID]
entity_id: [ENTITY ID]
domain: sensor
trigger: device
below: 0.6
- type: value
device_id: [DEVICE ID]
entity_id: [ENTITY ID]
domain: sensor
trigger: device
below: 0.6
conditions:
- condition: state
entity_id: [ENTITY ID]
state:
- 'off'
actions:
- data:
effect: Bottom to top
target:
device_id: [DEVICE ID]
action: light.turn_on
- delay:
hours: 0
minutes: 0
seconds: 30
- target:
device_id: [DEVICE ID]
action: light.turn_off
data: {}
mode: single