X10 Community Forum

🖥️ActiveHome Pro => ActiveHome Pro General => Software Problems & Bugs => Topic started by: Burdy on December 06, 2004, 12:48:42 PM

Title: Consecutive flag operations in macros don't work (3.172)
Post by: Burdy on December 06, 2004, 12:48:42 PM
My macro has a step that sets flag 1
(previously verified by looking at the
status report to be cleared) followed by a
step that clears bit 2 (previously verified
to be set).  After it gets triggered, both
flags 1 and 2 are set.  I've verfied other
consecutive flag operations in a macro don't
work (the second step doesn't seem to
execute).

If you insert a delay step between the
consecutive flag operations (even a delay
set to zero) that the macro then works.

I seem to remember that on an earlier AHP
release consecutive module on/off operations
didn't work without a similar workaround
(athough they do now).  Can this problem
with consecutive flag operations be fixed?
Title: Re: Consecutive flag operations in macros don't work (3.172)
Post by: steven r on December 06, 2004, 01:43:29 PM
I have yet to consciously be able to set or
clear a flag from a macro. (Somehow flags 1
& 15 are currently set.)

Every time I click on the icon to execute a
macro that includes steps to set or clear a
flag I get the message "The macro you are
running contains flag commands that will
not be executed. Do you want to run this
macro anyway?"

Even if I do decide to run it anyway, there
is no change in the flag status.

e.g. I built two macros. One to set all the
flags and the other to clear all the flags.
Even adding delays as you suggested or
changing them to only set or clear 1 flag
results in the same results.

I've emailed the bug as well as posted the
problem elsewhere so hopefully I know
something soon.
Title: Re: Consecutive flag operations in macros don't work (3.172)
Post by: Burdy on December 06, 2004, 01:52:59 PM
I see that behavior also (flag bits don't
get set if macro is triggered from the AHP
interface rather than an RF trigger).  I'm
not sure if it's an undocumented restriction
or just a bug. The 'not being able to use
consecutive flag steps' is a different
problem.

By the way, as of 3.172, I also experienced
unpredictable and unexpected setting of bit
15 in the flags. I also saw bit 2 and bit 14
pop up unexpectedly.  I'll post a separate
thread for that problem since I don't think
its an isolated incident if you have also
experienced it.
Title: Re: Consecutive flag operations in macros don't work (3.172)
Post by: X10 Pro on December 06, 2004, 02:04:33 PM
Flag commands currently aren't run from the
software, which is why you get the warning
message. If you trigger the macro with a
remote or powerline controller, the flag
operations will work.
Title: Re: Consecutive flag operations in macros don't work (3.172)
Post by: mike on December 06, 2004, 02:28:12 PM
Steven R,

Try triggering the Macro with an rf remote
so it runs in the cm15a. As the message
indicates, macros run from the PC don't
affect flags. I'm not sure why they did it
that way and it's a limitation but not a
bug.

Burdy,

I've got a Smart Macro that sets flag 1 and
clears flag 2 in consecutive steps that
appears to be working correctly in 3.172. I
haven't actually checked the flag status
but the macro should be failing if both
operations don't occur correctly.

Are the flag operations, the first steps in
the macro? Mine follow a module dim command
but there is no delay between the set and
clear flag operations.

Mike
Title: Re: Consecutive flag operations in macros don't work (3.172)
Post by: Burdy on December 06, 2004, 02:31:08 PM
Thanks, X10 pro, I understand that part.
Can you comment on the behavior of the
second of two consecutive flag operation
steps not executing (when the macro is run
from the hardware)?  The scenario I am
reporting does include the macro triggering
with an RF trigger.

