Need some help with triggering modes

I’m a recent vera lite convert and am in the process of setting up my SmartThings hub. I’m using both my and my wife’s iPhones as presence sensors and would like to have certain lights turn on automatically when we arrive home. The tricky part is we only want this to happen if it’s after sunset. I’m sure there has to be a way to make this happen but so far I’ve been unable to figure it out. I’ve managed to have the home and away modes trigger depending on whether we are arriving or leaving however currently the lights turn on when we arrive home regardless of whether or not it’s after sunset. Any assistance would be greatly appreciated.

edit After fiddling around some more with modes I’m running into another issue. I’m not sure if I’m just hitting the limitations of ST or if I’m coming at it in the wrong way being so used to the way things were done on the Vera platform. I currently have ST set to change the mode to “Night” when the sun goes down and back to “Home” when the sun rises the next morning. I also have it set to go to “Away” when everyone leaves and “Home” when someone arrives back home. The issue I foresee is what if I leave during the day and the ST switches to “Away” but then the sun goes down before I get home. The mode will automatically switch to “Night” which will trigger certain things that I don’t necessarily want triggered if I’m not home. Can anyone see a way around this. Do I need to create some additional modes such as Home (day) and Home (night)? Not really sure how to make this work.

Regarding your edit section - go into hello home, click the gear go to night - settings. there is an option for night (or any mode) to not change if you are in Away (or any other mode)

1 Like

So if I tell “Night” mode not to trigger if I’m “Away” will it automatically trigger once I arrive home and the mode is switched back to “Home”? As in, will it switch to “Home” then immediately switch again to “Night” since it’s after sunset?

It depends. You can make either scenario happen through the options on hello home.

If you left it as the default I believe it will go to home mode. But you can select to have it enter night mode if you arrive between certain times or days.

The way I use it is like this — I leave during the day, it goes to away mode. certain lights come on at sunset if mode is away. I return after sunset, mode changes to home, but that doesn’t mean those lights go off. Lights later turn off when mode is changed to night, or later by rules that are set up to only run in night mode. Furthermore, if I’m in away mode, none of my other modes change until I return - including night, goodmorning or the other ones I added.

Hope that helps.

FWIW, I have personally found it easier to simply turn those things that I want on after Sunset individually, and not driven by a mode. For example: Driveway lights go on at Sunset, off at Midnight, on again if I come home after Midnight, then only for 30 minutes. All that happens independent of whether someone is home or not. If you have lots of things you want to do this for, it can be a bit cumbersome, but not overly so.

I then use the modes to track whether anyone is at home or not. I invoke Good Morning at 6:00AM, or if i go into the bathroom after 4:30AM (this usually means I’m leaving to catch a flight). Good morning turns up the heat/down the cooling (if my Ecobee hasn’t already anticipated my wake-up time), starts the HW recirculating pump (so the shower is warm when I get in), and changes the Smart Alarm to outside-only detectors (so I don’t set the alarm off when I go down for coffee). The home then switches to Away when everybody leaves, locks all the doors, turns off all the lights, turns of the HW recirculator, etc.

The house changes to Home whenever anyone gets home - NOT driven by sunset or a timer. This means I can come and go during the day. Arrival Home is greeted by AC switching to Home (again, if it hasn’t already pre-adjusted to my expected arrival time), the door from the garage into the house is unlocked, and some of my mood-setting hue lights are turned on. Oh, and the external alarms are disabled before I drive up the driveway. The garage door opens when the house senses my car’s arrival. Of these, only the alarm, lights and door locks are connected to the I’m Back! action…whether I am Home or not has no effect on the outside lights (for example).

“Night” is reserved for “sleeping” - when the house quiets down, or I press the button on my UP24, or I double-tap the bathroom light switch, the house runs Goodnight! Switches to night mode, locks all the doors, turns off all the lights except those in the bedroom, and turns the Ecobees into “Sleep” mode.

I guess the point is that you have to decide how you want to use Home/Away/Night. For me, I use those to make things happen based on people transitions and what they are doing. Everything else I base off of other events directly - arrival, motion, sunset, temperature (e.g. porch fan turns on when porch door is opened AND it’s above 75 degrees outside).

Ok I think I’m starting to get the hang of it. The one thing I still can’t figure out how to do is to have lights turn on when I arrive but only if it’s after sunset. I configured the “I’m Back” action to switch from Away to Home and turn on specific lights when either myself or my wife arrive home. I set it so it won’t trigger if the mode is either Home or Night (which would mean one of us is already home). The only problem is the lights turn on regardless of what time I come home. I’d like them only to turn on if I come home after sunset. Is that possible? I have other lights that turn on and off at sunset/sunrise regardless of whether we are there or not (outside lights), but there are specific ones we’d like triggered specifically if we arrive home after dark.

Also, how are you able to set up and statements. For example you said you had the fan turns on if the door is opened and it’s above 75 degrees. I see where I can have something triggered by multiple events but I thought that was more of an or than an and setup.

Indeed, And statements require a bit of programming…as will (probably) solving your “lights on only when I arrive after sunset.”

You might want to sign up as an ST developer, and then you can look to see if anyone else has shared an app that does what you want. If not, and if you are so inclined, you will find hundreds of apps to build upon to accomplish what you are after.

1 Like

I signed up as a developer, but where do I look for apps that others have shared?

This thread may help you:

Is it possible to set independent modes? I have a MIL apt I use for Airbnb and want to be able to set independent security settings based on rented or vacant but when I create a Behavior, my selection of the home/stay/away modes seem to unavoidably get included in the change… i want to be able to set that and not affect my home modes.

There is only one mode, and one Smart home monitor arm state, per hub at a time.

So I believe you would have to get a second hub for the rental area and call that a different “location” and then it can have its own mode.

@slagle or @tgauchat can confirm, they have both done a lot with modes.

Yup… that would be the cleanest solution at this time.

Mode is literally an Attribute of Location: location.mode.

There is discussion about having a “Mode per Room”, but I’m not optimistic that SmartThings can incorporate any of our suggestions while the fires are still raging.


I can do that, actually… I have a spare v1 Hub. Would the app then be able to coordinate state information from both Hubs? Worried that this is an unplanned use case.

I am a ST noob, FYI, so thanks for your advice.

Our pleasure to try to help…

Currently SmartApps can only work on one “Location” at a time (and multiple Hubs per Location are not even allowed though some people managed somehow, but wouldn’t help your Mode issue)…

And the mobile App only shows one Location at a time.

Some complicated workarounds using custom API endpoints, maybe… Or wait until SmartThings evolves some more.

Yes, exactly this


I have the same issue, a basement suite that is rented separately.

My workaround is to only monitor the areas of the main house, so I exclude the back entrance, utility, and storage. This is working for me so far. I can see that using a second hub would be an effective way to manage the separate area for now, though.

So you get alerts when those sensors are triggered but you dont make it part of the Behavior set of inputs?
I dont wanna use a second hub, ideally, as it seems unclear how the app itself would work with it. Hell, I wish they also made an ipad version of the app! But setting independent zones seems like a good idea.

1 Like

Yah… SmartThings really needs to improve the user documentation on the purpose of multiple “Locations” on one Account.

As far as I know, multiple Locations give you:

  • consolidated push notifications to the mobile App
  • easily switch from one Location to another within the mobile App
  • shared custom Device Types and SmartApps definitions (but not shared SmartApp instances)

The do not, currently, let you share a Hub or Devices across Locations. Not even virtually … except with some very customized code.

I expect this is an area they will eventually improve significantly.