X10 Community Forum

🖥️ActiveHome Pro => Plug-ins => Smart Macros => Topic started by: TinkerTom on April 02, 2012, 03:19:04 PM

Title: Motion Sensor with 2 OFF macros
Post by: TinkerTom on April 02, 2012, 03:19:04 PM
I am using a Flood Light Motion Dector on my back deck to trigger macros to turn on/off a set of lights in the house.  One of the macros runs before 11:15 and the other after.  The issue I am having is that the latter doesn't seem to work.

Here's the setup.
G1 - Flood Light Motion Dector (PR511) with sensor switch +1 set to "in."
C1, C2 and E2 are light switches (XPS3-1).
C3 is a 2 pin polarized appliance module (AM486) which controls a table lamp.
G2 is the trigger for three macros, each macro sets a different flag (just so I can see if it ran).
      Macro 1 (G2-ON) turns all four lights on.
      Macro 2 (G2-OFF) turns C1, C2 and E2 off with the time condition set to "Before 11:15."
      Macro 3 (G2-OFF) turns C1, C2, E2 and C3 off with the time condition set to "After 11:15."
macros 1 and 2 work just fine.  Macro 3 doesn't seem to work at all.  However, the flag for the third macro is set when I check it.  I have a timed macro to run each afternoon to clear all flags.
I'm using a CM15A interface.  The specific transceived house codes include "C", "E" and "G."  All macros are set to run from the interface and are properly downloaded.

Any thoughs on the issue will be greatly appreciated.
Title: Re: Motion Sensor with 2 OFF macros
Post by: Noam on April 02, 2012, 03:37:31 PM
What version of AHP are you running?
Are you using any other conditions on those macros?
Is the macro setting the flag at the beginning or the end?
What does the Activity Monitor show when the macro is triggered?
Have you tried manually triggering the macro? If you trigger it from the AHP interface, it will ignore the conditions, and run as if they were all "true". This is a good way to test that the actions actually run. If you use a PalmPad, or some other remote to trigger it (or the motion sensor), it SHOULD evaluate the conditions as normal.

You might try putting a delay (even a 0-second delay) at the beginning of the macro, and see if that makes a difference.
Title: Re: Motion Sensor with 2 OFF macros
Post by: TinkerTom on April 02, 2012, 06:28:16 PM
What version of AHP are you running?   3.318
Are you using any other conditions on those macros?  no other conditions
Is the macro setting the flag at the beginning or the end?  at the end
What does the Activity Monitor show when the macro is triggered?  Transmit C1 Transmit C OFF etc
Have you tried manually triggering the macro? If you trigger it from the AHP interface, it will ignore the conditions, and run as if they were all "true". This is a good way to test that the actions actually run. If you use a PalmPad, or some other remote to trigger it (or the motion sensor), it SHOULD evaluate the conditions as normal.

When the macros are manually triggered from within AHP they all work.  When I trigger them using a PalmPad the work as expected evaluating the conditions.

I'll test them again tonight.  I'll also add in a delay of 1 second to see if that helps.

Thanks for your advice.

Title: Re: Motion Sensor with 2 OFF macros
Post by: flimflam on July 15, 2012, 09:07:08 AM
I notice you have macro 2 and macro 3 both triggering by G2 OFF (dependant on the time).
I'm guessing you have a G2 "folder", that shows BOTH macro 2 and macro 3.
It's been my experience that when AHP executes a macro, it's in the following sequence;
1) check time in the FOLDER (G2 in this case)
2) go to the FIRST macro w/i the folder that meets conditions (EXCLUSIVE of time)
3) execute that macro, and ignore all remaining macros in the "folder".

Smart Macros do not execute "alphabetically" within a folder.  They execute left to right, so I'm assumining macro2 is left-most in the G2 folder, and macro3 is on the right.