Trigger Light with Open/Close Sensor

I have a rear door that I go out to walk the dog and then come back in. I have a installed an open/close sensor in my back door and I have a smart switch for the rear light. When I open and close to door to go out, I would like to automatically turn on the rear light. It usually takes 5-10 minutes to walk the dog. When I come back in (open/close the door), I would like to automatically turn the light off. In addition, I only want it to trigger between sunset and sunrise.

Can this be done with SmartThings? I have been able to do something similar with a smart motion sensor, but the App will not let me use the open/close sensor in the same way as the motion sensor.

Thanks in advance for any suggestions.

The default Smart Lighting App does that. I do the same thing on my garage lights whenever I open the entry door to the garage. Open it and click “New Lighting Automation” and follow the prompts. It is pretty easy.

1 Like

Yeah, give Smart Lighting a try. If that does not provide all the features that you want then you certainly can move over to webCoRE as it is a very powerful rules engine that allows you to factor in all the things that you mentioned.

You can always use the Smart Lighting App and set it to turn on when you open the door, then turn off after a specified time, but I’m not sure about Smart Lighting leaving the light on after closing the door the first time and then off after closing the door the second time.

However, I have a WebCore piston set up to do exactly that. I open the door to let the dog out, lights come on, I close the door, lights stay on. When I open the door the second time to let the dog in and then close it, the lights go out.

Actually, I believe there are a couple of versions of pistons performing similar actions in WebCore.

The biggest issue is duration. I can do the trigger between time periods when the door opens, but I cannot do a duration so it turns the light off after 5 minutes. If I could just have it turn on the light for five minutes each time the door is opened during nighttime hours that would work. I can do it with my motion sensor (use it for my garage), but I can’t get it to do it with open/close sensor.

Sound perfect, but I have not worked with WebCore and piston…how difficult is that to get up and going?

Webcore is not too difficult to get up and going - as far as getting it installed anyway.

It helps to have a minimal “conceptual understanding” of programming… Not that you have to know how to full on write code, as someone has probably already written what you want, and the Webcore folks have done a darn good job of making it as plug and play about as much as can be done. But it helps if you understand how code in general works, and that what happens is due to instructions on a line in the code setting the parameters of what, when, where etc…

Webcore Introduction Video on YouTube

That should work in Smart Lighting, as that’s what I did initially before diving in to WebCore. In the SmartThings app and Smart Lighting, after you set the trigger to “opened” for whatever open/close sensor you are using, at the bottom will be a toggle for “turn off when closed”, tap that toggle on and another option “after this number of minutes” pops up and just enter the 5 there. Then tap the “more options” to enter the only during certain times (between sunset and sunrise) limits. Now what will happen is that when you get back and open the door again, that 5 minute timer will start over, and it’ll be on for another five minutes after you come in, but it should work.

You do have to tap that toggle switch to get the time option to come up, but it’s there. Or are you saying you did that and it didn’t work?

I believe it’s under the power allowance option. Just be aware it will turn off after the allowance you set.

I have this same scenario set up. I used 2 separate smart lighting triggers.

The first turns on the light when the door opens.
The second turns off the light after a power allowance of 10 minutes.

So every time the door opens the light turns on.

And ever time the light is on (regardless of how it got on) it turns off after 10 minutes. I have several different automations that could potentially turn the light on.

Thanks…I did not see that option originally. I can live with this configuration.