ESP32 Wifi Light Switch Custom Build

ONE button, ONE light.
NO cords,
NO frequent charging.

A single battery-powered button that talks straight to the light over WiFi — press it, and it's on before you've let go. No hub. No app. No subscription.

Trouble loading? Watch on YouTube ↗
Deep sleep Press wakes it Joins WiFi Light toggles Back to sleep

The problem

Smart-home infrastructure, for one light switch, felt like the wrong trade.

The light in question is a short walk from the room I actually spend time in. Running a hub, a broker, or a home-automation server just to flip one switch is a lot of always-on infrastructure for a one-bit problem — one more thing that needs power, updates, and attention to keep working. I wanted a button I could put anywhere in the house, on a battery, that would last years and just work the instant it was pressed.

How it works

Asleep almost all the time. Awake for well under a second.

The button spends its entire life in deep sleep, drawing almost nothing, until a physical press wakes it. What happens next is the whole design problem:

01

Idle

Deep sleep, radio fully off, drawing microamps for months on end.

02

Wakes

A press is the only thing that wakes it — no polling, nothing listening.

03

Connects

Joins the home WiFi directly. No bridge, no intermediary device.

04

Acts

Checks the light's current state, then sets it explicitly — safe to retry if the network hiccups.

05

Sleeps

Drops the connection and goes straight back to sleep. No idle listening in between.

What it does today

Built and working, not a concept render.

~600 ms

Median press-to-light response

Measured on the fast path, end to end — press felt, light already changed by the time you'd notice.

~5.5 years

Estimated battery life

Modelled on a single 3000 mAh cell at 2 on/off cycles a day — dominated by standby power rather than the brief moments it's awake.

Zero

Hubs, brokers, or subscriptions

Talks directly to the light over the home network. Nothing else has to be running for it to work.

Idempotent

Switching you can trust

Reads the light's state before acting, rather than blindly toggling — a retried or duplicated attempt can never leave it in the wrong state.

Instant

Physical confirmation

An onboard LED confirms a press was received and shows exactly how the request went — no phone, no app, no second device to check.

Mid-cycle

Handles a second press gracefully

A press that lands while it's already mid-action isn't lost — it's picked up and actioned on the same wake, not dropped on the floor.

Self-reported

Performance reporting, every press

Each press reports its own response time back to the light's own dashboard — real numbers from real use, not just a bench estimate.

Battery-aware

Reports its own charge level

Checks in every 8 hours, even without a press, so a dying cell shows up ahead of time — instead of the button just quietly stopping one day.

What's next

Working toward something a friend could set up, not just a bench prototype.

This started as a personal fix for one light — the parts below are what's currently being prototyped to make the same idea easy for someone else to actually use, not committed features on a fixed date.

Designing

A guided setup mode — join your WiFi and pick the light from a list, no code to edit.

Designing

Automatic discovery of the target device on your network, instead of typing in an address.

Designing

A 3D-modeled, 3D-printed case with embedded neodymium magnets — so it sticks straight onto metal surfaces, no mounting hardware needed.