X10 Community Forum

🖥️ActiveHome Pro => Plug-ins => Smart Macros => Topic started by: bebop on November 17, 2004, 12:36:14 AM

Title: Simple Smart Macro Fails
Post by: bebop on November 17, 2004, 12:36:14 AM
OK, this is my first attemtp to get a smart
macro up and running. I figured I'd keep it
very simple to make sure I'm doing things
correctly. First, for what it's worth, I
have my CM15A set to monitor house code A. I
created a very basic smart macro that tests
to see if it is after a specific time, and
if that is true then turn on module A5. The
smart macro trigger is A12. Well of course
it didn't work and I've tried changing a
couple things and resetting the trigger time
but nothing happens. So I take it that the
macro needs something else to trigger it?
Title: Re: Simple Smart Macro Fails
Post by: steven r on November 17, 2004, 01:54:57 AM
I'm having problems also.

Maybe I don't understand how to program the
conditionals yet but I believe I correctly
set one to blink a light once if between
1:00am to 1:45am. I set the else to blink
the light twice between 1:45am to 2:00am.

Regardless of what time I triggered the
macro, it was the else that executed.
Title: Re: Simple Smart Macro Fails
Post by: bebop on November 17, 2004, 02:10:23 AM
What did you use to trigger the macro or how
did you get it to fire?
Title: Re: Simple Smart Macro Fails
Post by: mike on November 17, 2004, 02:58:24 AM
I'm still waiting for the promised
SmartMacro plug in after X10 glitched the
first attempt but it sounds like you just
want a timer. A conditional macro only
checks the time when it is fired and either
runs or exits. Unless it is triggered in
its "allowed" time nothing happens. It's
useful for stuff like only putting on
outside lights when motion is sensed in
certain hours but it needs something like a
motion sensor or manual RF trigger to run
at all.

Mike
Title: Re: Simple Smart Macro Fails
Post by: steven r on November 17, 2004, 08:21:41 AM
I used an RF remote.
Title: Re: Simple Smart Macro Fails
Post by: bebop on November 17, 2004, 08:59:57 AM
"I used an RF remote."

That helps explain my misunderstanding. I
thought that a conditional macro could be
triggered by simply testing for dusk or
dawn. Looks like it needs an external
triggering device to fire. I used one of my
RF remotes and set it to A12 which is the
Macro address and things worked. Now all I
have to do is figure out how to apply all
this new knowledge in a pracital manner. lol
Title: Re: Simple Smart Macro Fails
Post by: bebop on November 17, 2004, 11:08:21 AM
I thought I read somewhere that a smart
macro can be triggered by a timer. I haven't
been able to get that to work. Can anyone
explain how to get a timer to trigger a
smart macro or am I just plain missing the
obvious here. TIA
Title: Re: Simple Smart Macro Fails
Post by: mike on November 17, 2004, 11:56:02 AM
You can attach a timer to a regular macro
but I don't know if you can to a
SmartMacro. Click on the + symbol next
to "Timers" in the left pane and a list of
defined modules and macros appears to allow
you to select what you want to attach the
timer to. Are the SmartMacros shown? If so,
you should be able to trigger them with a
timer.

I think you should be able to but I can't
be sure as I'm still waiting for the SW
after getting the SmartMacro offer from
Michael Cole last Thursday and the botched
registration & download e mail last Friday.
It's getting to the point where it would
have been far less aggravating to pay for
it although I'm still likely to return
everything ($200+) before I do that as a
matter of principle.

Mike
Title: Re: Simple Smart Macro Fails
Post by: X10 Pro on November 17, 2004, 12:50:04 PM
Mike: You have an e-mail from me about Smart
Macros.

In the current implementation, a timer for a
macro with conditions works the same as for a
timer without conditions -- at the time set,
the macro runs, regardless of the condition.
Title: Re: Simple Smart Macro Fails
Post by: bebop on November 17, 2004, 02:24:55 PM
"In the current implementation, a timer for
a  macro with conditions works the same as
for a  timer without conditions -- at the
time set,  the macro runs, regardless of the
condition."

Well that explains why I can't get a any
conditional elements into a timer controlled
smart macro. I guess the question whether or
not there are plans to change this so that a
rimer can really control a SMART macro?
Title: Re: Simple Smart Macro Fails
Post by: bebop on November 17, 2004, 02:27:57 PM
You know, I'd really like to be able to edit
my posts! lol  The question is whether or
not there are plans to allow a timer to
trigger a SMART macro with conditional
elements.
Title: Re: Simple Smart Macro Fails
Post by: mike on November 17, 2004, 02:41:30 PM
Now I'm confused. Guys are you saying you
can't write a Smart Macro that tests a flag
and modifies it's actions based on the flag
and then attach a timer to it? Mike's super
prompt reply seems to imply the opposite.

It would make sense to me if you can't
attach a timer to a macro that has a time
based condition since that would be a test
that would be redundant since it would
always be either true or false.However, it
would be a major shortcoming if we couldn't
attach timers to Smart Macros that test
flags. I'd like to set up Palm Pad macros
that set/reset flags for when I get home
and go out, then have timers that trigger
lights on/off only when the "not home" flag
status is set.

Mike
Title: Re: Simple Smart Macro Fails
Post by: Noam on November 17, 2004, 02:49:32 PM
Why do the timers run regardless of the
condition?
How would I do the following:
Have a light H2 turn on  at 4:00 pm, ONLY if
another light (H3) is on as well?
I can create a macro to turn on H2 only if
H3 is on, but you're saying that if I set
that macro to run on a timer, it will ALWAYS
turn the light on? How do I schedule a
conditional macro to run at a certain time?
Title: Re: Simple Smart Macro Fails
Post by: X10 Pro on November 17, 2004, 03:28:51 PM
You guys point out good uses of timed macros
where you still want the conditions tested.
The way we currently create the timers that
doesn't happen, but I'll make sure we change
that soon.
Title: Re: Simple Smart Macro Fails
Post by: bebop on November 17, 2004, 03:52:04 PM
"You guys point out good uses of timed
macros  where you still want the conditions
tested.  The way we currently create the
timers that  doesn't happen, but I'll make
sure we change  that soon."