The macro executes, but only the first flag
operation step seems to affect the flags. If
there is a flag operation step immediately
following, it seems to be ignored.  Adding a
delay step (even if 0) seems to be needed to
allow the 2nd flag operation to be executed.
Title: Re: Consecutive flag operations in macros don't work (3.172)
Post by: Burdy on December 06, 2004, 02:56:07 PM
Mike,  I stumbled across this because my
macro wasn't working correctly.  I then made
a couple of experimental macros to see what
was going on (and checked the flag status to
verify).
In my orignal macro, the flag
manipulations weren't the first steps. But I
don't think it matters-- if you start with a
known flag configuration (so you can tell
what the state should be after your macro
executes), and create a trivial macro that
includes  a couple of consecutive flag
operations (that you set up so you can
verify whether the second one actually did
anything), then trigger it (from the
hardware via RF) and look at the flag
status, I think you'll find the second flag
operation will not have executed.  If you
add a delay step in between, it will work.

I'd prefer not to have to do that since it
seems like a drain on the CM15A's resources
to have the extra delays added.  Also, I'm
assuming that a zero delay is a 'supported'
configuration (and doesn't cause any
unwanted side effects like underflow).  I
notice that you can't select a default timer
delay of zero in the Preferences using the
dropdown arrow, although you can manually
type it in the delay field.  
Title: Re: Consecutive flag operations in macros don't work (3.172)
Post by: X10 Pro on December 06, 2004, 03:03:26 PM
I tested this out here, and it looks like
we're not encoding the second command in the
sequence when we're storing the macro in the
interface. We should be able to fix this
pretty quickly.
Title: Re: Consecutive flag operations in macros don't work (3.172)
Post by: Burdy on December 06, 2004, 03:14:58 PM
Thanks! Once these bugs get swatted, AHP
will be an awesome tool. There seems to be
enough flexibility in the functions provided
to easily do (in theory, not quite yet in
practice)  exactly what I've been wishing my
standalone CP290 could do for years (I don't
want to tie up a computer to run my lights,
yet I want the bells and whistles).  I can
appreciate the difficulty in getting the AHP
software to hide all the complexity from the
user.
Title: Re: Consecutive flag operations in macros don't work (3.172)
Post by: steven r on December 06, 2004, 05:23:46 PM
"Flag commands currently aren't run from
the software, which is why you get the
warning message. If you trigger the macro
with a remote or powerline controller, the
flag operations will work."

I'm doing a status report to view my flags.
Triggering them from an RF remote has no
effect on flag status either. The activity
monitor says my macros are being run.
Title: Re: Consecutive flag operations in macros don't work (3.172)
Post by: steven r on December 06, 2004, 05:28:39 PM
BTW... It would be helpful to be able to
clear and set flags from AHP for testing
purposes, if for no other reason.
Title: Re: Consecutive flag operations in macros don't work (3.172)
Post by: steven r on December 06, 2004, 05:29:34 PM
BTW... It would be helpful to be able to
clear and set flags from AHP for testing
purposes, if for no other reason.
Title: Re: Consecutive flag operations in macros don't work (3.172)
Post by: steven r on December 06, 2004, 05:29:59 PM
BTW... It would be helpful to be able to
clear and set flags from AHP for testing
purposes, if for no other reason.
Title: Re: Consecutive flag operations in macros don't work (3.172)
Post by: steven r on December 06, 2004, 05:30:18 PM
BTW... It would be helpful to be able to
clear and set flags from AHP for testing
purposes, if for no other reason.
Title: Re: Consecutive flag operations in macros don't work (3.172)
Post by: steven r on December 06, 2004, 05:32:41 PM
BTW... It would be helpful to be able to
clear and set flags from AHP for testing
purposes, if for no other reason.
Title: Re: Consecutive flag operations in macros don't work (3.172)
Post by: steven r on December 06, 2004, 05:42:22 PM
Sorry about all the duplicate messages. The
forum kept giving me an error message when
I tried to submit. I guess it kept trying
also and finally posted them all.
Title: Re: Consecutive flag operations in macros don't work (3.172)
Post by: steven r on December 06, 2004, 05:45:02 PM
Sorry about all the duplicate messages. The
forum kept giving me an error message when
I tried to submit. I guess it kept trying
also and finally posted them all.

This is the error message I keep getting:

