Please login or register.

Login with username, password and session length

Author Topic: Off command inserted when macro is run  (Read 3112 times)

mfallavol

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 3
Off command inserted when macro is run
« on: June 29, 2008, 03:10:14 AM »

I'm trying to setup my first real macro.  The idea is simple.  I have an Eagle Eye on A1 and when it senses motion I want to turn on all lights (and a camera and VCR).  Then, after 10 minutes I want it to turn everything off.  The idea here is that the Eagle Eye will continue to transmit A1 signals as long as it senses motion and 10 minutes after motion ceases everything will turn off.

The macro is setup as follows:
    Turn Camera ON
    Turn Video Commander ON
    Turn Family Room ON
    Turn Kitchen ON
    WAIT for 10 minutes
    Turn Video Commander OFF
    Turn Camera OFF
    Turn Family Room OFF
    TUrn Kitchen OFF

But here is what I see in the activity monitor:
79    6/28/2008 5:52:00 PM    Receive RF    A1 On
80    6/28/2008 5:52:00 PM    Receive RF    A1 On
81    6/28/2008 5:52:01 PM    Macro    A5 (Camera)
82    6/28/2008 5:52:01 PM    Macro    A On (Camera)
83    6/28/2008 5:52:02 PM    Macro RF    A2 On
84    6/28/2008 5:52:06 PM    Macro    A9 (Family Room)
85    6/28/2008 5:52:06 PM    Macro    A10 (Kitchen)
86    6/28/2008 5:52:06 PM    Macro    A Bright 100(Family Room, Kitchen)
87    6/28/2008 5:52:08 PM    Macro    A9 (Family Room)
88    6/28/2008 5:52:08 PM    Macro    A10 (Kitchen)
89    6/28/2008 5:52:08 PM    Macro    A Off (Family Room, Kitchen)

What happens is that the camera goes on and the video recorder goes on.  However, the lights do not.  I'm guessing that's because somehow the macro seems to have issued Off command to the family room and kitchen but why?
Logged

Puck

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 171
  • Posts: 1799
Re: Off command inserted when macro is run
« Reply #1 on: June 29, 2008, 08:59:15 AM »

Based on the macro you showed, I'm not sure why after 2 seconds just the lights went off, but here are a few things to be aware of:

Quote
84    6/28/2008 5:52:06 PM    Macro    A9 (Family Room)
85    6/28/2008 5:52:06 PM    Macro    A10 (Kitchen)
86    6/28/2008 5:52:06 PM    Macro    A Bright 100(Family Room, Kitchen)

Under Tools/Preferences/Macro Options you might want to select "Issue On in place of Bright 100%".


Quote
The idea here is that the Eagle Eye will continue to transmit A1 signals as long as it senses motion and 10 minutes after motion ceases everything will turn off.

As the macro stands now, it will continue to run multiple occurrences (once for every motion detection). Each will not end after 10 minutes of no motion but after 10 minutes of being started.

What you may want to do is create an EagleEye OFF macro that uses the end of motion delay from the motion sensor itself to turn the camera & lights off.

To prevent the macro from re-triggering multiple times, you will need a condition (such as a flag or module state), so it cannot be triggered more than once until after the OFF macro clears the condition.

Quote
Turn Video Commander OFF

I do not believe this is possible. The VCR Commander has a fixed time delay of 5 minutes; however, it is re-triggerable to extend the time longer. But keep in mind that if your macros are set to turn the cameras and lights off after 10 minutes of no motion, your VCR Commander would have turned off 5 minutes earlier.
Logged

mfallavol

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 3
Re: Off command inserted when macro is run
« Reply #2 on: June 29, 2008, 01:50:15 PM »

I've seem other postings mention flags but I don't see any way to enter or documentation on using flags.  Am I wrong in assuming I have to purchase the 'Smart Macros' plugin in order to use that feature?  I also assume that by purchasing smart macros there is a way to enter macros as text instead of using the Macro Designer.  Is that correct?

As for my macro, I was under the assumption that a macro would not run multiple instances concurrently.  If the macro is stored in the CM15A is it actually capable of running multiple instances of itself?  If so, how many?  With my assumption that only one instance could run, I thought that each time it would trigger the macro due to motion, it would re-start the macro thus the macro would finally end after 10 minutes of no triggers.  Being a programmer I'm well aware of normal programming constructs and using flags would be an obvious approach if I new how to create a macro that used them.
Logged

Puck

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 171
  • Posts: 1799
Re: Off command inserted when macro is run
« Reply #3 on: June 29, 2008, 03:05:17 PM »

Am I wrong in assuming I have to purchase the 'Smart Macros' plugin in order to use that feature?

Yes you do need smart macros for flags.

Quote
I also assume that by purchasing smart macros there is a way to enter macros as text instead of using the Macro Designer.  Is that correct?

No, at least not in the AHP GUI. It does display it that way but it's not edittable.

Quote
As for my macro, I was under the assumption that a macro would not run multiple instances concurrently.  If the macro is stored in the CM15A is it actually capable of running multiple instances of itself?  If so, how many?

Macros can and will trigger and run multiple instances. The number of macros that can run at once is likely limited to the micro-controllers number of interrupts. Nonetheless, two is all that is required to mess up a macro's flow.

Quote
With my assumption that only one instance could run, I thought that each time it would trigger the macro due to motion, it would re-start the macro thus the macro would finally end after 10 minutes of no triggers.

From your example above, the lamp OFFs that occurred could have been residuals from a previous run of the macro. To guarantee an OFF after 'x' number of minutes of no motion, you have to use ON & OFF macros triggered from the motion detectors signals (of course the motion detectors off delay has to be set to what you want). A single macro with a delay cannot do this if subsequent motion is received.

Logged
 

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