Main Content

Smart Room Lighting with ESP32

Use some LED panels and strips along with an ESP32 and local webserver to control the lighting of a room from anywhere in the house.

I recently purchased several new lights for an auxiliary workspace in my room, but there was a problem: it took far too long to turn the lights on and off. I also wanted to add some colored ambient lighting, and that also needed a way to be controlled, so I decided to create a web-based controller and WiFi-connected hardware to adjust the lights.

Hardware Needed
First and foremost, there had to be a webserver running the necessary services, such as MySQL, NodeJS, and Apache. I have published a guide on how to convert an old PC into a home server that can run all of these, which can be viewed here. If you don’t wish to use an entire PC, a simple Raspberry Pi can work, albeit quite a lot slower.

The hardware includes a relay that is rated for up to 120V AC @ 10A for the primary lights, an analog LED strip, a few MOSFETs, and finally, an ESP32 for the brain.”

Link to article