Please login or register.

Login with username, password and session length

Author Topic: ELSE Macros...  (Read 4595 times)

PrimeGuild

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 44
    • Software Solutions
ELSE Macros...
« on: March 31, 2008, 12:34:27 PM »

Can someone enlighten me about the ELSE macros? From the interface they just appear like any other macros and don't really act as REAL ELSE Macros. People in here with programming knowledge might understand this better.

For example:

I design a Smart Macro to trigger between 1:00 PM and 3:00 PM (Condition 1) and only on Weekends (Condition 2). What I want to know is that if I design an ELSE Macro for the above Macro, then when will that ELSE Macro trigger?
Logged

Puck

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 171
  • Posts: 1799
Re: ELSE Macros...
« Reply #1 on: April 02, 2008, 11:20:40 AM »

...when will that ELSE Macro trigger?

When any of the preceding macro conditions are not true.... theoretically. In some cases it can execute even if the preceding macro's conditions are true (SW bug); in these cases, the use of mutually exclusive conditions in all macros usually helps.
Logged

martin

  • Sr. Member
  • ****
  • Helpful Post Rating: 2
  • Posts: 125
Re: ELSE Macros...
« Reply #2 on: April 02, 2008, 05:20:58 PM »

PrimeGuild,

If you have multiple "Elses", the macro will stop looking at alternative "Else" as soon as a condition is met. In your example, the macro would look for an "Else" option if it is not between 1:00 pm and 3:00pm during a weekday.

See one of my use of an "Else" macro where I toggle between my bed side lamp and read lamp with the same A15 On trigger. It does a full circle, same principle as a fan pull chain  :)

« Last Edit: April 02, 2008, 05:24:43 PM by martin »
Logged

Walt2

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 28
  • Posts: 787
Re: ELSE Macros...
« Reply #3 on: April 02, 2008, 06:20:42 PM »

Can someone enlighten me about the ELSE macros? From the interface they just appear like any other macros and don't really act as REAL ELSE Macros. People in here with programming knowledge might understand this better.

Yep, that has been exactly my experience.

One can't trust that they will only be executed if the "IF" is false.  So, all my "ESLE" macro re-check all conditions.  For example, if the "IF" executes when flag 1 is 'on',  I verify in the "ELSE" that flag 1 is indeed 'off'.

Maybe, someday, X10 will fix this bug.
« Last Edit: April 02, 2008, 06:22:48 PM by Walt2 »
Logged
* Sears Home Control System, Radio Shack Plug 'n Power, NuTone, Stanley LightMaker, BSR, HomeLink.
* Tecmar Device Master, CP290 (LightHouse), CM11A (AH), CM14A (AH2), CM15A (AHPro).
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.