Best way to run daily house lighting schedule with complex conditions?

Basically I’m looking for advice on the best way to control the timing of my lights…

So here’s how I’m doing it now (see light schedule below). I have a routine set up for each trigger time. But it doesn’t do anything. Then I have a core piston for each routine with a trigger to run when the routine runs. The pistons are what actually control the lights. Each of the pistons includes almost every device listed below and sets the desired state. I did it this way in case the house loses power and everything goes crazy or light switches get messed with, etc. I can manually run the appropriate routine and that will fix all the lights in the house and put it back on schedule. This worked great when I only had 3 or 4 trigger times. But now I have 6 (and growing), and throughout the year I add and remove things for holidays (christmas and halloween).

Any advice is appreciated. If there is another app that is better suited, then I’m all for it, I only use Core because of it’s level of customization, especially if I eventually add requirements like who is home, day of week, etc.

As of now, I’m only using 4 trigger times, but here is the schedule I want to use:

5:00 AM:

Driveway Lights - ON (my girlfriend leaves for work at 545-6AM when it’s still dark)
Fish Tank Lights - ON

Sunrise + 30 min:

Driveway Lights - OFF
Porch Light - OFF


Driveway Lights - ON
Porch Light - 40%
Balcony Lights - 40%


Fish Tank Lights - OFF


Driveway Lights - OFF
Porch Light - 20%
Balcony Lights - OFF


Living Room Fan - OFF (we accidentally leave it on when we go to bed all the time)

Personally, I would use SmartLighting for this assuming the device handlers are local for most devices. You’ll gain the reliability of these automations running even if the internet is down. My whole system is built upon a local-first priority design using local DTH’s and SmartLighting as much as possible. So far that has proven to be a good decision.

You can still add enhanced action using CoRE later on.


I’ll take a look. I’m mostly looking for a way that is easy to modify and also have the ability to run at any time of day to restore the house to the proper place in the schedule.

I took at look at it and it doesn’t appear to accomplish what I was asking for, it’s much too simple of an app. It doesn’t seem any different that just creating a Piston with a time based trigger for each of the times in the schedule…It doesn’t have the ability to manually run when needed or restore the entire house to get back on schedule.

What you do is use SmartLighting as the foundation for running your lighting automations, and then create one or more routines to “reset” your house in the event the power goes out, or other things happen. There is no need to “reset” a SmartLighting automation. It runs on whatever schedule you program it with. There’s nothing you are asking that cannot be achieved through a combination of routines and SL automations.

Nothing against CoRE, I use it too, but it’s far too complex of a tool for such a simple task in my opinion. With SmartLighting, automations will run locally when the internet is out, which is a huge benefit where I live. CoRE does not work when the internet goes down, and it’s considerably slower too. At the end of the day, it’s all about what you want to do and how you chose to do it. There are no right or wrong answers. My system has over physical 120 physical light switches, SmartPlugs, and bulbs, tied together with 50 or so SmartLighting automations. My priority is on reliability, versus ease of management as you are asking for.

Good luck to you with whatever you implement.

I think I’ll just stick with CoRE. My internet hasn’t gone down at all in the 2 years I’ve lived here so that’s the least of my worries. I’ve been using CoRE to control my lights since it was released, up till now with 100% reliability as far as the SmartApp is concerned. Speed isn’t a concern, although I haven’t noticed an issue there anyways. The second the clock hits the desired time I see the lights switch to the desired states…not much more I need than that. I only have 25 to 30 devices anyways.

My method of using Routines to control the trigger times and then using CoRE to watch the routines works great and still gives me the ability to run any one of the routines manually. I was just looking for a way to automate it and consolidate it into a single piston or a more advanced lighting app.

If it’s working for you then why change it?

I have 100s of automations and it wouldn’t make any sense to have 100s of separate triggers to run all of my automations.

One thing I’ve found that works great is to use virtual switches as:

  1. Automation Switch for each room. In each of my webCoRE rules, I have an Automation Switch restriction.

For Example: Only If Bedroom Automation Switch is on.

This way, I can easily say, turn off Bedroom Automation. Now any Piston that tied to Bedroom
Automation is paused.

  1. Room Switch for each room.

If any of these devices are on
Then using Room Switch
Turn On

If all of the devices are off
Then using Room Switch
Turn Off

If Room Switch changes to off
Then using all of these devices
Turn Off

Using this method, I can easily turn off every device in a particular room by just saying turn off Room

  1. Resetting or Setting Scenes. These are like Routines but on Steroids! I set up a whole scene in webCoRE then use Virtual Switches or Buttons to trigger them.

Yes, it is working, it’s just not easy to modify. I looked at SmartLighting and it won’t work at all for what I want to do. SmartLighting is great if you want to perform the same action on all devices at the same time. You can’t mix match “these on”, “these off”, “set these levels” all in one.

Aside from the basic schedule I posted, I also have holiday lighting that’s part of my schedule. During halloween the balcony lights get swapped out with LIFX bulbs and a LIFX Scene is activated, same for Christmas.

