Here's what I would like to do.
I currently have a background sequence/script that turns on all of my lights to 60% between 5:30 - 10:00.
I want to change this slightly to have the lights fade up, from 0 - 60 at the start time and then fade out at the end.
If I put the Ramp command in the while loop for the time window, wouldn't the lights continually fade up and down each time the loop runs?
Any tips would be appreciated.
Thanks.
Jason
You would have to write a time constructor sequence to have the lights turn on before and after the main sequence. My sequence is attached to give you an example.
Thought I would post the newest script. I had problems with Vixen kicking me out and not starting the BGS, so I wrote a new script. It has multiple start times. Hope this is helpful.
Ok, I have a new question.
I have a good night sequence that will run at 10pm nightly. However, on Christmas and New Year's, I want to keep the lights on longer. I have separate start/end times for those. My question is what will happen at 10pm? Will the good night sequence try to run or will it be overridden by the special start/stop event?
Does that make sense?
Thanks.
Jason
I am not sure how you're setting your start and end times - I just coded and compiled this, but have not tested it, but it should allow you to have differing start and end times based upon the day of the month. You said Christmas and New Years - I translated that in Christmas and New Year's Eve - which is what I think you meant. Or I should say, now that you made me think about it - this is what I want to do... 🙂
DateTime now = DateTime.Now; //get the current time
//The DateTime constructor goes (YYYY, MM, DD, HH, MM, SS)
DateTime start;
DateTime end;
if (now.Day == 24 || now.Day == 31) {
start = DateTime.Parse("17:30:00");
end = DateTime.Parse("23:59:59");
} else {
start = DateTime.Parse("17:00:00");
end = DateTime.Parse("22:00:00");
}
If understand the DateTime.Parse syntax correctly (and I may not), the unlisted values - year, month, and day - should default to today's values.
So on everyday of the month except the 24th and 31st, the start and end times are 5:00 PM and 10:00 PM. On the 24th and 31st, they are 5:30 PM and just before Midnight.
Any .net scripting gurus have a cheat sheet or advice for things that will work in a background script?
I tested this evening and the start time worked perfectly...
...and it ended on time, so the "else" is working, I need to test the "if true" logic next...
