X10 Community Forum

🖥️ActiveHome Pro => Plug-ins => Smart Macros => Topic started by: nick29650 on August 24, 2009, 11:05:36 AM

Title: Hot water recirc w/ motion detectors in 2 rooms
Post by: nick29650 on August 24, 2009, 11:05:36 AM
I thought I found a macro posted by Tuce a year ago that would work but in the end I couldn't.  I have also spent hours ... days even, reading instructions and calling x10 support.  I don't consider myself a lamebrain, but I'm not a geek ether so I am hoping one of you kind, more experienced users can lend a hand.

I use AHP and have a motion detector in the kitchen and master bed room to activate a recirculation pump at the water heater in the garage.  I have the recirculation pump plugged into an appliance module on a power strip (without surge suppression) and the power strip plugged into an appliance module that is plugged into the wall.

I want the recirc pump to come on for 2 minutes, ignoring reoccurring movements in the room for 15 minutes and ready to go again when additional movement is detected.

Thank you in advance everyone!


Nick
Title: Re: Hot water recirc w/ motion detectors in 2 rooms
Post by: dave w on August 24, 2009, 11:51:50 AM
Why don't you post what you have that does not work. It might be easier to spot errors than to write the entire macro from scratch.

One thing I see is the two series appliance modules. I used to use two appliance modules in series to protect against a 1950's air raid siren, I was using as a security alarm, from being triggered accidently.

You need about a one second gap between turning ON Appliance Module #1 (plugged into wall) and sending the ON to Appliance Module #2 (pump control). Same thing is true when you reset the modules. Appliance Module 2 OFF first, wait one second then turn OFF Appliance Module 1.

I found if I sent the ON commands one right after the other, the mechanical delays at Appliance Module #1 was long enough that Appliance Module #2 would not get a complete command.
Title: Re: Hot water recirc w/ motion detectors in 2 rooms
Post by: steven r on August 24, 2009, 07:10:45 PM
...I have the recirculation pump plugged into an appliance module on a power strip (without surge suppression) and the power strip plugged into an appliance module that is plugged into the wall...
Are you saying that you essentially have one appliance module plugged into another one? If so why?
Start by getting rid of one of the appliance modules.
I don't have access to my AHP software right now but this is the basic idea you need to follow.

Set your appliance module to H2 and your motion detectors to H3. Also define a dummy module named H1.

Macro 1 - Triggers on H3 ON and flag 1 clear
set flag 1
H2 ON
Delay 2 min
H2 OFF
H1 ON                                   <--- "Calls" timing macro via dummy module H1

Macro 2 - Triggers on H1 ON
delay 14 min                          <--- 15min total delay with the two 30 sec redundant off commands in macro 1
clear flag 1

This should force a 15 min delay between turning your H2On.

I used H2 partly for amusement (I use it for my pump also.) but I would recommend a house code that is not in use elsewhere. i.e. You don't want it turned on accidentally.  I'd also define in a few OFF times for H2 during the day as an additional precaution.
Title: Re: Hot water recirc w/ motion detectors in 2 rooms
Post by: dave w on August 24, 2009, 08:30:24 PM
Are you saying that you essentially have one appliance module plugged into another one? If so why?
I am not sure why nick29650 is using two modules,  but there is validity in using two modules where you absolutely can not afford to have an Appliance Module turn ON accidentally...which they tend to do after a power interuption. Also eliminates the potential of getting accidentally turned ON by a mistaken button push on a controller.
Title: Re: Hot water recirc w/ motion detectors in 2 rooms
Post by: steven r on August 24, 2009, 09:31:53 PM
...there is validity in using two modules where you absolutely can not afford to have an Appliance Module turn ON accidentally...
True though even that isn't 100% fool proof. Nothing with X10 really is. You can come close with careful planning, however.
Each "on" in a two module setup where the first, X, is plugged in the wall and the 2nd, Y is plugged into it and the unit to be controlled into Y, would need to be turned on and off in this specific order.

X on   -\
delay    > To turn ON
Y on   -/


Y off   -\
delay     > To turn OFF
X off   -/

Note X and Y cannot be the same House/Unit code.
Even then I'd consider some redundant offs.
Title: Re: Hot water recirc w/ motion detectors in 2 rooms
Post by: nick29650 on August 24, 2009, 10:06:11 PM
As soon as I make it home I'll roll up my sleeves again. 

I get help (mostly) and give help (when I can) on different forums so I'm not new to this kind of community.  I am pleasantly surprise at all of your quick response.

