Single Trigger Macro Using a Status Flag

Started by Puck, March 10, 2008, 09:09:10 AM

Previous topic - Next topic

Puck

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]

PrimeGuild

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.

PrimeGuild

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.

Puck

#3
Quote from: 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.

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.

IPS

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.

SMF spam blocked by CleanTalk