X10 Community Forum

🖥️ActiveHome Pro => Plug-ins => Smart Macros => Topic started by: jayman13 on July 03, 2011, 11:58:59 AM

Title: Help with a smart macro
Post by: jayman13 on July 03, 2011, 11:58:59 AM
I'm trying to have my bathroom light go on when I enter and go off right when I leave.  The sensor is at a place where it will only be activated when someone enters and leaves.  What is the best way to do this?  The setup I have now is that the sensor is E4 and the light switch is E9.  One macro:  When E4 is activated, flag 1 is set and E9 is supposed to go on.  2nd macro:  When E4 is activated and flag 1 is on turn E9 off and clear flag 1.  It doesn't work though.  What happens is that the light just keeps going on and off continuously.  Anyone have any ideas?
Title: Re: Help with a smart macro
Post by: dave w on July 03, 2011, 05:28:12 PM
I'm trying to have my bathroom light go on when I enter and go off right when I leave.  

You are not going to get it to turn OFF *right* when you leave unless you use two motion sensors positioned on either side of the entrance door or at least in some way where one sensor is triggered at least one second before the other, so your macros can determine which direction you are going (in or out). And this gets a little complicated with flags.

Speaking of which, what are you using the flags for now?

Can't you just use E4 as you trigger for two macros "E4 ON = E9 ON" and "E4 OFF = E9 OFF"  Is it the one minute turn off delay the problem you are fighting with?
Title: Re: Help with a smart macro
Post by: jayman13 on July 03, 2011, 08:52:49 PM
I'm trying to have my bathroom light go on when I enter and go off right when I leave. 

You are not going to get it to turn OFF *right* when you leave unless you use two motion sensors positioned on either side of the entrance door or at least in some way wher one sensor os triggered at least one second before the other, so your macros can determine which direction you are going (in or out). And this gets a little complicated with flags.

Speaking of which, what are you using the flags for now?

Can't you just use E4 as you trigger for two macros "E4 ON = E9 ON" and "E4 OFF = E9 OFF"  Is it the one minute turn off delay the problem you are fighting with?

Yeah, just think it wpuld be cooler if it went on right when it entered and off right when one exited.  Thanks though.  Btw, what's the deal with transcievers?  Should I be using them?  Seems like they tend to screw things up with a CM15a from what I've read.  Any alternatives?
Title: Re: Help with a smart macro
Post by: Dan Lawrence on July 03, 2011, 09:22:24 PM
I recommend the RR501 Transceiver, which can be gotten from http://www.automatedoutlet.com/  by itself, X10 only sells it as part of a package. Automated Outlet also sells other X10 items, but regardless of order side has flat price shipping.  Check them out.
Title: Re: Help with a smart macro
Post by: dbemowsk on July 04, 2011, 01:47:56 AM
I'm trying to have my bathroom light go on when I enter and go off right when I leave. 

You are not going to get it to turn OFF *right* when you leave unless you use two motion sensors positioned on either side of the entrance door or at least in some way wher one sensor os triggered at least one second before the other, so your macros can determine which direction you are going (in or out). And this gets a little complicated with flags.

Speaking of which, what are you using the flags for now?

Can't you just use E4 as you trigger for two macros "E4 ON = E9 ON" and "E4 OFF = E9 OFF"  Is it the one minute turn off delay the problem you are fighting with?

Yeah, just think it wpuld be cooler if it went on right when it entered and off right when one exited.  Thanks though.  Btw, what's the deal with transcievers?  Should I be using them?  Seems like they tend to screw things up with a CM15a from what I've read.  Any alternatives?

Dave W is correct, the only way to accomplish this would be with 2 motion sensors staggered in a way where you could get at least a one second delay between the two.  I think it could be done though.

As for the transceivers, I have never tried an RR501 which is a polite transceiver, but I have tried the TM751s with the CM15A, and unless you have a pretty good distance between the two, they can cause issues with each other.  I typically recommend an antenna mod on the CM15A to increase its range, but not all are savy enough to accomplish this.
Title: Re: Help with a smart macro
Post by: jayman13 on July 04, 2011, 10:41:23 AM
I'm trying to have my bathroom light go on when I enter and go off right when I leave. 

You are not going to get it to turn OFF *right* when you leave unless you use two motion sensors positioned on either side of the entrance door or at least in some way wher one sensor os triggered at least one second before the other, so your macros can determine which direction you are going (in or out). And this gets a little complicated with flags.

Speaking of which, what are you using the flags for now?

Can't you just use E4 as you trigger for two macros "E4 ON = E9 ON" and "E4 OFF = E9 OFF"  Is it the one minute turn off delay the problem you are fighting with?

Yeah, just think it wpuld be cooler if it went on right when it entered and off right when one exited.  Thanks though.  Btw, what's the deal with transcievers?  Should I be using them?  Seems like they tend to screw things up with a CM15a from what I've read.  Any alternatives?

Dave W is correct, the only way to accomplish this would be with 2 motion sensors staggered in a way where you could get at least a one second delay between the two.  I think it could be done though.

As for the transceivers, I have never tried an RR501 which is a polite transceiver, but I have tried the TM751s with the CM15A, and unless you have a pretty good distance between the two, they can cause issues with each other.  I typically recommend an antenna mod on the CM15A to increase its range, but not all are savy enough to accomplish this.

What's the best way to "mod" the antenna.  Is there an easiest one?  One for a newbie like me?
Title: Re: Help with a smart macro
Post by: dbemowsk on July 04, 2011, 12:49:14 PM
You may want to check out this thread (http://forums.x10.com/index.php?topic=4746.0) in which someone just extended the existing antenna wire about 9 inches.  This effectively makes the existing antenna a 1/2 wavelength antenna vs the standard 1/4 wavelength.  Others have done a coax F-connector mod (see the link in the second post from Eric Goldberg from the above thread) which is what I have done, but that requires a bit more skill in soldering and such.
Title: Re: Help with a smart macro
Post by: Noam on July 04, 2011, 01:42:50 PM
What's the best way to "mod" the antenna.  Is there an easiest one?  One for a newbie like me?

I did the "reflector" mod, which is the simplest one in my opinion.
You need an 18.5" length of wire (I used #12 electrical wire, but a length of straightened coat-hanger is fine, too).
Simple attach it alongside the CM15a's antenna, making them even at the bottom. Use some tape, cable ties, or some tubing to hold the two together.
There is no electrical connection between the wire and the CM15A's antenna. The wire acts as a 1/2 wavelength reflector.
In my case, it has improved my RF reception enough to give me coverage in my entire house.
A side benefit is that it doesn't void the warranty.