I’m learning ... mostly through error.  For whatever reason I just couldn't grasp this current problem.  The only reason I placed an appliance module before the power strip was to fiddle with the macro's hoping by turning off the power strip for 15 minutes the motion detectors could activate all they wanted but no power would be available to activate the pump.  I set up dummy modules and still couldn't make it all work.

Anyway this is what Puck (Not Tuce... sorry) listed in the user designed Macro thread:

The examples shown are to allow a chime to occur just once during motion detection. This is to prevent a chime occurring every few seconds during continuous motion detection.

Motion Detector's Address: A2 Frontdoor Motion


1) For using the Motion Detector's ON & OFF signals, create the following 2 Macros:

     Macro Name:
      MotionStart

     Trigger:
      A2 ON

     Conditions:
      Flag [2] Clear

     Action(s):
      Set Flags [2]
      Chime ON


     Macro Name:
      MotionStop

     Trigger:
      A2 OFF

     Conditions:
      (none)

     Action(s):
      Clear Flags [2]


I thought I could adapt it, but I could not.

I’ll get back to you guys.
Title: Re: Hot water recirc w/ motion detectors in 2 rooms
Post by: steven r on August 25, 2009, 01:31:57 AM
...Anyway this is what Puck... ... listed in the user designed Macro thread...
My example above, which was from the top of my head, should work. You can see some similarities to Puck's example as well as what I did to make my macros work for your example.

"AHP programming" has a strange sense of logic. In addition, users have figured out how to make it do things that I don't believe the original programmers considered possible. One of these is to have a macro transfer to another macro. This is done by including a command, usually at the end of the macro, to turn ON or OFF a module. It turns out that when you trigger a module (It can be a dummy module. i.e. A defined but unused module.) from a macro it also triggers any macro with the same house/unit code. (There is a way to do it without a dummy module but it has a bug and isn't reliable for all applications.) By testing for a flag in the the 1st macro, and then setting it, the macro will only run once and not run again till the flag is cleared. The 2nd macro provides a delay and then clears the flag allowing the 1st macro to be triggered again.

Try my example and let us know how it works.
Title: Re: Hot water recirc w/ motion detectors in 2 rooms
Post by: dave w on August 25, 2009, 11:46:04 AM
The only reason I placed an appliance module before the power strip was to fiddle with the macro's hoping by turning off the power strip for 15 minutes the motion detectors could activate all they wanted but no power would be available to activate the pump. 
Ah-ha! in that case steven r is right, get rid of the extra module and let conditionals and flags in the macro ignore the unwanted motion detector triggers.

I thought you were using two modules to prevent accidently "dead heading" the pump, but now recognize it as a "pre heat" pump which can not dead head. I sorta skipped over the "recirc" in the OP. I'll go back to sleep now ;)
Title: Re: Hot water recirc w/ motion detectors in 2 rooms
Post by: nick29650 on August 25, 2009, 12:17:29 PM
I'm not sure what happened here.

It is like the flags are being ignored.

When ever someone walks by the motion detecter the timed cycle starts all over.

I attached my desk top with the macros and a macro report.  could it be different with two motion detecters? do I need 4 macros?

I didn't change the house codes to H yet (was limited on time) but I will try to do that tonight.

Thanks again all.
Title: Re: Hot water recirc w/ motion detectors in 2 rooms
Post by: steven r on August 25, 2009, 12:28:50 PM
...I thought you were using two modules to prevent accidently "dead heading" the pump, but now recognize it as a "pre heat" pump which can not dead head...
While "dead heading", as you put it, is not a danger in his situation, one should always consider the "what if condition" when things don't do as expected. While I do believe two inline modules is a bit of over kill for this application, I do hope he heads my advice and adds the redundant OFF signals. In fact, I'd probably throw one end at the end of the 2nd macro just before clearing the flag as well. If you just have one OFF and your line happens to have noise when it trys to go through, you could end up with the pump running much longer than needed causing unneeded pump wear.
Title: Re: Hot water recirc w/ motion detectors in 2 rooms
Post by: steven r on August 25, 2009, 12:34:17 PM
...When ever someone walks by the motion detecter the timed cycle starts all over...
Hmm... Are you using any of H codes for H1, H2, H3, or H4 anywhere else? If not, I'd recommend using my example pretty much as written till the logic is clear. Also since motion detectors by default use the +1 unit code for dusk/dawn, make sure you don't have any motion detectors on H1, H2, or H16 (+1 for H16 wraps to H1). Set all the motion detectors you're using for this application to H3.

If you can't use house code H, substitute an unused one that meets the above criteria.