Internal Server Error
The server encountered an internal error or
misconfiguration and was unable to complete
your request.
Please contact the server administrator,
webmaster@x10.com and inform them of the
time the error occurred, and anything you
might have done that may have caused the
error.

More information about this error may be
available in the server error log.

Please feel free to delete extra posts.
Title: Re: Consecutive flag operations in macros don't work (3.172)
Post by: steven r on December 06, 2004, 05:49:06 PM
I just noticed that flag 16 has been set.
That means I now have flags 1, 15, & 16 now
set.
Title: Re: Consecutive flag operations in macros don't work (3.172)
Post by: X10 Pro on December 06, 2004, 06:04:54 PM
We are using flags 15 and 16 (setting and
clearing them with timers) to track dusk/dawn
changes for conditions that use dusk/dawn.
Title: Re: Consecutive flag operations in macros don't work (3.172)
Post by: mike on December 06, 2004, 06:13:10 PM
X10 Pro,

Please explain your last post more fully.
Are you saying that the cm15a is internally
using flags 15 & 16 and these should not be
used for other operations? If not, then are
you just giveing an example of how flags
can be used to allow dusk/dawn conditions
can be checked efficiently or ????

Mike

Title: Re: Consecutive flag operations in macros don't work (3.172)
Post by: X10 Pro on December 06, 2004, 06:43:10 PM
If you are using Dusk/Dawn based conditions,
you shouldn't use flags 15 & 16. We're using
them internally. We didn't want to only give
you 14 flags to work with since we only use
them if you have Dusk/Dawn conditions, but we
should probably label them that we in the
software when they're in use.
Title: Re: Consecutive flag operations in macros don't work (3.172)
Post by: steven r on December 06, 2004, 07:07:06 PM
"We are using flags 15 and 16 (setting and
clearing them with timers) to track
dusk/dawn changes for conditions that use
dusk/dawn."

In what conditions are they set? It might
be useful flag to test for in a conditional.
Title: Re: Consecutive flag operations in macros don't work (3.172)
Post by: mike on December 06, 2004, 07:13:29 PM
Sorry Michael, still not nearly good enough.

1) Does this also apply to the use of
timers that trigger on dusk or dawn. I have
a timer attached to a module that
triggers "25 min before" dusk, yet I just
checked and flags 15 & 16 both remained
clear both before and after dusk here. We
need and deserve a better explanation of
what causes these flags to be used. I'm
curently using both!

2) "Daytime & Nighttime" show "require 2
entries" and actually do when used as
conditions in a Macro. Why, if you're
already setting flags for dawn/dusk
with "hidden" timers?

3) Why would you need TWO flags??? Why not
use one and set it for daytime and clear it
for nighttime???

4) I hope "we  should probably label them"
was careless writing and doesn't reflect
your attitude regarding the importance to
users of information like this.
Undocumented behavior like this can cause
your users MAJOR grief when mixed in with
chasing bugs like Burdy reported here or
the issue with macro behavior with a delay
at the start of an else macro that I
previously reported and was evidently fixed
without a mention in the release notes.

Mike
Title: Re: Consecutive flag operations in macros don't work (3.172)
Post by: steven r on December 06, 2004, 07:15:51 PM
Ok that explains 15 & 16.
Any idea what I or AHP needs to do so I can
build a macro to set and clear flags 1-14?
Title: Re: Consecutive flag operations in macros don't work (3.172)
Post by: X10 Pro on December 06, 2004, 07:42:59 PM
Mike: It was not my intention to be cavalier
about the documentation of this flag usage.
It's not currently documented and it needs to
be. My main point, however, was that we
should provide a label inside the program UI,
not just a write up in the Help file or
somewhere else. I'll see to it that we do that.

To answer your questions:

1) This does not apply to timers that use
Dusk/Dawn, only conditional macros.

2) Because of the way the logic to test for
night time and day time works, it requires
two of the condition slots in the macro.

3) There isn't a single test that you can do
inside the interface to determine day or
night. Two flags are required for this to work.

Steven R:

