X10 Community Forum

🖥️ActiveHome Pro => Smart Macros => Plug-ins => User-Designed Working Macros => Topic started by: Puck on March 10, 2008, 09:09:10 AM

Title: Single Trigger Macro Using a Status Flag
Post by: Puck on March 10, 2008, 09:09:10 AM
Narrative:
AHP 3.206

Runs from the interface or PC (users choice).

Many new users to AHP ask for help on preventing a macro from re-triggering for a period of time. Presented here are two methods of performing this task using a Status Flag. The status flag can be set/cleared and used as a condition for a macro to execute.

The examples shown are to allow a chime to occur just once during motion detection. This is to prevent a chime occurring every few seconds during continuous motion detection.

Motion Detector's Address: A2 Frontdoor Motion


1) For using the Motion Detector's ON & OFF signals, create the following 2 Macros:

     Macro Name:
      MotionStart

     Trigger:
      A2 ON

     Conditions:
      Flag [2] Clear

     Action(s):
      Set Flags [2]
      Chime ON


     Macro Name:
      MotionStop

     Trigger:
      A2 OFF

     Conditions:
      (none)

     Action(s):
      Clear Flags [2]


2) For using just the Motion Detector's ON signal and a fixed delay, create the following Macro:

     Macro Name:
      FrondoorMotion

     Trigger:
      A2 ON

     Conditions:
      Flag [2] Clear

     Action(s):
      Set Flags [2]
      Chime ON
      Delay 60 seconds  (this value can be any delay required)
      Clear Flags [2]
Title: Re: Single Trigger Macro Using a Status Flag
Post by: PrimeGuild on March 11, 2008, 04:32:31 PM
Thanks Puck. This is useful stuff. I was really annoyed when my chime kept chiming while the pizza delivery boy just waited for @ my front door.
Title: Re: Single Trigger Macro Using a Status Flag
Post by: PrimeGuild on March 31, 2008, 12:36:04 PM
On second thought, I implemented this logic, and it did appear to work initially, but then later on it just stopped working. My door bell now never gets triggered. I tried all combinations, and finally I took out the Flags and then it started working, but then I am not able to delay the door bell.
Title: Re: Single Trigger Macro Using a Status Flag
Post by: Puck on March 31, 2008, 12:48:03 PM
On second thought, I implemented this logic, and it did appear to work initially, but then later on it just stopped working. My door bell now never gets triggered.

This could only happen if the flag didn't get cleared from an A2 OFF signal. Did you check your Activity Monitor to verify that A2 OFF was received?


Update:

Having read your other posts today, in one you stated using multiple transceivers. Multiple transceivers along with the CM15A/AHP can cause a system to be unreliable, so it may not be Flags that are the cause of your problems.
Title: Re: Single Trigger Macro Using a Status Flag
Post by: IPS on October 14, 2009, 07:44:50 PM
I tried this macro. My results were the same as those of Primeguild. I removed the first part of the first macro and it works ok. first part cancells the macros so nothing happens.