Vacancy Sensor with motion control


#1

Id like

  • If the light switch is toggled to turn the light on, the light should turn on and stay on until there is no motion detected by the motion sensor for 5 consecutive minutes. Any new motion should reset the timer.
  • I’d also like the motion sensor to turn the light on if it wasn’t turned on manually by the switch. the light should stay on until there is no motion detected by the motion sensor for 5 consecutive minutes.

I would appreciate it if people could provide insight on how to accomplish this.


#2

@tommyk203

This is a relatively simple piston. I’m assuming that this is your first?

I created this for you, but I suggest that you go in and play around a bit. The GUI is fairly simple once you start looking around. Open your dashboard and register it. Then import this using the code 0gfh

This turns your lights on with the switch or motion. For turning off, I prefer to use the automations in the smartthings app.

Follow these steps…

automation> routines>add a routine>name it>next>turn off these lights or switches>select appropriate switch>done>scroll down>automatically perform “your name”>things quiet down>Where?>select motion sensor>done>enter minutes>save>select times>save


#3

Thank you, however I am looking for something a bit different than that. To clarify. If my kids are about to go down the basement steps and turn the light on with a light switch, but never actually go down the steps and trigger the motion sensor, I’d like the lights to turn off after the motion sensor has not seen any motion for 5 minutes. If there happens to be motion, the 5 minute timer should restart, and the light should turn off 5 minutes after the motion stops.

I’d also like the lights to be able to be turned on by motion, and then off after 5 minutes of no motion.

I hope that clarifies things.


#4

I believe this piston accounts for all of your scenarios…


NOTE:
There is a slim possibility of premature darkness, but it would only happen if:

  • Wall switch is turned on
  • Someone moves around in the basement for 4 minutes
  • Everyone avoids the motion sensor for 1 minute
  • Light will then turn off (since the motion no longer inactive)

If you want to avoid this rare event, we can make this piston more complex using variables.