Please login or register.

Login with username, password and session length

Author Topic: Macro not executing properly  (Read 8608 times)

TerranJerry

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 38
Macro not executing properly
« on: May 22, 2010, 07:31:20 PM »

I have four macros that trigger when our garage door opens and closes.  The first one (for a test) sends an email txt message to my cell phone as soon as the door opens (DS10A).  The second one, sends a message after 10 minutes with the garage door open.  The other two support the timer used by the second one... I'll explain more below.

Both of the are working fine in the sense that if I trigger them in AHP manually they will both send me a text message as they should. 

However the second macro is NOT sending me a message as it should EVEN though I DO see it flash after the 10 minutes (shortened to 2 minutes for testing) goes by.

Here are the macros:

Macro A: DS10A triggered
             wait 5 seconds
             send email notification to my cell phone "garage just opened" (it's just an email address)
             wait 15 seconds (not sure I need this)

Macro B: DS10A triggered
             wait for 120 seconds
             turn phantom module A5 ON

Macro C: Trigger conditions: phantom module A5 ON and Garage door (DS10A) is open
             wait for 5 seconds
             send email notification "garage open 10 mins" (just like macro A above)
             wait for 15 seconds (not sure I need this either)

Macro D: Garage door sensor closed (DS10A)
             wait for 2 seconds
             turn OFF phantom module A5

Ok, so as I said when I test this by opening the garage door, I see:
-  Immediately macro A and B flash and A sends me a txt message as expected "garage just opened"
-  2 minutes later macro B and C flash (in a few seconds B flashes again - not sure why) and phantom module A5 turns ON
NOTE: (no message is received from macro C even though it flashed)

Now I close the garage door:
- Macro D flashes
- a couple seconds later, Macro D flashes again
- phantom module A5 goes off

Phantom module A5 is a two-pin appliance module

So any thoughts on why when macro C fires, it does not send me the email (txt) message just like macro A ?
By the way, I added a windows program to execute ti macro C and it DOES execute that program so the macro is running.

Again, if I trigger macro C manually, it sends the message.

Any ideas?  Thanks mucho!

Jerry


Logged

HA Dave

  • Hero Member
  • *****
  • Helpful Post Rating: 175
  • Posts: 7127
Re: Macro not executing properly
« Reply #1 on: May 22, 2010, 07:52:19 PM »

My first thoughts.... are just house keeping tips of sorts.

Sometimes when working on a macro you can accumulate clutter that can cause a macro to misbehave. Clear your macro "recycle bin" (bottom left). And clear the CM15A memory... than reload.

Looking at your macro... I would have to say your "monitored code" is "A"... is that correct?

I have similar garage macro here in User-Designed Working Macros.
Logged
Home Automation is an always changing technology

TerranJerry

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 38
Re: Macro not executing properly
« Reply #2 on: May 23, 2010, 10:13:12 AM »

Hello Dave and thanks for the tips.  I will surely give those things a try.
Actually I modeled my solution off of yours!  Thanks! :)

I also found that the on/off command I was using for the phantom module A5 was the one with a dimmer in it so I replaced it with a simpler one by dragging my phantom module A5 itself into the macro (then it simply had an off/on option). 

Thanks for your tips I will try them.

One other thing, I added a message to my Macro D (garage door closed) and found that the hourly audit causes it to also send the message (not just when the garage door closes initially).  Is there a way to avoid the sending of this message due to the audit?  LOL

Thanks again - Jerry
Logged

HA Dave

  • Hero Member
  • *****
  • Helpful Post Rating: 175
  • Posts: 7127
Re: Macro not executing properly
« Reply #3 on: May 23, 2010, 07:47:42 PM »

.... One other thing, I added a message to my Macro D (garage door closed) and found that the hourly audit causes it to also send the message (not just when the garage door closes initially).  Is there a way to avoid the sending of this message due to the audit?  LOL

Not that I know of. That "hourly audit" or "heart beat" check-in can be a hassle.. and kinda handy as a reminder in other uses.

However.... I would guess... if the DS10A closed signal... merely triggered a closed macro... the closed macro could be a conditional one. The closed condition could be based on a set flag. The flag.. of course.. would have to be set when the door opens. Then the closed door macro would delay several secs... then finally clear the flag. So the condition could only be met once after the door closes. So even though the "heart beat" would continue to "beat"... the condition couldn't be met... so it wouldn't report.

  • Door opens (DS10A triggered postion) flag is set.
  • Door closes (DS10A closed) and triggers conditional macro
  • Conditional macro looks for set flag. if flag is set... (chime... fake chime module....) announce door closed delay 10 secs... clear flag.
« Last Edit: May 24, 2010, 10:08:44 AM by Dave_x10_L »
Logged
Home Automation is an always changing technology

-Bill- (of wgjohns.com)

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 81
  • Posts: 1340
  • He's just this guy. You know?
    • wgjohns.com
Re: Macro not executing properly
« Reply #4 on: May 23, 2010, 11:21:31 PM »

TerranJerry,

A possible answer.

If you created the offending macro with a different trigger originally and then simply changed the trigger, sometimes AHP will get confused and you will see the macro blink as if it is running, but none of the macro events will actually execute.

If this is the case, delete the macro and re-create it from scratch using the desired trigger and it will work.

I stumbled over this AHP bug again a few nights back.   B:(

 >!
« Last Edit: May 23, 2010, 11:24:58 PM by -Bill- (of wgjohns.com) »
Logged
-Bill- (of wgjohns.com)
bill@wgjohns.com

In the real world, the only constant is change.

When I'm online you can find me in the Home Automation Chat Room!

HA Dave

  • Hero Member
  • *****
  • Helpful Post Rating: 175
  • Posts: 7127
Re: Macro not executing properly
« Reply #5 on: May 24, 2010, 10:15:16 AM »

If this is the case, delete the macro and re-create it from scratch using the desired trigger and it will work.

Bill is correct. wether you call it a bug.. or accumulative clutter. Sometimes if you've altered a macro a bit with trials and errors it can be best to start fresh again. Just recreate the macro(s) with a few notes and an increased knowledge of what your doing.
Logged
Home Automation is an always changing technology

TerranJerry

  • Full Member
  • ***
  • Helpful Post Rating: 0
  • Posts: 38
Re: Macro not executing properly
« Reply #6 on: May 24, 2010, 12:47:01 PM »

Thanks Bill and Dave!  You're collective replies have me working now!   :)%

I really appreciate the help.  Yes, apparently it's somewhat of a bug in that AHP didn't clear out some underlying trigger/condition but it is now working as I had hoped after I followed all your suggestions.

Dave thanks for the tips about the heart-beat.  I'll give your suggested alternative programming a try there too.

You guys are the best!  Thanks for helping me out!

Jerry
Logged

kit4u

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 2
Re: Macro not executing properly
« Reply #7 on: July 20, 2010, 08:32:37 PM »

For Conditions to work:

You have to separate the the macros into two.  One macro will have the condition in it. The other macro will have the trigger (per say a security window/door sensor or a motion sensor) In my example I used between two times as the condition.  I used a security door sensor to trigger a dummy switch.  The dummy switch triggers the conditional macro.

1st Macro ---DS10A Trigger instantly a dummy applicance module to ON (B6)
(Stored on interface) 2nd Macro --- Trigger by B6 being turned ON condition (if time between 12am and 5am) triggers A1 to turn ON witch turns on the lights in the living room 
Logged
 

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