Turn off a device 5 minutes after garage closes?

Hi Everyone…

I’m sure this is possible. I have an automation to turn on a light in my porch when my garage door opens. I would like it to turn off 5 minutes later. I saw this thread:

and installed that smart app but… That app seems to turn off a device x minutes after it goes on regardless of how it was turned on. I would like it to automagically turn off x minutes after it went on but only if it was turned on because the garage door sensor reported open.

How might I accomplish this?

Thanks very much!

I believe you can do just that with SHM.

Try the CoRE app.

There are several ways to do this. You can certainly do it with core, which is a very sophisticated community created rules engine, but it’s quite complex to set up. And it may be overkill if all you really want is a Virtual timer.

There is another alternative which just uses the official smart lighting feature. You will have to set up 3 automations to make it work: one to turn on the timer when the sensor reports open, one to turn off the timer after X minutes, and one to have the real light follow the timer. But each of those steps is very simple in itself. And it will definitely allow you to manage the real light in other ways with other rules.

There is a how to for virtual timers is in the community created wiki: :sunglasses:


I have automations using both Core and Smartlighting. They both have their advantages and disadvantages. Here are samples that I use in my system.

Using CoRE… Adapt as needed.

Using Smartlighting… adapt as needed.

In CoRE I have the motion from IFTTT connected sensor trigger the a virtual switch that triggers the light. You wouldn’t need this extra step and could also drop the “Else” statement.

I tend to double-up on triggers and functions as different parts of Smartthings has differing amounts of reliability. Your milage may vary…:smiley:

:exclamation: PS You may also see that others have used rule machine in the past but that automation is no longer supported. Use CoRE instead.

Wow, thanks for the quick and detailed replies everyone! I’ll read through all this carefully and report back how I did.

Thanks again!

1 Like

Wow that was easy! I had it working in about 5 minutes. I used the suggestion provided by @JDRoberts just because it seemed the easiest. I’ll definitely be playing with CoRE, a rules engine has to be fun!

Of course, I tried to create a virtual switch to do something else, and totally screwed that up… Ah well, I’ll figure it out.

Thanks again!

1 Like