How to Set Up Automated Lighting Using Motion Sensors and Luminosity

Hello everyone, I wanted to share my experience setting up automated lighting in my home using motion sensors and luminosity sensors. This has been a fantastic way to save energy and ensure that my lights only come on when needed. Here’s how I did it:

First, I purchased a Neo Coolcam PIRV2 motion sensor, which has been working perfectly in my kitchen. I also set up a luminosity sensor to detect light levels. The goal was to have the lights turn on only when it’s dark and motion is detected.

I created a flow in my automation system with the following steps:

  1. Check Luminosity: If the luminosity sensor detects less than 5 lux, it sets a variable indicating it’s dark.
  2. Motion Detection: When motion is detected and the dark variable is true, the lights turn on.
  3. Auto-Off Timer: If no motion is detected for 5 minutes, the lights turn off automatically.
  4. Reset Dark Variable: If the luminosity increases above 10 lux, the dark variable is reset to false.

This setup has been working beautifully, ensuring that the lights only come on when needed. I also added a failsafe to stop the countdown timer if motion is detected again within the 5-minute window.

I hope this guide helps someone else set up a similar system. If you have any questions or suggestions, feel free to reach out! :blush: