How to program a delay when turning off a light?

So far all of my automation consists of turning lights on and off on a schedule using Smart Lighting with the GE/Jasco Z-Wave Wireless Lighting Control and Appliance Modules. The next thing I want to approach is a “goodnight” type of thing where turning off one of these modules is delayed a few minutes (long enough for me to get to bed).

I know there has been discussion about the lack of a delay feature when used as an alarm. That is not what I am looking for here.

I want to trigger a smart app on my way to bed, and have it turn off the switch some specified number of minutes later. The switch is question is the GE/Jasco Z-Wave Wireless Lighting Control and Appliance Module. I am not using motion or presence detectors, so it needs to be something I can trigger from SmartTiles or the SmartThings app.

Can someone suggest an easy and (reasonably) reliable way to do that? If it fails occasionally, no big deal as the lamp in question also turns off past my usual bedtime.

Thanks.

Within the AP Core I think you can Achive this do a search for COre.

1 Like

This is already available in the standard “smart lighting” feature. You can have a light turn off after X number of minutes. So it’s very easy, it’s just that finding it is not intuitive.

When you set up a new smart lighting automation, choose the module/switch that you want to control and then say that you want it to turn off. At that point you will get options for turn off after X number of minutes under the “power allowance” option.

You can further limit the automation so that it only runs in certain modes or certain times of day so you can use the module regularly the rest of the time.

(Alternatively, you can use the power allowance option on a virtual switch and have the real switch follow the virtual switch and that way you can have other rules for the actual switch that don’t use Power allowance. Lots of options depending on exactly what you need .)

So it’s easy to do, it’s just not easy to find. :sunglasses:

And just in case you don’t already have smart lighting installed, here are the instructions for that. You have to do a one time install and then after that you can set up new lighting automations whenever you want.

https://support.smartthings.com/hc/en-gb/articles/205380404-Smart-Lights

2 Likes

Thanks.

@Misterwinefine - I figured someone would mention COre :slight_smile: While it sounds really good, I’m not quite ready to jump in to that yet.

@JDRoberts - I would never have thought to look under power allowance. Thank you (once again).

Mike

1 Like

Hmm, I don’t see a way to invoke my new Smart Lighting automation (with a 5 minute delay) from either Routines or from SmartTiles. All my other Smart Lighting automations are time-based triggers, so I haven’t needed to invoke one manually before now.

What am I missing? A virtual switch? (I haven’t set one of those up yet). Or do I need to do a mode change at bedtime? So far I only use modes for home, away, and visitors, but if necessary I can set up another mode for sleeping, and set up a Routine to change the mode.

Your smart lighting automation isn’t like a routine that you can invoke. Once you set it up, it always applies within the parameters you defined inside of that automation.

So you just turn on your module. It will then automatically turn itself off after the amount of time you specified.

As I mentioned, it’s going to always turn itself off after that amount of time unless you put some limits on it like time or day or mode.

So let’s say that you have a mode of “asleep.” And you set up your smart lighting automation so that that module should turn itself off after 15 minutes, but only when the mode is asleep.

What that means is that anything that turns on that module when the mode is asleep, whether it’s you tapping a tile in smarttiles or in the Official mobile app, or a routine or a smart app, it doesn’t matter–The smart lighting automation will turn the module off again after 15 minutes.

So you don’t have to turn on the smart lighting automation. Just turn on the module. Smart lighting automation is going to make sure it turns itself off again.

And if you don’t put any limits inside of the smart lighting automation, that module will always get turned off after The amount of time you specified. No matter how it gets turned on.

So just depends on what you want to accomplish. You only need a virtual switch if the parameters available inside of a smart lighting automation aren’t enough to limit the turning off to the exact situation that you want to cover. In other words if you find the module turning off sometimes when you want it to stay on for longer, you’ll need to add a virtual switch. But it just depends on the details of what you want.

OK, that makes sense, and jives with the experiment I ran just now.

If I add a mode for “asleep” that would solve this problem - I simply change the mode to “asleep” (through SmartTiles or a by invoking a bedtime routine that changes the mode to “asleep”), and 5 minutes later the lamp turns off.

But then I need to figure out how to revert the mode back to what it was before I set it to “asleep”, as I have several modes (home, away, visitors). I don’t think the previous value of mode is available anywhere, is it?

No, and as you point out, having multiple modes can make things really complicated if they start to overlap.

In your particular situation I’d seriously consider using a virtual switch. Makes everything a lot easier It just needs some additional one-time set up.

  1. create a virtual switch
  1. set up a smart lighting automation for the virtual switch so that it turns itself off after five minutes whenever it is turned on. You don’t have to put any restrictions on it.

Three) set up a smart lighting automation so that the real module turns on and off whenever the virtual switch turns on and off.

Now whenever you want to have the module come on and turn itself off again after five minutes, don’t include the module in the logic – – just include the virtual switch. You can turn The virtual switch on with smart tiles or the official mobile app; you can turn the virtual switch on with a routine or another smart app. Just whenever you turn the virtual switch on, the real module will come on and then turn off again in five minutes when the virtual switch turns itself off. But you’re still free to use the real module with any other routine or smart app and it won’t turn itself off. :sunglasses:

So when you want the behavior of come on for five minutes and turn off again, reference the virtual switch.

When you just want regular on/off behavior reference the physical switch.

Thanks @JDRoberts, I will look in to that.

Mike

1 Like

The point is just that by using the power allowance with the virtual switch and leaving the physical module unrestricted, you’re able to use the physical module in both situations. When you want the power allowance to act as a timer, you reference the virtual switch. The rest of the time you reference the physical module.

This is pretty close to what I want to do, but not quite. I’d like to setup a Routine called something like ‘Go To Bed’ that will turn on a few Lights A, B, C (lighting the way to my bedroom), turn off Lights D, E, F (outside lights, or lights I’m no longer using when I go to bed), and then 5 minutes later Turn off Lights A, B, C (the ones I needed to get to the bedroom). If it has to change Modes to do this, it should automatically change the mode back to the prior mode after the 5 minutes. I only want to push the button once, when I am going to bed, don’t want to have to push another once I get to bed.
Thanks.

Scott

This could all be done with virtual switches in daisychains, you wouldn’t have to do anything with modes, but honestly it would be pretty clunky. (Most people who aren’t engineers don’t think in daisy chains. :wink::blossom::blossom::blossom:)

So for you, I would just suggest going straight to Core. It will be able to do all of that and there will be people in the peer assistance thread who can help you get started.

1 Like

Thanks for the help @JDRoberts, I have implemented the virtual switch.

1 Like

Trying to wrap my head around this problem. I need a kid’s bathroom light to go off 5 minutes after a door is opened. I have an open/close sensor on the door that I want to use as a trigger. I don’t want the lights to go on automatically when the door is closed because sometimes the door is closed when the kids are not in the bathroom. I also can’t just use the power allowance because if they turn on the light and are in the bathroom for more than 5 minutes I don’t want the light to turn off on them. Basically, if the door is open for longer than 5 minutes it needs to be turned off since they keep forgetting to turn them off. I was thinking of making a dummy virtual switch that does nothing (Is that even possible?) when it is turned on then I can set the light off after 5 minutes.

Can you also do the delay in sending a sms message?