🖥️ActiveHome Pro > User-Designed Working Macros

Artificial Sunset and Sunrise

<< < (3/3)

bilyth:
ok, i got it finally.  :D

for me, to make it work..i had to add a "lamp on at 1%" in the trigger macro before setting the flag. If i didn't, the loop would start with the lamp jumping to around 40% (don't know why). This way, the lamp goes on at 1%..then the loop starts & brightens from there.

This is for my bedside lamp. For the ceiling (wall switch)..i can't get it to work (because it isn't acting like soft start). Even if i keep it on a low % during the night, when the dawn trigger & loop kick in.. it seems like the "on" step (in the loop macro-before "brighten") causes the light to go to full (100%) & back each time it increases by 1%. I'm no sure how to make the loop work without a soft start switch. (i tried removing the "on" but the loop won't start). hopefully the ws12a that i'm getting will work properly.

I've got a nice dusk loop working for both though. (although the overhead needs to go to full brightness before it starts to dim too..kinda annoying when getting ready for bed)...

Now, i'm wondering if i can add some advanced features...for ex. a way to add a snooze feature: turning off lamp module during dawn loop will turn off both lamp & overhead (when i get it working) for x minutes..then turn both back on to its same level of brightness & continue the loop. have you tried anything like this?

i'm guessing it will be something like condition: lamp module off & dummy module on..macro turns off both lights & flag for "x" minutes..then set flag. But i'm not sure it will go back to the same brightness...i guess i could just make it go to a certain brightness..chances are i won't be snoozing unless it's near full brighness anyways...

zatomik:
I am trying the OP's looping macro using the "Pro Inductive Dimmer Switch" (pretty sure it's softstart).  Tested tonight with shortened delay times (1 sec between issuing the "brighten 3%" commands and 25 sec delay in the flagging macro that start/stops the loop) and it worked really well.

I already use a macro triggered from my remote to shut off the lights in the bedroom at night so I modified it to: [[MODULE ID]] dim 88%|delay 1 s|[[MODULE ID]] dim 88%|delay 1 s|[[MODULE ID]] dim 88%|delay 1 s| [[MODULE ID]] OFF.  This prepares the lights much better than my previous approach which was to set them ON them DIM in the beginning of the sunrise macro (used to give a bright flash at the beginning of the "sunrise" sequence which defeats the purpose a bit). 

Thanks for posting this - looping and exiting the loop using flags are extremely useful.

Let's hope I wake more naturally to the "sunrise" tomorrow - I'm really tired of that "Sting" CD in my alarm clock radio and I hope to be awake in time to preemptively switch it off.



--- Quote from: steven r on April 03, 2008, 08:42:24 PM ---Called Loop Approach
( In the continuing saga of ways to wakeup gently to light.  :) )

This assumes that the softstart module was predimmed the night before and turned off.
Uses 2 macros and a dummy module for triggering the loop.

Macro P13 ON                                   ;This macro starts and stops the loop.
Flag 9 On                                           ;Sets the flag needed for the loop to run
P14 On
delay 40 minutes
Flag 9 Off                                           ;Clears the flag to stop the loop

Macro P14 ON - Triggers on P14 On and flag 9 set
(C9) Steven Lamp   On                           
(C9) Steven Lamp   Brighten by 3%      ;relative brighten by 3%     
delay 1 minute
P14 ON                                              ;Triggers dummy module set as P14 which in turn loops the macro.

In this case, the light will continue to brighten by 3% every minute till flag 9 is cleared.

Set your wakeup time(s) as one or more of the timers for macro P13.

A third optional macro could be used as an escape macro. It would be set as the same HC/UC as the light you were controlling.

*Macro C9 OFF - Triggers on C9 Off and flag 9 set
Clear flag 9                                          ;Manually sending an X10 signal to turn off the light would also stop the loop
delay 70 sec
C9 Off                                                 ;Makes sure light is left off

*I'm doing more testing but there appears to be a bug, possibly in AHP, causing this macro to execute and clear the flag. In my test, my flag clears when this macro is present. I haven't found anywhere an off signal is being sent. When I renamed the macro as A4 to test, the flag isn't cleared.

--- End quote ---

Navigation

[0] Message Index

[*] Previous page

Go to full version