Great, that's good news. I have been using
simple conditional macros with my CP290 and
using a shareware loader utility for the
last 10 years! I would have a light turn on
or off depending on whether or not dusk or
dawn would occur before or after a specific
time for example. I know that's a simple
conditional test but one that was very
helpful depending on seasonal lighting
changes. Now with the use of the new
conditional smart macros and external light
sensors like HawkEye or EagleEye
accommodating for cloudy scenarios which
produce an artificially early dusk would be
possible too -- but being able to use timers
to trigger real conditionals is a good
starting point. As I see it, the current
timers would have to have to be capable of
being set to "any" rather than a specific
time, just some way to trigger the logic
part of the macro to fire another module.
Title: Re: Simple Smart Macro Fails
Post by: rcb923 on November 18, 2004, 11:41:14 PM
I have a Motion Sensor (D1) to trigger my
porch lights,
Front light(E1)and back light(E2), both are
controlled by Deco wall switches. I have 2
macros, one for D1 ON and another for D1
OFF. Both E1 and E2 switch modules have
timers to turn ON at Dusk and OFF at Dawn,
these seem to work OK.
The D1 ON macro brightens E1 to 100% delays
15 seconds then brighten E2 to 100%.
The D1 OFF macro has a 2 minute delay, Dims
E1 to 50%; delay 2 minutes then Dims E2 to
50%. These work OK.

The problem is I want them to work ONLY at
night.
I added a simple condition to both macros.
I've tried using "Between Hours" (17:00 -
02:00), "Dusk/Dawn" and the "Nighttime"
condition. But, the lights will trigger 24
hours a day or not at all.
Title: Re: Simple Smart Macro Fails
Post by: mike on November 19, 2004, 12:07:31 PM
X10Pro wrote
"No dueling macros -- the first condition
that's true will be the one that runs."

My first attempt at a SmartMacro seemed to
defy that with both the if/then and else
Macros running with a single trigger. I
tried to replicate it with a simple test
case added to an empty file and initially
observed only the first Macro (with its
conditions met) in the if/then, else chain
running. Playing with it a bit, I managed
to get both the if/then and else Macros to
run on only a single trigger event.

It turned out that when the else macro had
no conditions and its first step was a
delay, that both the if/then and else
macros ran. Try this setup;

Continued in next post.
Title: Re: Simple Smart Macro Fails
Post by: mike on November 19, 2004, 12:08:47 PM
Continued from previous post

House code A monitored
Dimmer module (WS12A) set to A1. Macro
trigger A2.

If/then Macro
If Module A1 = Off
Dim A1 by 50%

Else Macro
Delay (I tried 1 sec, 5 sec and 1 min)
Turn A1 Off

Expected behavior: First trigger from Palm
Pad should turn lamp A1 on and dim to 50% ,
second trigger should delay and then turn
lamp A1 off. Sequence should repeat with
additional triggers.
Observed behavior with a single trigger:
Lamp A1 turns on, dims to 50% and turns off
after the delay configured in the Else
macro. The else macro always ran regardless
of whether the if/then ran. (Also tested by
first turning on lamp A1 with Palm Pad
before triggering A2)

Continued in next post
Title: Re: Simple Smart Macro Fails
Post by: mike on November 19, 2004, 12:09:12 PM
Continued from previous post


Remove the delay at the start of the Then
macro and the expected behavior occurred.
With the delay in place adding a condition
to the else macro got even more
interesting. The condition of the else
macro only seemed to get evaluated when the
if/then macro module A1 off condition was
not met. If the if/then macro ran, the else
macro ran regardless of whether it's
condition was met. If the if/then didn't
run due to it's condition code not being
satisfied, the else macro ran only when
it's condition was met.

Hope that makes sense. I've either got a
flaky cm15a or there's an "undocumented
feature" associated with a delay at the
start of an else macro. This was tested
both with the cm15a connected to the pc and
standalone.

PLEASE do NOT change this behavior unless
we get some way to halt (not just restart)
a running macro. I've identified simple
tasks I can't figure out any other way to
get working without this behavior. Example:
Without a 2 way module, when motion is
sensed, turn on and dim a lamp, turn off
after a delay but restart the delay without
redimming the lamp each time motion is
sensed again. I can't put the delay and
lamp off in the if/then or it will complete
and turn off the lamp even if additional
motion is sensed. Without this behavior the
else macro will never execute so putting
the delay and off there doesn't work when
motion is only sensed once.

Mike
Title: Re: Simple Smart Macro Fails
Post by: harry on December 20, 2004, 07:59:03 PM
Is it just me or does using the Time Range
in SmartMacro behave differently than using
two Specific Times that create the same
condition? I have a conditional macro
triggered by a motion sensor to light a
light in the kitchen and turn it off after
a few minutes. The macro contains two else
conditions. Basically from 11P to 5A the
light dims to 50%, from 5A to 9A it lights
to 100% and from dusk to 11P it lights to
100%. I could not get this to work with the
Time Range condition but it works fine
using Specific Times and giving a time
after and a time before.
Title: Re: Simple Smart Macro Fails
Post by: Henri T on January 05, 2005, 12:18:23 PM
Harry ...
I think you have to make 3 macros instead
of 2 because one of them use a time range
that overlaps two days !

According to the tests I have made, you can
not specify a time range covering a lap of
time before and after midnight !