X10 Community Forum

🔌General Home Automation => Automating Your House => Troubleshooting Automation Problems => Topic started by: Pecletchick on July 26, 2008, 09:20:42 PM

Title: Conditional Trigger of Sensor?
Post by: Pecletchick on July 26, 2008, 09:20:42 PM
Hi all,

I have a Hawkeye II sensor module set to A1 and I also have a lamp plugged into a lamp module (also set to A1).  I like the idea of being able to have this lamp come on with motion BUT, I would like the sensor to do nothing if the lamp is already on (I have a timer set up for the lamp) so that it will not turn off the lamp after the 1 minute preset.  I have been looking around the forums, but did not see anything that directly answered this.  I am running my system using Active Home Pro 3.228.  It would appear that the Smart Macros plug in may work for this - can anyone confirm before I put more $$ into the system?  Any help is greatly appreciated.

Thanks!
Title: Re: Conditional Trigger of Sensor?
Post by: -Bill- (of wgjohns.com) on July 26, 2008, 09:23:29 PM
Hi all,

I have a Hawkeye II sensor module set to A1 and I also have a lamp plugged into a lamp module (also set to A1).  I like the idea of being able to have this lamp come on with motion BUT, I would like the sensor to do nothing if the lamp is already on (I have a timer set up for the lamp) so that it will not turn off the lamp after the 1 minute preset.  I have been looking around the forums, but did not see anything that directly answered this.  I am running my system using Active Home Pro 3.228.  It would appear that the Smart Macros plug in may work for this - can anyone confirm before I put more $$ into the system?  Any help is greatly appreciated.

Thanks!

Macros or not, the Hawkeye II sensor will always send the on and off signals when motion is detected and when it times out.
Title: Re: Conditional Trigger of Sensor?
Post by: Puck on July 27, 2008, 12:08:43 AM
Along with what Bill stated, you would have to move the Lamp to a different address than the Motion Sensor. Smart Macros does have the "conditions" ability to control what you want to do.
Title: Re: Conditional Trigger of Sensor?
Post by: dash on July 28, 2008, 03:32:02 AM
You will need to use macros and move the lamp to a different module address as already stated.

You would need to do something like this...

Put the PIR on address A1
Put lamp on address A3 (not sure whether Hawkeye sends dawn/dusk signal on A2 i.e. one module code higher than the PIR unit, so you would need to avoid this module address if you didn't want to use the dawn/dusk triggers)

Macro - 'A1 on - movement signal'

trigger A1 on
if flag 2 is unset (condition)
set flag 2 (action)
switch lamp A3 on (action)

When a movement signal is received from the PIR ('A1 on'), and if flag 2 is unset at this time, flag 2 becomes set and the lamp at A3 switches on.
If the flag is already set when a movement signal is received, nothing happens.


Macro - 'A3 on - timed on'

trigger A3 on
timed (set to activate at desired lamp on time)
set flag 2 (action)
switch lamp A3 on (action)

This uses the timer on macro A3 to switch the lamp on.
It is not necessary to use the 'flag 2 is unset' condition here, because if the lamp is already on then another on command won't change anything - unless the lamp is set to a dim percentage - another story...
Using 'if flag 2 is unset' as a condition won't do any harm though, and if you had used a dim level, would prevent that command to from being re-issued when the timer starts.


Macro - 'A3 off - timed off'

trigger A3 off
timed (set to activate at desired lamp off time)
switch lamp off
clear flag 2

Flag 2 is cleared ready for the next day.


Note: experience of others suggests that you steer clear of flags 1, 15 and 16

See also...  http://www.x10community.com/forums/index.php?topic=15926.0 for the setup I am using to control lights (with various flags and conditions)


Hope this helps...

  Dave


edit: moved lights to A3 (not sure whether Hawkeye would generate dawn/dusk signals on A2)
Title: Re: Conditional Trigger of Sensor?
Post by: Pecletchick on July 28, 2008, 02:35:16 PM
Thanks all :D I will try your suggestions and invest in the Smart Macros package.