Please login or register.

Login with username, password and session length

Author Topic: More than one "AND" condition?  (Read 18580 times)

bitman

  • Hero Member
  • *****
  • Helpful Post Rating: 9
  • Posts: 597
More than one "AND" condition?
« on: February 26, 2009, 10:24:36 AM »

In a smart macro, I am testing these conditions:

IF The day of the week is Thursday *AND* the time is between 5:00am and 11:00am
Execute statements.....


I need to add another AND like so:

IF The day of the week is Thursday *AND* the time is between 5:00am and 11:00am *AND* module D1 is OFF
Execute statements.....

How can I do this?

It looks like the GUI in AHP will only permit 1 AND. Can I edit the XML to make it happen? (Seems dangerous and klugy to do so.)

Thanks in advance,

:Ron



Logged
Long live X10! - Because I just like it is all.....

Puck

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 171
  • Posts: 1799
Re: More than one "AND" condition?
« Reply #1 on: February 26, 2009, 02:22:33 PM »

It looks like the GUI in AHP will only permit 1 AND.

AHP will allow two ANDs (I.E. 3 conditions). Unfortunately the time condition you are applying uses up 2 conditions (internally); this is why you can only see one AND.

One method would be to set up a timer to turn a status flag on during that time frame each day (or just on the Thursday). Then you can use that flag as one of the conditions along with the D1 module status (assuming D is your monitored house code).
Logged

bitman

  • Hero Member
  • *****
  • Helpful Post Rating: 9
  • Posts: 597
Re: More than one "AND" condition?
« Reply #2 on: February 26, 2009, 02:29:48 PM »

Seems pretty prehistoric BUT, it's better than the way we had.  :'
Logged
Long live X10! - Because I just like it is all.....

Puck

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 171
  • Posts: 1799
Re: More than one "AND" condition?
« Reply #3 on: February 26, 2009, 02:55:24 PM »

Seems pretty prehistoric...

Not sure what you mean by prehistoric. Work arounds are never the ideal solution, but they are sometimes necessary when you have no control over the hardware and software you use. I'm sure there are other work arounds to accomplish the same task; there may even be a 21st century one out there.  ;)
Logged

steven r

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 74
  • Posts: 2189
  • Halloween with X10
Re: More than one "AND" condition?
« Reply #4 on: February 26, 2009, 03:11:44 PM »

I suppose if you had to have 3 "AND" conditions or some other multiple condition situation take didn't have another work around, you could chain a couple macros. i.e. If the conditions were met in the first macro, it could "call" a 2nd conditional macro.
Logged
BVC let's me tell my camera where to go!
:) Murphy is my beta testing pal. He helps me find problems whether I like it or not. :)

bitman

  • Hero Member
  • *****
  • Helpful Post Rating: 9
  • Posts: 597
Re: More than one "AND" condition?
« Reply #5 on: February 26, 2009, 04:25:49 PM »

Seems pretty prehistoric...

Not sure what you mean by prehistoric. Work arounds are never the ideal solution, but they are sometimes necessary when you have no control over the hardware and software you use. I'm sure there are other work arounds to accomplish the same task; there may even be a 21st century one out there.  ;)


Oh thier silly limited "Advanced Macros".
Coming from the C lanuage where I can make whatever spaghetti code I want to, this coding style and limitations seems older than BASIC. 
Logged
Long live X10! - Because I just like it is all.....

bitman

  • Hero Member
  • *****
  • Helpful Post Rating: 9
  • Posts: 597
Re: More than one "AND" condition?
« Reply #6 on: February 26, 2009, 08:25:22 PM »

Lost in all my frustration with being limited to any amount of conditions is:

Thank you all for your help!  >!
Logged
Long live X10! - Because I just like it is all.....

bitman

  • Hero Member
  • *****
  • Helpful Post Rating: 9
  • Posts: 597
Re: More than one "AND" condition?
« Reply #7 on: February 26, 2009, 08:37:35 PM »

Wow.

Now I think I understand what the "Monitored House Code" is. And why if the cm15a can address all house codes, are we limited to testing the state of a module on just one house code? That doesn't seem right.

I was able to overcome the AND problem by changing the time range to Thursday before 10:00am.
And now I see whay we are warned about the fact that some of the conditions we can pick say (requires two steps). I shoulda known something was up.  ::)

Logged
Long live X10! - Because I just like it is all.....

Knightrider

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 62
  • Posts: 1748
  • I love my WM100!
    • This Automated House
Re: More than one "AND" condition?
« Reply #8 on: February 26, 2009, 08:53:14 PM »

Ron,
You could always download the SDK and write your own app with as many "and"s as you want.
Logged
Remote control is cool,

but automation rules!

bitman

  • Hero Member
  • *****
  • Helpful Post Rating: 9
  • Posts: 597
Re: More than one "AND" condition?
« Reply #9 on: February 26, 2009, 09:48:06 PM »

Ron,
You could always download the SDK and write your own app with as many "and"s as you want.

That seems a little smart alecky.
I'm not used to that from you Knight.  ;D

I'm sorry if I was out of line. I did acknowledge that it is better than before.
If we don't whine at least a little bit , AHP won't improve.

 
Logged
Long live X10! - Because I just like it is all.....

Knightrider

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 62
  • Posts: 1748
  • I love my WM100!
    • This Automated House
Re: More than one "AND" condition?
« Reply #10 on: February 26, 2009, 09:55:05 PM »


I'm sorry if I was out of line. I did acknowledge that it is better than before.
If we don't whine at least a little bit , AHP won't improve.

 

Nope, not out of line at all.  I'm just now making progress with the SDK myself and realizing that the possibilities are endless.
Sad, but true,  I foresee X10 totally revamping (maybe I'm dreaming) the software.  Maybe some issues on the "Wish List" will be resolved.
Logged
Remote control is cool,

but automation rules!

HA Dave

  • Hero Member
  • *****
  • Helpful Post Rating: 175
  • Posts: 7127
Re: More than one "AND" condition?
« Reply #11 on: February 26, 2009, 10:09:47 PM »

.......... I'm just now making progress with the SDK myself and realizing that the possibilities are endless.

I've been saying that for some time now! [see below]
Logged
Home Automation is an always changing technology
 

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