X10 Community Forum

🖥️ActiveHome Pro => Plug-ins => Smart Macros => Topic started by: LanceC on March 18, 2011, 07:30:37 AM

Title: Why doesn't this macro work?
Post by: LanceC on March 18, 2011, 07:30:37 AM
Hi,

I have an overhead light in my bedroom controlled by a WS465 wall switch on address A14.  I also have a slim-line wall switch set to A13-A16 controlling the light, fan and other bedroom devices.

Then I installed a motion detecter that will, between the hours of 4:00PM and 9:30PM, turn the bedroom light on when you enter the room.  (This uses two macros on C10, On and Off)

The problem is using the slim-line switch to turn off the light when ypou leave the room.  The motion detecter will frequently detect you doing this and will turn the light back on.  So I wrote this macro and attached it to A14 Off:

Code: [Select]
Trigger Conditions A14 Off and
Flag Status Off - 14
End Trigger Conditions
Set Flags [14]
Turn Bedroom Light OFF
WAIT for 10 Seconds
Turn Bedroom Light OFF
WAIT for 5 Seconds
Clear Flags [14]

I use similar macros to tuen off light elsewhere thaqt work just fine.  The problem is that the trigger condition for this macro is the same condition it is trying to effect.  That why the flag.  So it will only run once.

But it doesn't.  It runs even when the light is turned on, putting it into a repeating on-off loop.

What am I missing?

Thanks.
Title: Re: Why doesn't this macro work?
Post by: dave w on March 18, 2011, 09:37:14 AM
$0.02 from someone who does not use AHP.
Your light, motion detector and Slim Line Switch are on the same address, so your motion detector will always override your macro control, as will the Slim Line Switch.

Shouldn't you have the WS467 wall switch on a completely different address, then trigger a conditional macro via the motion detector/Slim Line switch to turn On - Off the wall switch address?
Title: Re: Why doesn't this macro work?
Post by: LanceC on March 18, 2011, 09:50:54 AM
The wall switch and slim-line switch are on the same address but the motion detecter is on a different address and calls conditional macros that only operate during a certain time period.

Hmmm, maybe I can attach another condition to that On macro.
Title: Re: Why doesn't this macro work?
Post by: dave w on March 18, 2011, 10:07:39 AM
The wall switch and slim-line switch are on the same address but the motion detecter is on a different address and calls conditional macros that only operate during a certain time period.
Got it. I'll go backto sleep now.  ;)