X10 Community Forum
🖥️ActiveHome Pro => Plug-ins => Smart Macros => Topic started by: JJtech on April 15, 2009, 08:19:27 PM
-
After more years of programming than I care to admit, X10 seems to have done me in. I can’t for the life of me see why this isn’t working.
Very simple:
If trigger L8 is on as well as flag 5, then clear flag 5 and turn on K9 else set flag 5 on and turn on K6.
JPEGs attached.
Results: First time (with flag 5 off), K6 turns on and flag 5 is set to on. That part works as it should but from then on, both K6 and K9 turn on every time.
Am I going crazy here???
JJ
P.S. I must be jinxed, now the forum is telling me my attachment is too large. My jpeg is only 114 and 121 KB. I will try to post the two jpegs separately.
-
Here is the second screen shot.
JJ
-
Here is the second screen shot.
JJ
From what I see in your "Else Conditions" you have it set "If Flag 5 is OFF" and in your "Falg" settings you have it under "Set Flag" instead of "Clear Flag Set"....
-
In the "else Turn on K6" macro, I only want to execute that macro if flag 5 under the conditions test is off. If that is so, then I want to turn flag 5 on so that the next time the "Turn on K9" will execute.
The way it is written, it should flip flop from one to the other. At least that is what I am shooting for.
-
Am I going crazy here???
Nope.
Move the set & clear flag statements so they occur after the Kx ON in each macro (IE make the set & clear the last thing you do in each macro). I have seen this before. "Smart" macros execute all elses if their conditions are satisfied; and sometimes one else macro starts to execute before it checks the conditions of other else macro, and sometimes the previous can set the conditions right for the latter.
-
JJtech,
May or may not apply, but since nobody else has mentioned it...
When testing macros, if you click on the macro in AHP, trigger conditions are ignored!
>!
-
Puck,
YOU ARE THE MAN! That did it! Is there some logical reason behind this that I missed or just a case of the high quality standard of the X10 code?
Thanks much! I feel I have regained a small bit of my sanity back this morning!
Bill,
Thanks for you input. No, I am executing the macro via a mini controller trip.
JJ
-
...Is there some logical reason behind this that I missed or just a case of the high quality standard of the X10 code?...
I'm don't see any logical reason so I suppose we have to attribute it to the high quality X10 programing code.
Personally I'd like to call it as I see it. A bug. B:(