Let us know how it goes.
Title: Re: Hot water recirc w/ motion detectors in 2 rooms
Post by: nick29650 on August 25, 2009, 12:39:16 PM
Thanks Steven.

When I get home this evening I will change everything to H.  I'll also remove the power strip module and after your comments always add redundant stops.

Makes sense.
Title: Re: Hot water recirc w/ motion detectors in 2 rooms
Post by: IPS on August 25, 2009, 12:59:51 PM
I wish I had read this thread 3 years ago. I had plugged my power vac into X10 wall outlet and programmed to 10 min. off and 2min. on. That was to prevent basement flooding. It worked fine till one day we were out and a power spike occurred due to lightning. Pump vac never shut off. Over heated and melted the vac body. which luckily had some water so there was no flame but it the insurance company had one hell of a job the get rid off the smoke smell.

So my advise be extra carefull with pumps and motors.
Title: Re: Hot water recirc w/ motion detectors in 2 rooms
Post by: dave w on August 25, 2009, 01:12:13 PM
I do hope he heads my advice and adds the redundant OFF signals. In fact, I'd probably throw one end at the end of the 2nd macro just before clearing the flag as well. If you just have one OFF and your line happens to have noise when it trys to go through, you could end up with the pump running much longer than needed causing unneeded pump wear.
Yes. I use redundant OFFs all the time. Good advice. I also run an event called "Put house to sleep" several times a day when we are not home. Every X10 address that should be off is sent OFF commands to make sure modules are off. (I have a dozen or so 1980s Lamp and Appliance modules (pre MOVs) which are very good at falsing to ON if the power flickers. Even the MOV units will false if utility power comes back up slowly, which makes for really "dirty" power).

Title: Re: Hot water recirc w/ motion detectors in 2 rooms
Post by: nick29650 on August 25, 2009, 08:44:36 PM
Steven r & Dave w, thank you, thank you, and thank you.

I should have come to the forum before I stubbornly wasted all of last week end trying to be smarter than an x10 module.  Kinda like asking for directions on a road trip ... just doesn’t seem manly.

All kidding aside, I could NOT have done it without you.  H2O all the way brother!


Nick
Title: Re: Hot water recirc w/ motion detectors in 2 rooms
Post by: nick29650 on August 25, 2009, 09:09:35 PM
Just when you think it’s safe to go back in the water.

Do I need another Transceiver set to H?

I've got everything numbered exactly as you suggested Steven but the macro does not always start H2 (would a reduntant RF signal help?) and even when it does it is not registering on the computer.  I installed the phase coupler booster so phase shouldn't be an issue.

Also, I noticed that the Dummy switch didn't have a H1 off ... wouldn't think it necessary though.

thanks
Title: Re: Hot water recirc w/ motion detectors in 2 rooms
Post by: nick29650 on August 25, 2009, 10:57:27 PM
All good.  I had an old transciver that I bought at Lowes before I got into AHP.  Pluged it in on H and it's working good ... so far.

Would like to be sure about the H1 off switch; seems like it will not hurt or help anything.

Thanks again. >! :)
Title: Re: Hot water recirc w/ motion detectors in 2 rooms
Post by: steven r on August 26, 2009, 05:52:22 AM
...trying to be smarter than an x10 module...
The more you use them the more opportunities the modules have for beating us. With a few strategic maneuvers you can generally wrangle them into submission, however.  ;)
Title: Re: Hot water recirc w/ motion detectors in 2 rooms
Post by: dave w on August 26, 2009, 12:07:30 PM
I threaten mine with static discharge. Seems to have a disciplinary effect on them.
Title: Re: Hot water recirc w/ motion detectors in 2 rooms
Post by: nick29650 on August 27, 2009, 04:33:09 PM
OK OK, I must be cursed.

After I went to bed and sometime during the night we stopped working again.

I did set a timer to not run the recirculater during the night (in addition to setting the macros).  When I woke up in the morning the pump had been on for several hours based on my assumption that it came on with the timer at 4 am.

Anyway, I've cleared the module and unplugged all modules to reset them.  Down loaded all macros and timers again to make sure all the commands were clean and now I can’t get it to work consistently.

Again it is set up exactly as you prescribed Steven.

It might work once or twice then the motion sensor won't send the signal to the pump.  Or, the flag clears before the delay in the second macro.  Sometimes, if the pump does come on the computer shows it went off but I look and the pump is still running.
I have the auto off on the motion sensors set for two minutes since I didn't see a way to disable it.  Do not seem like it should have an effect though.

