Jump to content
C4 Forums | Control4
  • 0

Scheduler & lighting scenes- Between two times


zg825

Question

I am trying to create various programs that will turn on at night and check if other scenes are active, but had a question regarding the scheduler.

 

For instance: If my garage door goes to Open, and time is between 10pm and Sunrise, and any of the 6 various lights in the kitchen are not on, then turn on the Mudroom light.

 

My thought on how to accomplish this is the following:

Set up 2 schedulers (Night Time at 10pm , and Sunrise)

Set up a variable so if night time is true, then the variable is true, and when sunrise executes, then variable is set to false

Set up Kitchen scene with all devices that are tracked to Off

 

Then the program would be:  When Garage door opens : If Variable is True & Kitchen Scene is Active, Then Turn on mudroom Lights. 

 

In my head, this seems like a path that would work. Does the "If kitchen scene is Active" mean at if any light in the kitchen scene is on, then the scene would be Inactive (if the scene is set up so it is tracked if Off, and set to 0%/Off)?  I know that there can be multiple ways to accomplish the same thing, but wanted to hear from others if they had a better suggestion for this

 

Appreciate the guidance

 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Least Programing (I think)
Lighting Scene KitMonitor - add lights you want to monitor, set each to off, set each tracking is off, set scene to track all loads.  (is only active if all associated lights are off.)
When door opens
--If KitMonitor is Active (largest dis qualifier)
----if night time (sunset to sunrise)
------if time is between 4pm and 10pm (halt if before 10pm, and is nightime)
--------Stop
------Turn on Mud

Link to comment
Share on other sites


  • 0

I've found it much more useful to use a variable and have that variable set by the scheduler.

I use two; Is_Dark and Is_Late (both boolean)
Is_Dark is true roughly between sunset and sunrise.
Is_Late is true between 10pm and sunrise.

Daily Schedule:
image.png.ef97cb304646a5918a670ff8d7e0a234.png

I then trigger a macro to do a bunch of stuff when each of these events is run, but basically they set the variables to true and false based on time of day.

 

I then use the variable in my event programming:

image.png.d6ac7943934a7725998bbf959e019daf.png

 

It means I don't have to keep adding time conditions all over the place when programming.
and my day/night moves with the seasons.

The reason for the second 'late night' option is so hallway and bathroom lights come on much dimmer later at night vs the early part of the night.

 

 

Link to comment
Share on other sites

  • 0
14 hours ago, brucecampbell said:

I've found it much more useful to use a variable and have that variable set by the scheduler.

I use two; Is_Dark and Is_Late (both boolean)
Is_Dark is true roughly between sunset and sunrise.
Is_Late is true between 10pm and sunrise.

Daily Schedule:
image.png.ef97cb304646a5918a670ff8d7e0a234.png

I then trigger a macro to do a bunch of stuff when each of these events is run, but basically they set the variables to true and false based on time of day.

I like that.
Thinking I may make it a state variable.

Early - 1hr before sunrise
Morning - 7 to 10 (getting ready)
Day - 10 to 4pm
Afternoon 4pm to Sunset-30
Night - Sunset-30 to 10pm
Late - 10pm to 1am
Owl - 1am to 1hr before Sunrise

Link to comment
Share on other sites

  • 0
34 minutes ago, RAV said:

I like that.
Thinking I may make it a state variable.

Early - 1hr before sunrise
Morning - 7 to 10 (getting ready)
Day - 10 to 4pm
Afternoon 4pm to Sunset-30
Night - Sunset-30 to 10pm
Late - 10pm to 1am
Owl - 1am to 1hr before Sunrise

Yeah - this is a good strategy.  I have the following variables backed by a scheduler agent that are used in various programming:

is_morning
is_afternoon
is_evening
is_night
is_late

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.