Jump to content
C4 Forums | Control4

Programming with date range year after year


Recommended Posts

I'd like to have my LED's coordinate with the "Seasons" if you will.  This time of year its a Red/Green Theme.  In the fall I'd do a Brown/Orange theme - these are the things that make the girlfriend very happy and enjoy the system.


As I have it now:

Alarm is OFF:

Light on:  Green top/black bottom

Light off: black top/green bottom


Alarm is ON:

light on: Green top/red bottom

light off: black top/red bottom


I have my backlight keypads set to Red - giving the Red/Green Xmas colors = girlfriend happy!


The thought is to keep the red bottom year round if alarm is on.   it is a helpful reminder to us that the alarm is on, as our alarm keypads are out of sight.


So say come spring, instead of Green showing a light is on, I'd like maybe Yellow or whatever color I am told represents Spring best (and I'd change the backlight color as well).  And so on


It takes a lot of programming to do what I said above (basically 4 lines of code per alarm on status and 4 lines of code per alarm off status), so ideally I'd like to program it once per season (32 lines of code to change the lights 4x a year!) and be done with it and just have it change say quarterly (for argument sake) that on Jan - March they are one set, April - June, July - Sept and Oct - Dec (would do different to match up with seasons, but just an example)


I can see the schedule agent, but I cannot pick months/days without picking a year. 


Long ramblings short, any way to program ANYTHING to just say Jan - March do XYZ.  I only see the option to do Jan 2015 - March 2015 as options.  I want it to repeat year after year, regardless of the actual year.  Just every Jan - March I want XYZ to execute.  





Link to comment
Share on other sites



Actually make schedule events for the date you want to start a 'season' and repeat yearly. I'll use two examples: "Holiday LED" (starts November 25th, repeats yearly) and "Winter LED" (Starts January 5th, repeats yearly)

Create a string variable "LED season"


When scheduled event "Holiday LED" executes

Set the value of "LED season" to holiday


When scheduled event "Winter LED" executes

Set the value of "LED season" to winter


Then use Ryan's LED driver: http://untestedhacks.com/2013/led-wizard-driver/ {this to make all changing multiple LEDs MUCH easier}

And use the value of the "LED season" to determine which line off of that driver to trigger:


IF alarm is off

-IF the value of LED season is holiday

--set the LED Color on [list as created by driver] TOP LED ON to Color [whatever]

--set the LED Color on [list as created by driver] BOTTOM LED ON to [.....you get the idea}

-IF the value of LED season is winter



And so-on.

As the variable "LED season" gets overwritten at the next 'season' start, there's no need for a counter date to turn it off this way.

The tricky thing is that I'm not 100% sure if the system would retain the variable value upon reboot, but you can always use compserHE to go to Agents and set the variable manually if that happens.

Indeed you COULD ditch the schedule events altogether and just manually change the value whenever you want (and in addition to actual 'seasons' have values such as "party" "romance" "doghouse" ;) )

Link to comment
Share on other sites

Thanks for the suggestions.  My dealer and I have been stumbling over the LED driver - he has installed it on numerous systems without a glitch.  When we install on mine, it is empty and does not see any of the switches in my house.  I have all the latest firmware, OS and lighting products, yet nothing is popping up.  We are going to reinstall and try it again either today or early next week.


After I get this to turn over 1 season or so I'll update back with the results.



Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...

Important Information

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