Page 1 of 1

[ANSWERED] Simulating Moonlighting

PostPosted: Sun Oct 05, 2003 8:38 am
by heedicus
Hello,
I am using x10 to control my saltwater aquarium and I am trying to figure out how to with using a lamp module simulate the moon. I would want it to basically like the moon fade on then fade off, but I would also like the intensity to change every day (like the moons cycle) is there any easy way to do this?
thanks
tren

Re: Simulating Moonlighting

PostPosted: Sun Oct 05, 2003 9:10 am
by matt (support)
heedicus wrote:
I am using x10 to control my saltwater aquarium and I am trying to figure out how to with using a lamp module simulate the moon. I would want it to basically like the moon fade on then fade off, but I would also like the intensity to change every day (like the moons cycle) is there any easy way to do this?

You can create an AppleScript application that modifies a user defined Indigo variable, say "isMoonlight", based on the moon phase. From within Indigo, you can then use this variable to trigger actions. Setting up an AppleScript to do this is easy, but I'm not sure what the algorithm is for determining moon phase. This should be something fairly easy to figure out though -- it is obviously a well known calculation (just not by me!). Have you google searched to see if anyone has an AppleScript to calculate moon phase? I guess it is a bit more than just moon phase -- you really want moon rise and set time, too.

regards,
matt

PostPosted: Sat Oct 11, 2003 11:42 pm
by Guest
hmm
I checked around and I think this may be a bit over my head. Is there anyway I can just make the lamp module brighten slowly over a set period of time then fade out over a set period of time?
thanks,
tren

PostPosted: Sun Oct 12, 2003 7:43 am
by matt (support)
Anonymous wrote:
Is there anyway I can just make the lamp module brighten slowly over a set period of time then fade out over a set period of time?

Hi Tren,

How long of a period of time? The SwitchLinc and LampLinc modules have a ramp rate setting that Indigo can download which goes as high as 9 minutes. This would be the easiest way to do it, but I suspect you want a much longer fade up/down rate.

The other technique involves using what I call cascading triggers. You'll use one trigger to turn on/off another Time/Date trigger. It would look something like this:

Time/Date Trigger: "gradual fade timer"
Time: "every 5 minutes" (or however often you want it to fade down another level)
Action: Send Device Action "Dim by %3" (or whatever small increment you want to fade down every 5 mintes)

Time/Date Trigger: "fade light down"
Time/Date: set to whenever you want the fade to start
Action: Enable Trigger Action "gradual fade timer" with Auto-disable after 120 minutes (change 120 minutes to however long it takes the above time/date action to fade the light all the way down)

A couple of notes on this. For this to work well, you should use a lamp/switch modules that supports either extended or preset dims (Leviton, SwitchLinc, LampLinc, PCS, etc). The genereic X10 modules aren't very good at doing precise dims which will likely cause it to dim down faster or slow than you really want. The extended/preset dim modules don't have this problem.

Secondly, we've had this request enough times that I'm considering adding an option (custom UI) to do this more easily in future verisons of Indigo. But for now you'll need to use a couple of cascading triggers to get the job done.

regards,
matt

Re: Simulating Moonlighting

PostPosted: Tue Apr 29, 2014 6:48 pm
by eightball
Realize this is an ancient thread - is this still the best way to do a fade time greater than 9 minutes?

I'm trying to get an insteon dimmer to go from whatever setting it's at to 0 over 30 minutes.

Thanks,

Anthony

Re: Simulating Moonlighting

PostPosted: Tue Apr 29, 2014 7:13 pm
by ckeyes888
Somewhere around here I believe there was a script called BrightenWithRate, or maybe DimmerExtender?, that allowed very long dim/bright times.

Carl

Re: Simulating Moonlighting

PostPosted: Wed Apr 30, 2014 4:27 am
by eme jota ce
You could use a Schedule that dims by 1% every minute.

Within the last couple years, I believe that Jay posted a compilation of schedules and triggers to simulate sunrise as an alarm clock that used this approach. You could just dim instead of brightening.

Re: Simulating Moonlighting

PostPosted: Wed Apr 30, 2014 9:55 am
by eightball
Thanks!