X10 Community Forum

🖥️ActiveHome Pro => Plug-ins => Smart Macros => Topic started by: adrianoftyriel on August 04, 2010, 10:20:14 PM

Title: Help with a Porch Light Macro
Post by: adrianoftyriel on August 04, 2010, 10:20:14 PM
Hi everyone. Here's what I'd like to happen:

- Someone walks in front of my MS16A which triggers A2 On Macro
- If the light (A1) is currently ON, the macro should not do anything.
- If the light (A1) is currently OFF AND it's night time, the macro should turn the light (A1) ON for 30 secs, then OFF.

I cannot seem to make this happen. The macro gets triggered whether or not the light (A1) is ON.

Help?
Title: Re: Help with a Porch Light Macro
Post by: Puck on August 05, 2010, 09:13:41 AM
Flags (http://forums.x10.com/index.php?topic=4590.0)

Use one to prevent macro re-triggering.
Title: Re: Help with a Porch Light Macro
Post by: adrianoftyriel on August 05, 2010, 09:51:32 AM
I'm sorry, but I don't see how that will help me here. Can you explain? Can I somehow set flags based on when a module turns on and off?
Title: Re: Help with a Porch Light Macro
Post by: Puck on August 05, 2010, 10:47:21 AM
Single Trigger Macro Using a Status Flag (http://forums.x10.com/index.php?topic=14775.0)
Title: Re: Help with a Porch Light Macro
Post by: adrianoftyriel on August 05, 2010, 10:52:24 AM
Ah, I see what you mean. However, I'm trying to make it so that if we turn the light on, then go outside, AHP will not turn the light off on us.
Title: Re: Help with a Porch Light Macro
Post by: Puck on August 05, 2010, 11:34:21 AM
Ah, I see what you mean. However, I'm trying to make it so that if we turn the light on, then go outside, AHP will not turn the light off on us.

Example #1 in the link will do that.

As long as there is continuous motion detected outside, the sensor's OFF signal will not be sent. It will be sent after your sensor's preset time period elapses without motion.
Title: Re: Help with a Porch Light Macro
Post by: adrianoftyriel on August 05, 2010, 04:56:19 PM
Ah, but not if we're sitting reading a book... not enough motion.

I take it you can't think of a way I can make the macro actually conditional on a module status.
Title: Re: Help with a Porch Light Macro
Post by: Puck on August 06, 2010, 01:11:35 AM
Ah, but not if we're sitting reading a book... not enough motion.

Depends on where your motion sensor is aimed and how many minutes you are normally motionless while reading. Your MS16A's OFF delay can be set for up to 256 minutes.


Quote
I take it you can't think of a way I can make the macro actually conditional on a module status.

I didn't know I was suppose to provide a solution for you. I prefer to take the approach of pointing you to the tools and helping you learn how to use them.

Step 1, define everything you want to happen... in one statement you wanted the light on for only 30 seconds, now you want it stay on indefinitely, so is there multiple modes desired?
Step 2, what would it take to make that work... what are your trigger(s) and what will determine the different modes
Step 3, after you have your solution, think about what can go wrong and if the consequences require a way of preventing it from happening

Title: Re: Help with a Porch Light Macro
Post by: adrianoftyriel on August 06, 2010, 09:08:17 AM
Sorry, I'll try to be more clear. This is what I want to be able to do:

- The porch light should come on if it's nighttime and someone walks in front of the M16A.  It should then turn off 30 secs later.

BUT

- If I turn the light on manually (from the module), then the light should stay on, regardless of motion detection from the M16A.




I currently have a 30 sec macro that is conditional on nighttime AND module A1 being off, but it triggers regardless of A1s status.
Title: Re: Help with a Porch Light Macro
Post by: Puck on August 06, 2010, 09:22:27 AM
What you need is to have a conditional flag in your motion sensor ON & OFF macros to prevent them from executing when you want to operate the light manually.

Somehow you have to let AHP know the light is being turned on for this mode. I don't know what type of light switch you are using, but no X10 version will provide that feedback to AHP. Therefore, to place the light in the "stay on" mode, you would need an alternate trigger.

First, create a dummy (http://forums.x10.com/index.php?topic=8807.msg53198) (appliance) switch in AHP with associated ON & OFF macros:

- the ON macro would turn the light on and set the MS16A ignore flag
- the OFF Macro would turn the light off and clear the ignore flag

To trigger this mode, you would either turn the dummy switch on manually at the computer (the AHP GUI), or use an X10 remote to trigger it.
Title: Re: Help with a Porch Light Macro
Post by: adrianoftyriel on August 06, 2010, 09:56:31 AM
Okay, that's where I was ending up, that's too bad though, seems like a good feature to have.

Thanks!!!