One more thing, I live in the desert and my garage gets pretty hot … maybe 110 or 112 degrees.  I am wondering if this could affect the module.

Sorry guys.  Thanks.



Title: Re: Hot water recirc w/ motion detectors in 2 rooms
Post by: dave w on August 27, 2009, 07:01:39 PM

One more thing, I live in the desert and my garage gets pretty hot … maybe 110 or 112 degrees.  I am wondering if this could affect the module.

That's pretty hot ...but then it's a dry heat.  rofl

I assume you are talking about the Appliance module on the pump and NOT the motion sensor. It will definately effect the ability of the motion sensor to see motion.
Title: Re: Hot water recirc w/ motion detectors in 2 rooms
Post by: nick29650 on August 27, 2009, 08:44:59 PM
Yes it is the appliance module (in the garage).

It is a dry heat.

But, people burst into flames on the sidewalks here all the time!
Title: Re: Hot water recirc w/ motion detectors in 2 rooms
Post by: nick29650 on August 28, 2009, 12:12:05 AM
Don't waste any brain cells yet guys.

I went into hardware config and selected manually the two house codes I am using.  Took it off of Auto because it was showing a third house code that I am not using anywhere.

Initial results are promising even though I have no idea why It could possibly make a difference.

I'll let you know.
Title: Re: Hot water recirc w/ motion detectors in 2 rooms
Post by: nick29650 on August 28, 2009, 09:13:19 AM
I hope that by working through this “out loud” I might help some other guy or gal down the road.  I think it will as long as I get it figured out with the community and reading past links in this forum.  Plus my listing all of my efforts one of you guys might have suggestions too.

I am still having intermittent issues.  I noticed that the Belkin seven station USB hub that my AHP control module is plugged into runs pretty warm to the touch.  I have all seven ports in use.  I moved the AHP USB to a direct port in the rear of the computer.  It is working now … but I’ve been here before.  I will give it a while and report back.

 >*<
Title: Re: Hot water recirc w/ motion detectors in 2 rooms
Post by: dave w on August 28, 2009, 11:39:25 AM

But, people burst into flames on the sidewalks here all the time!


 -:) In theory the Motion Sensor would be able to see that person since they would be hotter than ambient temp.
Title: Re: Hot water recirc w/ motion detectors in 2 rooms
Post by: nick29650 on August 29, 2009, 01:04:51 PM
I guess (according to theory) I need to move to the mountains to get away from motion sensor falsing due to folks reaching the kindling point.

Anyway, I did see that in hardware configuration my batteries were low.  I don’t know how that could happen since the AHP module is plugged in and the batteries are less than a few months old.  I replaced them and with everything else I’ve done the Macros and recirculation pump has been working.

Thanks guys …. Again!

 ;D
Title: Re: Hot water recirc w/ motion detectors in 2 rooms
Post by: steven r on August 29, 2009, 08:09:31 PM
...and with everything else I’ve done the Macros and recirculation pump has been working...
Glad to see it works for you.
Was the logic clear as to why it works?
Title: Re: Hot water recirc w/ motion detectors in 2 rooms
Post by: nick29650 on August 30, 2009, 03:47:39 PM
Yes, thanks.  It is everything else that affects the x10 operation.  The macro logic as you assembled them is clear to me and working flawlessly at the moment.  I'm just concerned about a number of things that interfere with signals transmission and reception. 

I worry how my CM15A batteries ran down so quick.  And, even though I have an active phase coupler and signal booster at my breaker box, I still have inconsistencies with scheduled operations ... both time and macros.  At least now things work most of the time.

My house is not large (1800 sq ft) but I do have it full of electronics.  My wife and I both have complete offices out of here with all the requisite equipment in a modern office.

Reading other threads I'm thinking about XTB/XTB-IIR, but that's bucks I'm hoping not to spend ... I will though ... if in the end that is what it takes for flawless operation.

Again, thank you for the tutorial.  Macros are not that difficult once you see them and understand them and that was your gift to me. 



Title: Re: Hot water recirc w/ motion detectors in 2 rooms
Post by: dave w on August 30, 2009, 04:54:34 PM
Reading other threads I'm thinking about XTB/XTB-IIR, but that's bucks I'm hoping not to spend ... I will though ... if in the end that is what it takes for flawless operation.


Start saving your pennys. For most of us X10 becomes addictive and you start walking around the house, mumbling: "ooh, I could X10 that, and that, and definately that over there, and this..."

So if you find yourself doing that, and buying more modules,  get the XTBIIR. A good repeater like XTBIIR or ACT 234 will make the headache go away.