Please login or register.

Login with username, password and session length

Author Topic: Multiple macros with delays  (Read 2660 times)

bkenobi

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 24
  • Posts: 2082
Multiple macros with delays
« on: April 26, 2011, 11:10:35 AM »

I'm trying to implement a motion sensor + chime notification set of macros.  The desired outcome would be to have lights turn on when motion is detected and stay on until 10 minutes after motion is not detected.  Also, I'd like to trigger a chime every 2 minutes if motion is detected (rather than chiming every time motion is detected, which would be obnoxious).  I know I could make things work if I used the same timer for both (compromising at 5 minutes for both for instance), but I was hoping there was another way.  If I trigger 2 macros with different delays, can AHP/CM15A run both macros at once, or are they run in serial?

In other words:
Macro1:
  Trigger - A1 ON
  Action:
    B1 On (dummy module)
    delay 2 second
    B1 Off

Macro2:
  Trigger - A2 ON
  Action:
    B2 On (dummy module)
    delay 10 second
    B2 Off

If I fire Macro1 or Macro2 on their own, things work as expected.  The dummy module turns on, delays for xx second, turns off dummy module.  If I run Macro2 then Macro1, B2 turns on, B1 turns on, 10 second delay, B2 turns off, 2 second delay (I think), B1 turns off.  I have not run this from the CM15A, just the PC.  I'm sure the answer is known and posted, but I haven't found a thread with the answer in it.  Any work arounds?
 

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