Motion Sensor Help


(Paul Connolly) #1

I am trying to utilize a ST motion detector to light a light that is controlled via SmartHome. I have successfully used IFTTT to turn on the light, but have been unable to turn off the light. Motion detectors generally do not expose a triggered event for the reset or “Inactivity” of the detector. I would opt for a reset related to time as well.

Since I cannot find a lot of info about this, I am guessing it is so simple that I should have figured it out by now. Relatively new user to ST. Not writing code yet, but I am in the online portal and have created simulated switches, etc. I have tried Kristopher Kubicki’s code for the motion with reset, but not sure how to implement. There must be an easier way.

In short, I want the motion to turn on a light and reset of the motion to turn it off. (Or the light to turn off after 2 minutes and turn back on with more motion)

If anyone can help I would appreciate it.


#2

Hi @pllpjc,

What is your goal?
If you want a hallway light to come ON when you walk in, than use the SmartLighting native app in SmartThings.
There you can have the light trigger based on motion and turn off based on inactivity. You can restrict the ON action based on many things(Lux, Time of day, day of the week, etc.,)
You can also set a second rule which will turn off the light after a certain amount of time.
For more advanced rules, I recommend WebCore.


(Paul Connolly) #3

Thank you very much…got me pointed in the right direction. Established a simulated switch to use to trigger the IFTTT on and off. Good to go. I will check out WebCore as well. Thanks for the tip !!!