During the rest of the year, I have a LIFX bulb downstairs that is used as a night light with a nice light blue in the kitchen which gets set by the 10PM trigger point, which sets a color and a level.

CoRE handles all of this beautifully. However, if the power goes out or whatever happens and some of the bulbs get out of sync, in order to put it back on track, I have to find the correct Routine and run it. I guess I’m just tired of having a bunch of routines and a bunch of pistons just for “house lighting”. I was hoping to consolidate and ease management.

Your Routines and/or Pistons doesn’t seem to be too complicated. I’s suggest moving over to webCoRE as there are better ways to organize your Pistons. I have hundreds of different automations doing all kinds of stuff. Most of it my family is unaware of and that is the beauty of it. Set it and forget it. Too much tinkering takes the fun out of it.

Each device has a tile page in the ST App and on that page you can click SmartApps and it will list every Routine, App or whatever you have associated with that device. I typically put the name of the app after the name of the Automation.

For Exapmle:
Dining Room Motion (webCoRE)

In the recent Events Tab, I can easily see what app did what.

For Example:
Dining Room Motion (webCoRE) sent Set Level to 20% to Dining Room Light

As far as the power going out, hmmm, I don’t think I have 1 Piston that is effected by this. If you do have Pistons or Routines that you have to reset, I suggest rebuilding them and rethink your triggers or conditions to satisfy the argument(s).

BTW, I have over 150 physical devices so I understand the frustration of keeping up with everything but the above suggestions have been working great for me. Especially the proper naming of devices and apps.

YMMV Good Luck!


I’ll have to check into that, I haven’t been on the forums in a while since my setup hasn’t need any changes. So I haven’t heard of webCoRE yet.

And the pistons themselves are not affected by power outages. What I mean is, say the power goes out then comes back on. My OSRAM bulbs all default to on, 100%, 2700k. I have a piston set up that will fix the color temp and I can just ask google home to “fix the lights” and that will set all of the lights back to the desired color temp. But in order to get the lights back on schedule (some on, some off, some set to certain levels) I have to find the appropriate routine and run it.

I have dumb LEDs and Smart Switches so I don’t have that issue however, now that I understand your issue fully may I suggest:

Question 1: How likely is it that all of your Bulbs will be on at the same time at 100%?
If the answer is highly unlikely, then you could build a piston that says:

If all of bulb 1, bulb 2, bulb 3, etc. are on
Modes are any of Mode 1, Mode 2, Mode 3, etc.
SHM Status is not Armed (or whatever)
Then Run the following Routines, Routine 1, Routine 2, Routine 3, etc…

The only time my lights go full on is if the Alarm is triggered so in my case I would exclude SHM Status is Armed.

Question 2:
Are you familiar with Virtual Switches?

Question 3:
Have you thought about adding voice control to your HA?
Alexa, Turn On Light Scene 1

Question 4:
How often do your schedules change?
If the answer is rarely, then why use routines at all? You could use Virtual Switches or Momentary Switches and 1 master latching piston that goes like this.

Room 1:
If Light Scene 1 changes to On
Then Turn Off Scene 2, 3, 4, etc.

If Light Scene 2 change to On
Then Turn Off Scene 1,3,4,etc.

If Light Scene 3 changes to On
Then Turn Off Scene 1,2,4, etc.

With Voice Control such as Alexa Echo, even the Routines can be turned on via Voice.

It’s really about how you approach your HA. The more devices I added, the more harder it became to keep track of everything. I stopped using Routines and Modes a while back and now just treat each room as it’s own entity using common names and being sure I build Master Overrides into each Piston.

Alexa, turn off bathroom automation-this stops any automation tied to the bathroom for a set period of time specified in my Automation Master Piston.
Alexa, turn off bathroom-this turns off everything in the bathroom
Alexa turn on bathroom-this turns on the bathroom scene
Alexa turn on bathroom automation-this turns back on automation and re-triggers everything

1 Like

@rontalley I like the idea of a master override switch for each room. But won’t it get swept up with other switches if you ask Google Home to “turn off bedroom”. As far as I know that would cause anything with bedroom in the name to be turned off.

Have you experienced this and how do you avoid it?

I’m an Alexa user and there is no “auto grouping”…Even if it was, I would disable it as I prefer to be in complete control of my setup.

Funny thing though, I also have a Master “Off” Switch for each room! It turns on if any of the devices are on via a webCoRE rule. It is also how I address your question above.

If any of A, B, C, etc are on
Then using Master switch turn on

If all of A, B, C, etc are off
Then using Master switch turn off

If Master switch is off
Then using A, B, C, etc
Wait 10 seconds
Turn Off

This way I can say, Alexa, turn off Master Bedroom and everything that I have in the Master Bedroom turns off. Doesn’t matter what name it has.

FYI, I got this figured out in webCoRE. I can run it any time of day and no matter what state the lights are in, it will set them to what they should be at.


You can set Google to only command certain switches via it’s SmartApp. Works a treat.

That’s true but then you can’t ask Google to turn off bedroom automation, you’d have to do that manually in the ST app. Maybe it’s just a case of using a switch name that doesn’t include the room name. Not so user friendly though.