FAQ Routine, routines: How do you use them? (SmartThings Classic)

Routines seam to be one of the SmartThings features a lot of users have difficulty understanding and using. So i wanted to create a thread of actual working examples of Routines. Extra kudos for unique or interesting setups… That actually work :wink:

I’ll start it off with the 4 Routines i use to ensure my home switches from Home to Night mode based off sunrise/sunset

My Day/Night Mode Routine Quartet:

Morning: Changes the mode to “Home”, Automatically preform at sunrise, Don’t do this automatically if in “Away” mode.


Morning Too: Changes the mode to “Home”, Automatically preform at sunrise +5 mins, Don’t do this automatically if in “Away” or “Home” mode, send me a notice that Morning did not run.


Night: Changes the mode to “Night”, Automatically preform at sunset, Don’t do this automatically if in “Away” mode.


Night Too: Changes the mode to “Night”, Automatically preform at sunset +5 mins, Don’t do this automatically if in “Away” or “Night” mode, send me a notice that Night did not run.

2 Likes

I use five Routines:

Good Morning
Changes mode to Home
Set SHM to Disarm
Change thermostats to daytime set points
Run automatically on weekdays at 5:45 and on weekends when motion is detected downstairs.

Good Night!
Changes mode to Night
Sets SHM to Arm (Stay)
Sets thermostats to night set points
Turns off various lights
Gets triggered automatically by my “Say Goodnight!” smartapp when we turn off the night stand light.

Goodbye!
Changes mode to Away
Sets SHM to Arm (Away)
Sets thermostats to away set points
Runs automatically when both my wife and I leave

I’m Back!
Changes mode to Home
Sets SHM to Disarm
Turns on some lights if it’s after sunset
Runs automatically when any presence sensor arrives at home

Service
Changes mode to Service
Sets SHM to disarm
Turns off the “notification” light (LIFX used to indicate various things)
Run manually when house cleaners arrive and I get a intrusion detected alert and verified with a camera that it is indeed the house cleaners. This will probably be automated in the future with smart locks and special entry code.

6 Likes

I’ve had ST’s for about 2 years and finally figured out how to use “routines”, thanks for these examples. Just got it set up today, hope it works.

I will report back once I see how my routines are working. Also hope I will see more examples on how to use them.

Thank you for the help,
Murray

At our house, we distinguish between Day (sunrise to sunset), Night ( sunset until when I go to sleep) and Asleep as location.modes.

Bedtime routine turns on a pathway of lights from the living room to my bedroom, turns off the tv in the living room.

Good night routine turns off the pathway of lights from Bedtime, changes location.mode to Asleep.

Good morning routine changes the location.mode to Day.

While the Location.mode is Day, the motion sensors in the bedroom are ignored.

While the location.mode is Night, the motion sensors in the bedroom trigger the overhead bedroom light. :bulb:

While the Location.mode is Asleep, the motion sensors in the bedroom do not turn on the overhead light, but instead turn on a soft nightlight. :sleeping: :zzz:

3 Likes

How do you tell the last routine that was used? I.e., I left the house and hit goodbye…how can I tell that it’s still in goodbye mode?

Routines/scenes and location.modes are often used together but they are two different things.

A routine is a set of instructions that run one time and then are completed. You can schedule them to run over and over on different days or however you want to control it, but each time the routine runs just once. So if you see the notification in your mobile app that says the routine ran, it ran and it finished. (Hopefully, sometimes there’s a glitch and not everything runs but it’s supposed to.)

The location.mode is a global state variable for your location. It can be set to any value you choose. For example, at my house we have a value of “night” and we have another value for “asleep.” When the location.mode is night, triggering a motion sensor in the bedroom will turn on the overhead light. When the Location.mode is asleep, triggering that same motion sensor does not turn on the overhead light – – instead, it turns on a soft night light on the wall.

Typically the Location.mode is changed by a routine/scene, although it can also be changed by a smart app.

