Help! Turn on certain lights when home after sunset?

Hello,

OK: I give up. I recently moved to ST from Iris and need some help with a configuration. I have some lights (10 or so) scheduled to come on at Sunset and turn off at 11:30 pm. That works fine.

I would like a different set of lights (20 or so) to turn on at a certain brightness after sunset when we arrive. If we are already home at sunset, I would like these lights to turn on, as well. Ideally, these lights would also turn off if we leave the house after sunset (and would turn back on when we return).

I’m using the Smart Lighting SmartAppp. I can see where you can do such a thing using specific times, but I have not been able to figure out how to do this using sunset as a parameter.

Thank you in advance for your help!

I’m fairly new also. There is probably lots of different ways to do this.
Right off the top of my head. I would think if you break up your desires into separate pieces you could possibly use the built in routines to do it.

Maybe one routine to turn them on at sunset?
Another to turn on when you arrive?
Another to turn off upon departure?

Use the “in this mode” limitations to control when they trigger:
Like only do on at sunset if your in home mode.

Put rest in your normal routines:
Do on upon arrival in your "I’m back " routine
Do off when leave in your “goodbye” routine
All off for the night in your “goodnight” routine

Give it a look maybe it will work

1 Like

How are you triggering ‘arrival’? Presence Sensor? Motion Sensor? Contact Sensor? Change to Home Status?
If you have something that changes your Mode to Home when you arrive, you could


Use this app and choose At Sunset to Trigger the action, and then choose More Options - Only when Mode is set to Home.

That way anytime you are home and its Sunset, it will turn on the lights. So if you arrive, and have something that triggers that to change you to Home, it will do it when you arrive.

1 Like

Smart lighting can do sunset/sunrise and Presence. Under Trigger there is At Sunset/Sunrise, and under “Only during a certain time” starting at Sunset.

Use Presence as a Trigger and restrict times. ST will execute the smar tlighting every time your presence changes to arrive, checks the time and if in the range execute.

To turn off lights I would just use a routine like @TN_Oldman recommends.

1 Like

Smart Lighting, missed that one. I have a few things in there. Need to look atrestricting lights on when arrive. That would be nice addition.

If Smart Lighting is doing what you want, then great! You can probably ignore this wall of text I’m about to post.

If you’re curious, though. Here’s how I have things set up at home. Having Routines controlling these things allows for some more flexibility, as I can trigger things other than lights when I arrive after sunset. This text is lifted from the good old days when I was in Support, so excuse me for over-explaining things. heh

First, a brief overview of Routines and Modes:

Tap the check mark with the circle going around it.

Here, you should see some Routines:

Tapping Good Night! will change the mode to “Night”.
Tapping Goodbye! will change the mode to “Away”.
Tapping I’m back! will change the mode to “Home”.
Tapping Good Morning! will also change the mode to “Home”.

You can add in more automations to your routines by tapping the gear icon at the top right of each routine. At the bottom, you can see a section for “Automatically performing” your routine.

You can add a new routine by tapping the icon at the top right and tapping “Add Routine”.

A mode filter can be used so certain actions only fire when in a certain mode, or in some cases so that certain actions only fire when not in a certain mode.

To add a new mode, tap the icon at the top right and then tap “My Locations”
Tap the gear icon for your location
Scroll down and tap “Add a new Mode”

For this, you’ll want to add two new modes: Home PM and Away PM. That’s what I call 'em anyways. It really doesn’t matter.

Now you’ll need to add some new routines. Assuming you’ve already set up Goodbye! and I’m Back! to automatically fire with respect to the arrival and leaving of your chosen presence sensor, we can move to the next steps. As you remember, Goodbye! will change the mode to “Away”", and I’m back! will change the mode to Home. Now, you’ll want to add two more routines. Again, feel free to use whatever naming convention you like, but mine are called Goodbye PM and I’m Back PM. These actions change the mode to “Away PM” and “Home PM” respectively using the same presence triggers.

When editing the “Automatically perform” section of the routine, you’ll notice a section that says “Don’t automatically do this if I am in one of these modes”.

Goodbye! should only be set to fire when you’re in Home mode. Therefore you’ll want to tell it not to happen in Home PM, Away, Away PM, or Night mode.

I’m back! should be set to not fire if you’re in Away PM, or Home PM mode.

Goodbye PM should only be set to fire if you’re in Home PM mode, so check all the others

I’m back PM should only be set to fire if you’re in Away PM mode (and Home PM mode if necessary for your setup).

Still with me? Good!

You’ll need a couple of more actions. These will change Away to Away PM at sunset and Home to Home PM at Sunset.

I call mine Home to Home PM and Away to Away PM, but feel free to get creative with the names. One is set to change the mode to Home PM at Sunset, but only when already in Home mode. The other is set to change the mode from Away to Away PM at sunset only when already in Away mode.

The last things you’ll need to do is find a way to go from Home PM to Home, or to go from Away PM to Away if you happen to be gone all night.

For me, I go through Night mode using Good Night between Home PM and Home, but I think you should have all the tools you need to get this working well for you.

After all of this, you can set I’m Back PM to turn on a light. Using this logic, it’ll only happen after sunset.

Cheers!

4 Likes

Thanks for the input everyone. I went ahead and set up a new Routine that changes the mode to “Home” whenever one of our mobile phones arrives home. I then set up lighting automations in Smart Lighting that trigger between Sunset and Sunrise when the mode changes to Home. This automation turns on specific additional lights. This seems to work well.

Hello again. Some further testing proved that my initial setup was inadequate, as it did not address the scenario where I was already home (and in Home mode) at Sunset, in which case ST does
nothing. To get around this, I still had to manually get into Away mode using the Goodbye! routine, then immediately go back into Home mode using the I’m Back! routine, at which point the additional lights would come on. Not ideal.

I ended up using @csuk’s instructions above to create the additional modes “Home PM” and “Away PM” (note that these now have to be added using the ST IDE web interface, as the mobile app recently dropped the ability to add new modes. See explicit instructions for how to do this from @JDRoberts’ 9/16 post in this thread.) and the additional routines Home to Home PM, Away to Away PM, and Away PM to Away.

This made my brain hurt a little, but essentially, ST now uses routines to change modes at Sunset, then use presence based on cell phones within the Smart Lighting app as the trigger to turn the additional lights on only when the mode is Home PM. The logic behind this is a bit complicated and I need to make sure that this behaves as expected under all scenarios (such as a 4 am arrival time on a weeknight), but so far so good for the normal routine of arriving home from work after dark and the extra lights come on. I will update again as I nail down the rest of the pieces.

2 Likes

Hmmm
that should not be the case. How strange.

Or
did you use the When Mode Changes option? If you did that, then it would work just like you described.

But if you put your trigger as Sunset, then chose more options Only when mode is Home, it should trigger whenever both those things are true.

You are home and your house is in Home Mode - Sunset comes, lights turn on.
You are not home and your house is not in Home Mode - Sunset comes, lights do nothing.
You arrive home, your Routine changes the Mode to Home, its already after Sunset, lights should turn on.

Can you correct me with what you put in your routine? I want to learn how to gear these for someone else. So if my logic isn’t working (and it doesn’t always with ST) then I need to figure out where I am going wrong.

Thanks a bunch!!

I wouldn’t mind betting that you could get everything to work as you would like with a couple of pistons in the CoRE app.
Have a look at it, you might be pleasently surprised.