Please login or register.

Login with username, password and session length

Author Topic: Smart macro with strange results  (Read 8178 times)

Mike79

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 13
Smart macro with strange results
« on: September 26, 2011, 11:13:12 AM »

Can someone help me fiqure out why this macro is acting strange? When I start the macro from Active home it works perfect. If I trigger the Motion this happens... The back door (E1) and family room door (E2) came on full bright and halogen floods came on (E3). The halogens (E3) immediately went off completely and the family room door (E2) went off right a way. The back door (E1) stayed on for five minutes as programmed. I listed the macro and the activity monitor for help (omitted the lines not part of this macro).

H2: Deck Motion Sensor
E1: Back Door Light
E2: Family Room Door Light
E3: Back Yard Halogen Flood Lights

Trigger : H2
Conditions: H2 and "It's after 10:15pm or It's before dawn"

E1 on 100%
E2 on 100%
Delay 5 sec
E3 on 100%
Delay 5 min
E1 off
Delay 2 sec
E2 off
Delay 2 sec
E3 off

1075   9/25/2011 10:21:08 PM   Receive   H2 (Back Deck)
1076   9/25/2011 10:21:08 PM   Receive   H On (Back Deck)
1077   9/25/2011 10:21:09 PM   Macro   E1 Extended Code Bright/Dim 100(Back Door Light)
1078   9/25/2011 10:21:11 PM   Macro   E2 Extended Code Bright/Dim 100(Fam Rm Door Light)
1079   9/25/2011 10:21:12 PM   Macro   E2 (Fam Rm Door Light)
1080   9/25/2011 10:21:12 PM   Macro   E Off (Fam Rm Door Light)
1081   9/25/2011 10:21:14 PM   Macro   E3 (B/Y Hal Flood Lights)
1082   9/25/2011 10:21:14 PM   Macro   E Off (B/Y Hal Flood Lights)
1083   9/25/2011 10:21:16 PM   Macro   E3 Extended Code Bright/Dim 100(B/Y Hal Flood Lights)
1084   9/25/2011 10:21:17 PM   Macro   E2 (Fam Rm Door Light)
1085   9/25/2011 10:21:17 PM   Macro   E Off (Fam Rm Door Light)
1087   9/25/2011 10:21:19 PM   Macro   E3 (B/Y Hal Flood Lights)
1088   9/25/2011 10:21:19 PM   Macro   E Off (B/Y Hal Flood Lights)
1093   9/25/2011 10:22:03 PM   Receive   H2 (Back Deck)
1094   9/25/2011 10:22:04 PM   Receive   H Off (Back Deck)
1097   9/25/2011 10:26:17 PM   Macro   E1 (Back Door Light)
1098   9/25/2011 10:26:17 PM   Macro   E Off (Back Door Light)
1099   9/25/2011 10:26:18 PM   Macro   E2 (Fam Rm Door Light)
1100   9/25/2011 10:26:18 PM   Macro   E Off (Fam Rm Door Light)
1101   9/25/2011 10:26:20 PM   Macro   E3 (B/Y Hal Flood Lights)
1102   9/25/2011 10:26:20 PM   Macro   E Off (B/Y Hal Flood Lights)


Thanks for any help!
Logged

dave w

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 139
  • Posts: 6116
Re: Smart macro with strange results
« Reply #1 on: September 26, 2011, 07:08:50 PM »

From your description the macro appears to be working as written.

The trigger turns true so E1 and E2 come on right away.
Two seconds after the trigger turns true, the delay timers for E1 and E2 turn true ("is the delay complete? T/F") so E1 and E2 should turn off.
Five seconds after the trigger, the delay timer for E3 turns true so E3 should turn on.
Five minutes after the trigger, the 5 minute delay timer completes and turns true, and E1 turns off.  

This seems to be the action you described.

« Last Edit: September 26, 2011, 07:23:06 PM by dave w »
Logged
"This aftershave makes me look fat"

Mike79

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 13
Re: Smart macro with strange results
« Reply #2 on: September 26, 2011, 08:25:37 PM »

Dave W,

Can you explain why right after the macro turns on, the macro turns off some lights, look at lines 1078 to 1080, they go off just as fast as they turn off.

I have all the lights coming on then wait 5 minutes to turn them off if no other motion occurs. The delays are set to all the lights come on without being missed (I read on this forum that some people had issues with lights being missed if you had them all come on or go out at once).

Thanks for the response!
Logged

