Advice for LED strip controlled by PIR design?


I’m working on making a ESPHome node for an automatic light in washing machine room. I’m going to use an infrared PIR and a White LED strip. I know I can’t power the LED strip through a GPIO of the ESP and so was planning to use a basic Relay but is there a nicier way to do that ? or it’s the good one ?



I just set this up this morning. I have a 3.3v relay connected to my nodeMCU running ESPHome, which will then power a white 5V led strip.

You can possibly even write the entire automation in ESPhome, but personally I would just create an automation in home-assistant that will turn on the LED strip (for x minutes) when motion has been detected by that PIR sensor.

You could also use something like a sonoff basic to power the LED strip and connect the PIR sensor to it. Might look nicer than just a nodeMCU and some wires hanging on the wall, but will work similarly.

Thanks for the nice suggestions and you got gread idea to buy LED strips in 5V, mine are 12V so pretty boring as I have to use a 12V supply for it, and then I have to find two down converter to get 5V for control relay of LED strips and 3.3V for the ESP :frowning:
For automation I think I’ll still do it in ESP to be sure it works even if HA is gone :wink: I did that for stairs (automatic light off after few minutes and it works great, and whatever status of HA !).
For Sonoff I’ll keep the idea next time if I have a LED strip or something that has power supply included as it’ll make it yet much nicer and easier to do !