X10 Community Forum
🖥️ActiveHome Pro => Plug-ins => Smart Macros => Topic started by: spam4us on September 26, 2007, 02:03:47 AM
-
I read many posts about Delays. Some a couple of years old and some fairly new. Is there a guideline as to when a delay needs to be used and how long that delay would be. I've read all the "if you're new to X10" posts but there are varying answers. Some say use a 1 second delay; others say a 0 second delay; others say delays are not needed all the time.
Right now in all of my macros, I put a 1 second delay after each command.
Example:
trigger a1 On
If L1 on and Flag1 off
set flag1 on
delay 1 sec
set B1 On
delay 1 sec
set B2 On
Are these needed? My macros seem to run too slow.
Also if I am turning on/off a dummy module, do I need a delay there as well?
thanks
-
spam4us: In your example, none of the delays are needed.
Outside of their obvious use for applying a pause in the macro, here a couple reasons I experienced for using them:
1) When dimming a module, place at least a 1 second delay after it if there is another command to follow.
2) When turning ON or OFF two or more same House Code modules, I sometimes use a zero second delay between them; here is why...
E.G. Turn B1 ON, Turn B2 ON
a) Without a delay, the addresses are sent (B1, B2) and then the ON code is sent (B ON)
b) With the zero delay: B1 ON is sent and then B2 ON is sent (they are separated)
Just from my experiences, I found the zero delay method more reliable and it does not slow down the macro.
Also if I am turning on/off a dummy module, do I need a delay there as well?
Use at least a zero second delay prior to calling the dummy to ensure it triggers reliably (see reason 2 b above).
-
Just from my experiences, I found the zero delay method more reliable and it does not slow down the macro.
Wow hadn't thought of OR read about A ZERO sec delay before! THAT IS HELPFUL!