dave w

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 139
  • Posts: 6116
Re: Smart macro with strange results
« Reply #3 on: September 26, 2011, 09:19:59 PM »

Dave W,

Can you explain why right after the macro turns on, the macro turns off some lights, look at lines 1078 to 1080, they go off just as fast as they turn off.

Yes, you are telling E2 and E3 to turn off 2 seconds after thay come on.
Everything in the Activity Monitor looks correct up to line 1083 (to me, but I use Homeseer, not AHP, so am shooting in the dark). Line  1083 is turning on light E3 again which I don't follow. 1083 through 1088 looks like the macro ran again without being triggered. Then another trigger comes in on line 1093 and it appears the macro is run correctly (as written) again.

Since you said you edited the AM I figured the strangeness was just something done when you edited. But in your OP your description of what was occurring matches what you put in your macro. E2 and E3 should turn OFF almost immediately after coming on. Since each X10 command takes almost one full second and the commands are serially sent E2 and E3 will not turn off precisely two seconds after the trigger, but my point was that the E2 E3 lights are doing what you are telling them to do in the macro. That isn't what you really wanted, right? I am guessing you wanted E2 and E3 to turn off after the five minute timer(?).
Logged
"This aftershave makes me look fat"

Mike79

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 13
Re: Smart macro with strange results
« Reply #4 on: September 26, 2011, 09:27:09 PM »

Dave w,

I might be missing the ovious  B:( but where I'm telling the macro to turn those off 2 second after they come on. I might not know of one of the fundamentals of active home but the way I see it I told it to turn on E1 and E2 at the same time then turn E3 on 5 seconds after E1 and E2. Then wait 5 minutes to turn off E1, wait 2 seconds turn off E2, then wait 2 seconds turn off E3.
Logged

Mike79

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 13
Re: Smart macro with strange results
« Reply #5 on: September 26, 2011, 09:59:06 PM »

 -:) Ok I gave your comment some thought and tried removing the 2 second delays and it worked. My thoughts were that it was saving active home from sending to many command at once. That is what hurt me, not helped me. Thanks for ingauging me. >!
Logged

dave w

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 139
  • Posts: 6116
Re: Smart macro with strange results
« Reply #6 on: September 27, 2011, 10:03:17 AM »

Dave w,

I might be missing the ovious  B:( but where I'm telling the macro to turn those off 2 second after they come on. I might not know of one of the fundamentals of active home but the way I see it I told it to turn on E1 and E2 at the same time then turn E3 on 5 seconds after E1 and E2. Then wait 5 minutes to turn off E1, wait 2 seconds turn off E2, then wait 2 seconds turn off E3.
I don't know if this helps or not, but, the way you have it written ALL delay timers will start with the trigger. They do not run, one after the other. The trigger starts them all simultaineously. If you want E2, E3, to turn off after E1 then one fix would be to make your delay timers for E2 and E3 as 5 minutes and two seconds and put E2 and E3 togeather, OR make E2 delay 5 minutes and two seconds, and E3 5 minutes and three seconds, which would turn off E3 after E2.

does this make sense?
Logged
"This aftershave makes me look fat"

Mike79

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 13
Re: Smart macro with strange results
« Reply #7 on: September 27, 2011, 10:15:20 AM »

Dave,

The I never knew that about the delays. My assumption was those were delays from the start, hence the time line to the left of the modules in the macro builder.

Thanks again!
Logged

dave w

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 139
  • Posts: 6116
Re: Smart macro with strange results
« Reply #8 on: September 27, 2011, 11:03:55 AM »

Dave,

The I never knew that about the delays. My assumption was those were delays from the start, hence the time line to the left of the modules in the macro builder.

Thanks again!
Well again, I quit using AHP for Homeseer a few years back. So everything I have just spewed, may be pure poodle gas.

I just fired up my old AHP and see the time line you are refering to. The time line certainly looks like they should execute sequentially, one after the other based on stack position.  But the way you said your macro was executing sounded like all delay timers were started by the trigger, which is the way I thought AHP worked, and is the way Homeseer works. I guess if you make E2 as 5 min plus two seconds and E3 as five minutes plus three seconds  and E3 does not turn off untill five minutes after E2, you will know how AHP handles.

Any one wanna help here? I think I just steered Mike down a dead end.   B:(
« Last Edit: September 27, 2011, 11:09:58 AM by dave w »
Logged
"This aftershave makes me look fat"
 

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