In the Classic app, You can see the location.mode value that is currently set by opening the mobile app, clicking on the three horizontal lines in the upper right, and the mode will show there. I can’t remember if it also shows anywhere else. (Since the last iOS SmartThings update, I have been unable to access the mobile app since it no longer allows for voiceover navigation.)

So for your first question, how do you know what routine ran most recently, you open the mobile app and then look at your notifications.

For your second question, how do you know what location.mode your house is currently in, you open the Classic mobile app, click on the menu icon in the upper right, and you will see the current location.mode value.

2 Likes

I have yet to find reasons to use routines… maybe I am missing something. For most things I see routines can do, there are more versatile SmartApps that do it right and better. One that took over quite a few of my automations is Smart Lighting especially because it runs local and therefore supposedly responds faster.

I recently tried to create a routine for mood lighting with dimmers set at different levels, etc but routines do not allow that level of customization (only one dim level) so it was a no go. So I tried to use routines to turn on lights to allow me to get from the kitchen to the media room upstairs but turning things off would require doing so manually or creating another routine to do so… annoying. In the end, the simplest thing was to have a group in Alexa for the lights I want turned on, and a minimote in the media room to turn them all off (or on when needed). I am getting the new Amazon Fire TV Stick w/ Alexa so turning them off will be possible via voice as well.

I use routines to set modes but then rarely use the modes… the few exceptions are related to light automations that will not happen unless the mode is night (ie turn on my 14,000 lumens of garage light only if mode = night when garage door opens). However, turning lights on/off with sunset/sunrise doesn’t need to use modes as they baked the sunset/sunrise trigger within Smart Lighting.

I must be missing a critical point…

The biggest advantage that routines have is that they can be set up as a widget on a smart watch or phone. Other smart apps cannot. And with the changes just this week routines can also be run from echo, but only if they are limited to devices that echo recognizes. So they do offer a few additional features. I agree that the group management of lights is better handled with other options. So it’s another choice, if you can use them, great if not, You don’t need to

1 Like

Ok, then I guess I am using the system as intended…

How do you execute routines using Alexa?

BTW - @JDRoberts you are a fountain of information… I have learnt so many things by reading your posts! Zillion thanks for sharing your knowledge!

3 Likes

Brand new this week! Alexa will now discover your eligible routines just like devices. :sunglasses: See:

https://support.smartthings.com/hc/en-us/articles/210204906

Wonderful! I went to the ST Alexa SmartApp, enabled routine discovery, and then ran device discovery in the Amazon Alexa app (for others looking to do it). Now that I can run them with Alexa I have renewed motivation/interest to use them for something…

Thanks!

1 Like

Good Morning
Automatically perform at 6:15 (time we usually get up)
Turn off all lights
Sets temp to 74*
Set SHM to Disarmed
Change Mode to Home

Goodbye
Automatically performed when all presence sensors leave
Turn off all lights
Set Temp to 79*
Set SHM to Alarmed (Away)
Change Mode to Away

Cool The House
Automaically performed at 5:00pm weekdays
Set Temp to 74* (pre-cools house in summer so it is cool when we get home)

I’m Back
Automatically performed when anyone with presence sensor (smart phone) arrives
Set Temp to 74*
Set SHM to Disarmed
Set Mode to Home

Good Night Baby
Automatically performed at 7pm (when we put baby to sleep)
Turns on upstairs hallway light
Set temp in her room to 72*

Good Night
Usually performed manually when we go to bed. But also
Automatically perform at 11:30pm (latest we got to bed at) in case we forgot
Turn off all lights except foyer night light
Sets temp to 72*
Set SHM to Armed (Home)
Change mode to Night

Vaca
Manually pressed
Set Mode to Vaca
Set SHM to Armed (Away)

*All of the automatic Routines are set not to run if Mode is Vaca.

1 Like

I was very confused about Routines vs Smart Apps when I first started. Thanks to @JDRoberts for helping me out.
They main thing I noticed about Routines vs Smart Apps is that Routines can change Modes. Routines can also consolidate a several Smart App functions into one. That said, I usually use Routines in conjunction with Smart Apps where the Mode change from a Routine triggers the Smart App(s).