You can build the macro as you are doing now,
but instead of clicking on the "Run Macro"
button in the interface to get it to take
effect, just use a remote control to trigger
the macro.
Title: Re: Consecutive flag operations in macros don't work (3.172)
Post by: steven r on December 07, 2004, 01:05:47 AM
"You can build the macro as you are doing
now, but instead of clicking on the "Run
Macro" button in the interface to get it to
take effect, just use a remote control to
trigger the macro."

I think you missed my post that I was
having problems *even with* a remote
trigger.

Since that earlier post I did get flag 1 to
clear with another macro. On the other
hand, for the two macros that are just to
set or clear flags, nothing is happening
even from a remote trigger.

e.g. I have two macros: "F2 ON" to set
flags 1-14 and macro "F2 OFF" to clear
flags 1-14. No other instructions are in
the macros except the one for the flag set
or clear. No flags are changed in either
case.
Title: Re: Consecutive flag operations in macros don't work (3.172)
Post by: Tuicemen on December 07, 2004, 10:01:01 AM
Steven R  12/6/2004 04:15 PM
Ok that explains 15 & 16.  Any idea what I
or AHP needs to do so I can  build a macro
to set and clear flags 1-14?

This is what I've done :
creat a phantom module that off trigers a
macro in the macro place clear flag 1-14
then just click the phantom module and all
flags are cleared
if you want to set your flags for testing
use the phantom module on to trigger another
macro with the set 1-14 flags.
Title: Re: Consecutive flag operations in macros don't work (3.172)
Post by: Burdy on December 07, 2004, 12:26:34 PM
Steven R, just a thought.. you are viewing
a 'new' status report to view the  modified
flags, correct?  Even though it looks like a
web page, it doesn't get updated dynamically
(or  by choosing 'refresh') if the flag bits
change. It has to be closed, then
regenerated from the file.. reports.. status
menu each time.  Other than that, I'd be
stumped as to why the flags aren't updating
with an RF trigger with a trivial single
step macro-- that operation has been pretty
predictable on my CM15A (for bits 1-14,
anyway).
Title: Re: Consecutive flag operations in macros don't work (3.172)
Post by: steven r on December 07, 2004, 03:24:15 PM
"...you are viewing a 'new' status report
to view the modified flags, correct?"

Yes!
Title: Re: Consecutive flag operations in macros don't work (3.172)
Post by: mike on December 07, 2004, 03:34:29 PM
X10 Pro,

Sorry for seeming testy about this but
finding out that flags I'm already using in
macros can be overwritten is disturbing.
I've spent a lot of time working through
bugs/undocumented behavior already and I
wanted to make sure "we should probably
label them" was just an unfortunate choice
of language. I'm glad it was just that. If
it wasn't, I'd be running for the exit here
since I've finally identified a good
standalone alternative with conditionals.

1) Can you confirm that ONLY the "Daytime"
and "Nighttime" "Conditions" cause flags
15/16 to be used?

2) I'd suggest posting this info
prominently in the General forum ASAP to
save users grief.

3) The implementation requiring 2 flags and
2 conditions to check seems brain dead.
Can't I just set up a timer that triggers
flag 16 on at dawn & off at dusk, then
check flag status appropriately to achieve
the same result with one flag bit and one
condition? With this approach, the check
doesn't even require an additional
conditions when I'm checking other flag
bits for the same state and only requires
one condition worst case. Am I missing
something?

I did a quick chack and when a daytime or
nighttime condition is used, flag 16 seems
off in daytime and on in nighttime. Flag 15
appeared to be always set. For the life of
me, I don't understand why flag 15 is being
used or why 2 conditions are still required
to check for daytime or nightime unless
flag 15 is being used in a misguided
attempt to ensure flag 16 is "valid".

Mike
Title: Re: Consecutive flag operations in macros don't work (3.172)
Post by: mike on December 07, 2004, 03:41:10 PM
BTW, the number of available flag bits
seems to be the limiting factor in how much
I can implement with the cm15a. I'm going
through flag bits much quicker than
available memory hence my sensitivity to
them "disappearing".

Mike