Please login or register.

Login with username, password and session length
Advanced search  

News:

Author Topic: Why doesn't this macro work?  (Read 4540 times)

LanceC

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 14
Why doesn't this macro work?
« 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.
Logged

dave w

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 138
  • Posts: 6109
Re: Why doesn't this macro work?
« Reply #1 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?
Logged
"This aftershave makes me look fat"

LanceC

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 14
Re: Why doesn't this macro work?
« Reply #2 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.
Logged

dave w

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 138
  • Posts: 6109
Re: Why doesn't this macro work?
« Reply #3 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.  ;)
Logged
"This aftershave makes me look fat"
 

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