X10 Community Forum

🖥️ActiveHome Pro => Plug-ins => Smart Macros => Topic started by: jerry r on March 13, 2005, 10:49:20 PM

Title: turn off timer or delay just one time
Post by: jerry r on March 13, 2005, 10:49:20 PM
I have a timer I finf the need to disable or
delay just for that cycle.

Any Idea's?
I do have smart macro installed.
Title: Re: turn off timer or delay just one time
Post by: joe s. on March 14, 2005, 12:01:12 AM
This is how I would approach that in my
Smarthome PLUS program - the concept s/b
somewhat similar with Smart Macros.  What I
would do is to place a "ghost" module in my
monitored house code - then each of my timed
sequences that needed to change would have a
"check-the-ghost-module" condition added (eg.
"At 7:00AM if ghost-module is
ON...then....X", "Else - at 7:00AM if "ghost
module" is off....then...Y.  You can use a
RF/palmpad or (I guess) even a motion sensor
with "if motion is sensed after 8AM - turn
ghost module on" in the mornings when you're
home....and then set a permanent timer to
turn the ghost module off at...say...midnight
each day.  AHP apparently uses flags...maybe
flags are better than ghost-modules for this
application in AHP...I wouldn't know.
Hopefully this give you some idea as to the
approach.
Title: Re: turn off timer or delay just one time
Post by: donald mcmow on March 14, 2005, 10:35:49 AM
Create 3 macros:
The first one just set a flag and use what
ever trigger you want from a remote (use
this to disable your second macro).

The second macro - check the flag if it is
set then clear your flag.

Else

Setup a third macro to do your dirty work.

Set up your timer to trigger the second
macro only. When you want to skip a cycle
trigger your remote and the next time the
timer triggers the macro it will check the
flag - if it is set then the flag is
cleared and nothing happens. If it is not
set then the dirty work (turning on your
lights) will run - thats it.
Title: Re: turn off timer or delay just one time
Post by: jerry on March 17, 2005, 10:22:36 PM
Donald, thanks for the idea. I just don't get
it though. I can set a new macro so if I use
O10 it will set a flag. But then what
troggers a second macro?
And how can I set a condition to a module to
control the TIMER function.

I guess it is simple once my brain connects.
Title: Re: turn off timer or delay just one time
Post by: donald mcmow on March 18, 2005, 12:16:52 AM
The timer is your regular main macro
trigger timer - it will all ways run - even
if you don't want the macro to run it will.
When you trigger your remote that sets a
flag then when the timer runs the macro the
following happens: Your macro will check
the flag, since it is set it will execute
the code in the macro - to clear the flag -
it will not run the macro doing your dirty
work. The next time the timer runs the
macro things happen differently. Since the
flag is cleared the macro doesn't do the
portion that clears the flag - it does the
dirty work macro. This will happen
everytime the timer runs - unless you
trigger the flag macro.
Note : set means to turn the flag on (same
idea as turning on a light switch)
Reset/clear means to turn the flag
off (same as turning the light switch off).

I hope this clears the water a little.
Title: Re: turn off timer or delay just one time
Post by: jerry r on March 18, 2005, 06:02:46 AM
Thanks Donald. I don't really run a "macro"
It's just a module switch with timers set to
go on-off certain hours.

Can I still make this work with this?
Title: Re: turn off timer or delay just one time
Post by: donald mcmow on March 18, 2005, 09:48:59 AM
If you want to turn off the timer every
time you want to manually - then sure you
can. I was giving you a way to do it with
out having to go into AHP all the time to
make changes. Doing it with macros is the
easiest way of doing it - once you
understand how the macros work then you can
do almost anything you wish - it's a matter
of thinking of how to do it.
Title: Re: turn off timer or delay just one time
Post by: jerryray on March 18, 2005, 01:33:48 PM
OK Donald, so how would I set up the macro do
do the same.
The module has the timers you set. But I
cannot stop a timer. I can turn it back on,
but not have it activate the off command.

If I use a macros can it do the same thing
and have 3 different times during the
different days, and still use a flag to
disable it one time?

BTW Thanks for your help and patience.
Title: Re: turn off timer or delay just one time
Post by: donald mcmow on March 19, 2005, 01:30:53 AM
Macro #1 - Click "Use Conditionals"
drag and drop "Flag Status" to the point
indicated. Edit it, click Check the flags
are "OFF", place a checkmark in flag #2.
Click "ADD ELSE".

Macro #2 - This is your ELSE macro - on the
lower right hand side find "Flags SET/CLEAR
HARDWARE" and drag into your macro. Change
selection to "Clear Selected Flag" and
place a checkmark in flag #2.

Macro #3 - Click add new macro - Change the
trigger/name to what ever you want (this
trigger will be a button on your remote).
Add the "Flags Set/Clear Selected Flags"
module to your macro. Click "Edit",
select "Set Selected Flags" and place a
checkmark in flag #2.

Set your timer to trigger the #1 macro.
When the macro is triggered it checks the
status of flag #2 - if NOT checked it
continues running the rest of the macro. If
checked it will run the "ELSE" macro #2 -
which clears the checkmarked flag #2 in
preperation for the next time and does
nothing else. When you press the remote
button for macro #3 - it places a check
mark in Flag #2 and does nothing else. And
then the next time macro #1 is triggered
the flag is checked.

Doing a set delay time is similar but a
little more complicated. If you need
additional help then it's availble for the
asking. Good luck. Don
Title: Re: turn off timer or delay just one time
Post by: donald mcmow on March 19, 2005, 01:34:04 AM
OOPS - forgot to add - flags 15 and 16 are
used by AHP for Dusk/Dawn and Flag #1
appears to be used to indicate if changes
have been saved to the interface. It is a
good idea to stay away from these - all
others are OK to use.
Title: Re: turn off timer or delay just one time
Post by: jerry on March 19, 2005, 09:33:52 AM
Hi Donald, ok, first what name for macro 1

When you say "set your timer to trigger the
#1 macro"  Do you mean my module that has the
on-off timers, or some other timer?
Title: Re: turn off timer or delay just one time
Post by: joe s. on March 19, 2005, 10:07:56 AM
Donald,
You could try posting sample/screenshots
over on accessx10.com - that might help
Jerry visualize your answer(s).
Title: Re: turn off timer or delay just one time
Post by: donald mcmow on March 20, 2005, 02:13:14 AM
Jerry: head over to www.accessx10 and goto
the Forums/Macros and Smart Macros section.
I have placed an example that you can
download to see what I tried to explain to
you. This will give you an idea as to what
to do. NOTE - I did not tell you exactly
what to click in AHP but it should be
fairly easy to figure it out. You MUST have
Smart Macros installed in your copy of AHP
as it won't work otherwise. If you need
more help just leave a note.
Title: Re: turn off timer or delay just one time
Post by: jerry r on March 20, 2005, 11:55:45 AM
Donald, OK I understand what to do. Thanks

Since I set this module on and off two
different times per day. IS this true

I need one set of macro's to turn this module
on and another set of macros to turn this
module off X 3 sets?

The reason I am thinking this is once a timer
is set to run the macro that turns a module
on, I don't see any off command in the macro
timer interface.

Am I close now?
Title: Re: turn off timer or delay just one time
Post by: jerry on March 20, 2005, 08:09:18 PM
Donald, I really feel stupid, but I can't get
that simple example to work with a simple app
module. Running just that program. It's as if
the flage are be ignored.
Title: Re: turn off timer or delay just one time
Post by: donald mcmow on March 21, 2005, 02:23:48 AM
It depends upon your setup - if you just
want to interrupt a timed "on" - it won't
matter if an off is sent because it would
be ignored - unless you place other events
in macro #2. Look at the events as they
happen - if you are concerned over a module
being left on due to the timing of a macro
then yes you would have to create
additional macros. If it won't matter
becaase the module is already off then you
won't have to create another macro to turn
it off. The example I have given is just
for whether a regularly timed macro runs or
not.
Title: Re: turn off timer or delay just one time
Post by: donald mcmow on March 24, 2005, 12:25:20 PM
It appears that release 3.183 of AHP fixes
the problem that we have been having with
the falgs and macros. I have just done some
testing of my example file and it now works
as expected. Update your AHP and try it out.