1 Like

How do you do that on a smart watch?

This:

https://support.smartthings.com/hc/en-gb/articles/206145893-Is-there-a-SmartThings-widget-

Then this:

https://support.smartthings.com/hc/en-gb/articles/210362203-Apple-Watch

you used to be able to do this on a gear 2 as well, I don’t know if that still works. Android wear devices have additional options but I don’t know how to do all of that.

This discussion is very helpful. Being brand new, though, I still have a couple of fundamental questions.

Modes: I think I understand the differentiation between arming status (away vs home vs disarmed)/routines/modes now, however, I’m still not sure how to use modes. I see where I can set my mode manually and I see where I can change a mode via routine steps, but I don’t see how I can assign any sort of settings to a mode or make the mode change useful for work. I have to guess I’m simply missing something here; modes sound very useful

Example: If I change the mode from home to night, is anything actually accomplished? It seems that all work is done via routines or manually. Are modes only useful by SmartApps?

Maybe my particular situation is the best way to learn. I am trying to automate my arming cycle, so some specific help on this will probably teach me a lot. I only have latch and motion sensors right now, no lighting, locks or any other sort of controls.

My understanding
Armed Away = motion sensors + latch sensors active
Armed Home - motion sensors inactive but latches sensors remain active

Everyday - set Armed Away @ 9PM
M/W/F - Set Armed Home @ 5:45AM
T/F - Set Armed Home @ 6:50AM
M-F - Set Disarmed @ 7AM
M-F - Set Armed Away @ 8:50AM - set Armed Home if presence check activated
M-F - Set Armed Home @ 5PM - set Disarmed if presence check activated

Thanks!

Time out: SHM armed states are not the same as “modes” in the SmartThings system. (Don’t worry, everybody gets confused about this to begin with. :wink:)

So start by reading this, including the example thread it links to, then come back and see if you want to rephrase your question.

I must have wrote that incorrectly. I do understand armed status and modes are not the same thing. I currently am using only the arming status selections and want to extend that with routines to automate those settings based on schedule and presence. What I am confused on is how or why to also use the Modes selection? I know I can change mode from Home to Away to Night - I just don’t get what that does. If I make a routine and change the mode, I can’t find modes have any config attached to them for that change to be useful.

If you read the thread I linked to, I think it will be clearer, but here’s the example I usually use.

At my house, there is a motion sensor in the bedroom.

During the day when the location.mode is “home” nothing happens if the sensor is triggered.

At sunset, the location.mode changes to “night” automatically using a routine.

Then in the evening when the location.mode is “night” if the bedroom sensor is triggered then the overhead light comes on.

When I go to bed, which can be a different time every night, I run a good night routine manually which changes the location.mode to “asleep.”

When the location.mode is “asleep” if the bedroom sensor is triggered then the overhead light does not come on. Instead, a soft nightlight on the wall comes on.

Then in the morning at 7 AM another routine changes the Location.mode to “home” again.

So nothing to do with SHM. Or armed state. But the different Location.modes can cause different things to happen in the house with the same devices if you included those location.mode restrictions when you initially set up the routine/smart apps/smart lighting automations. :sunglasses::bulb:

This post applies only to the classic app

To use the official terminology, a location.mode is a “behavioral filter.”

Routines, smart apps, and smart lighting automations can be set to either run only in particular modes, or not to run in particular modes.

Specifying which location.modes should not allow a routine to run:

In smart lighting, you can also use a mode change as a trigger:

And here is a smart app, “notify when,” which let you set which modes it will run in. For example, you might want to get a notification only if the mode is “away” and you are not home. Or you might want to change the notifications you get if you have guests visiting. (Individual smart apps can be coded to use either the “run when these modes are active” or “don’t run when these modes are active” at the programmer’s choice.)

So by themselves, modes don’t do anything. You select which modes to use as these “filters” when you set up a specific routine or smart app or smart lighting automation.