WannaPool DIY Pool Automation Build Thread

cmc0619

Gold Supporter
May 2, 2018
169
Cherry Hill, NJ
Pool Size
20000
Surface
Plaster
Chlorine
Salt Water Generator
SWG Type
CircuPool Edge-40
I did some digging in the wiring of my current box, and found some surprises- Everything (except the light) is 240V. I mistakenly assumed (cough cough) that only the two pumps were 240VAC.
1) Solar Control System (Goldline) - Wired directly off the 240VAC input to the pool pump mechanical timer. Always powered.
2) Salt System - 240VAC wired off the SWITCHED side of the pool pump mechanical timer (only gets power when pool pump is on)
3) Hayward Spa Heater - 240VAC wired directly across the 240V double breaker lugs for the spa pump (always powered)

I had originally planned on turning the power to the heater on and off using a relay, and using the two wire method for thermostat.... (Which is how my COMPLETED flow in node-red is). But now I am thinking about just leaving it always powered on. For some reason I don't want to be switching 240V through a relay to an electronic device... is that crazy thinking?

Anyone see any issue with the way things are CURRENTLY wired? The only breakers I have are a two doubles (one for spa pump, one for pool pump), and a single for the light. I was planning on the same for the new system
Does the heater need its own breaker, or anything else need breakers? (This box is also downstream from a 30A breaker off the main house panel).

I leave my heater on and control it with the three-wire config. Not crazy at all. The other thing I found on my heater, but I suspect applies to all gas heaters is that high voltage scary 240V line that runs into the heater immediately gets introduced to a 240V -> 24V AC transformer the minute it enters the heater and that runs off to power your heater electronics and igniter. Same 24V AC that runs your actuators and other parts (eg. relay coils depending on what you chose). It's using hardly any amps at all from that 240V line. Kind of a waste. In fact, I've toyed with running my heater from the 24V I use for my actuators but haven't made the switch. But if that transformer ever dies you better believe I'm not buying another one. You can create 120V from 240V service, so if your heater transformer supports it, I don't see any problem with switching it to 120V. You'll have a lot more options for relays with it being a single pole if you do want to go the switching whole unit off route. I wouldn't say that same thing about a pump which draws more amps but 240V on a ~2amp heater draw will turn into 4amp draw on 120V. Not a big deal and your wiring will support either meager amount of current

I put a 4amp B curve breaker on my heater (per the manuals max amp usage) for completeness' sake. I just put breakers in front of all my loads because that's the way my Intermatic was setup. I'm sure there's some NEC requirement but I don't know it. I think @ajw22 is the master of the NEC codes around here. It's a good idea to do. My main breaker is back in the house, down the stairs and in the basement. It's more convenient for me to hit all my breakers and only have to avoid touching two wires than having to think about how certain wires are always hot when I'm in there wiring up a sensor or something. I will add GFCI is recommended for anything that touches water. Altech makes DIN rail compatible GFCIs in both single pole (lights) and double pole (pumps) configurations. That's what I did even though there was no GFCI on my original Intermatic. Worth checking out.

I received my new actuator and got it set up- I needed to adjust the internal cogs so it would only swing 90 degrees. For anyone using a similar valve:
1) Adjust the cogs if you have to
2) The actuator comes with underside switch in OFF position. Don't forget to turn in ON. I used ON1.
3) Red wire is for clockwise.
4) White wire is for counter clockwise.
5) Black wire is common.

I wired transformer 24VAC(+) to Relay1 N/O, Transformer 24VAC(+) to Relay2 N/O, Relay1 Common to actuator Red Wire, Relay2 Common to Actuator White wire, and actuator black wire to transformer 24VAC(-). Fortunately, due to some kitchen remodeling, I have an available 120VAC supply wire hanging out of the wall that the diswasher is normally connected to- It came in handy today.

It may not apply to you but if need your actuators to run at the same time in opposite directions, you can wire them both up to the same relay and flip the On1 on one of them and flip to On2 and they'll run reverse of each other off a single relay. That's how I have mine setup. May or may not apply to you but wanted to point that out as it'll save you a relay.
 

WannaPool

Well-known member
Feb 17, 2011
55
Thanks @cmc0619 . I have been unable to find what amps my heater will draw at 120V OR 240V. With the three wire method, I assume you are using the internal thermostat? So no setting of the temperature from your phone/ipad?
 
Last edited:

cmc0619

Gold Supporter
May 2, 2018
169
Cherry Hill, NJ
Pool Size
20000
Surface
Plaster
Chlorine
Salt Water Generator
SWG Type
CircuPool Edge-40
Thanks @cmc0619 . I have been unable to find what amps my heater will draw at 120V OR 240V. With the three wire method, I assume you are using the internal thermostat? So no setting of the temperature from your phone/ipad?
It's probably the same as mine +/- an amp. Doesn't take very many amps to power the control panel and make a spark. It might also be printed on your transformer itself in the heater. But worse come worse, a 15amp breaker is what was probably on your Intermatic or whatever you had on there before. It was probably shared with a few other devices too.

Yes, I have my pool temp set in heater to 85 and Spa set to 98. I can flip to off, pool, or spa and the heater takes it from there. I sometimes miss not being able to crank up the spa temp a degree or two when it's only adults in there but it's not often. I have thermistors I just haven't had time to plug them in and wire them up.
 

Katodude

Silver Supporter
Aug 22, 2017
1,291
West Palm Beach/Florida
Pool Size
15000
Surface
Plaster
Chlorine
Salt Water Generator
SWG Type
Hayward Aqua Rite (T-15)
If you have the DS18B20 wired in you can control the temp from NodeRed. Set the Spa temp to whatever you want the highest to be. In my case 102. Then I cycle the heater from spa to standby by measuring the temp.

I can share my NodeRed flows with you for heater control if you need.
 
Last edited:

Katodude

Silver Supporter
Aug 22, 2017
1,291
West Palm Beach/Florida
Pool Size
15000
Surface
Plaster
Chlorine
Salt Water Generator
SWG Type
Hayward Aqua Rite (T-15)
Have you made any progress with Alexa integration? I was hoping to copy some of your good work.
 

emac0002

Member
Sep 2, 2019
6
Texas
You guys are doing great work. I have been lurking and building my own controller from different parts and peices from the post here. I have the Alexa integration working. One thing I didnt like is if the state was changed from the Node Red interface it wasnt updated with Alexa. I used MQTT broker to fix this. I dont have everything I want to control with Alexa in these nodes, but I thought I could pass on my flows for Alexa to see if they are helpful for you.

You can ignore the iptable stuff, it isnt needed.

[{"id":"34b007c5.43ff98","type":"tab","label":"Amazon Alexa-emm","disabled":false,"info":""},{"id":"879618eb.206918","type":"amazon-echo-device","z":"34b007c5.43ff98","name":"Pool","topic":"","x":1410,"y":680,"wires":[["464e35d0.cccc9c"]]},{"id":"464e35d0.cccc9c","type":"change","z":"34b007c5.43ff98","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"Medium","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"Off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1700,"y":680,"wires":[["170ae3d.f7ea41c"]]},{"id":"e684884e.d30688","type":"amazon-echo-device","z":"34b007c5.43ff98","name":"Spa","topic":"","x":1410,"y":720,"wires":[["f98884b2.8b4a58"]]},{"id":"f98884b2.8b4a58","type":"change","z":"34b007c5.43ff98","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"Spa Speed 3","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"Spa Pump Off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1700,"y":720,"wires":[["e14c3d8f.13a9f"]]},{"id":"170ae3d.f7ea41c","type":"link out","z":"34b007c5.43ff98","name":"Alexa Pool Out","links":["2746fbc0.561394"],"x":1920,"y":680,"wires":[]},{"id":"e14c3d8f.13a9f","type":"link out","z":"34b007c5.43ff98","name":"Alexa Spa Out ","links":["76820228.695bec"],"x":1915,"y":720,"wires":[]},{"id":"cac6006e.26a51","type":"amazon-echo-device","z":"34b007c5.43ff98","name":"Pool Lights","topic":"","x":1430,"y":880,"wires":[["5ab496c0.5c2658"]]},{"id":"cfa9f92a.2b05a8","type":"amazon-echo-device","z":"34b007c5.43ff98","name":"Spa Lights","topic":"","x":1430,"y":920,"wires":[["e0e30eec.1b74b"]]},{"id":"5ab496c0.5c2658","type":"change","z":"34b007c5.43ff98","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1700,"y":880,"wires":[["482f73e5.a93dcc"]]},{"id":"e0e30eec.1b74b","type":"change","z":"34b007c5.43ff98","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1700,"y":920,"wires":[["ea364486.0aa5a8"]]},{"id":"482f73e5.a93dcc","type":"link out","z":"34b007c5.43ff98","name":"Pool Lights Out","links":["8879a055.39126"],"x":1915,"y":880,"wires":[]},{"id":"ea364486.0aa5a8","type":"link out","z":"34b007c5.43ff98","name":"Spa Lights Out","links":["ebd7bf13.44fdc","e789937e.a922d8"],"x":1915,"y":920,"wires":[]},{"id":"6ba24d4e.668ef4","type":"exec","z":"34b007c5.43ff98","command":"sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":770,"y":140,"wires":[[],[],[]]},{"id":"1c0ec163.3d70ef","type":"delay","z":"34b007c5.43ff98","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":360,"y":140,"wires":[["6ba24d4e.668ef4"]]},{"id":"f8b8b71e.2f4908","type":"delay","z":"34b007c5.43ff98","name":"","pauseType":"delay","timeout":"4","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":360,"y":200,"wires":[["2cb9ab90.f2a564"]]},{"id":"2cb9ab90.f2a564","type":"exec","z":"34b007c5.43ff98","command":"sudo iptables -t nat -A PREROUTING -p udp --dport 80 -j REDIRECT --to-port 8080 ","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":770,"y":200,"wires":[[],[],[]]},{"id":"2f43cdf7.563312","type":"exec","z":"34b007c5.43ff98","command":"sudo iptables -t nat -L","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":580,"y":260,"wires":[[],[],[]]},{"id":"66be6ecb.21544","type":"exec","z":"34b007c5.43ff98","command":"sudo sh -c \"iptables-save > /etc/iptables.rules\"","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":660,"y":320,"wires":[[],[],[]]},{"id":"302ccef4.726582","type":"delay","z":"34b007c5.43ff98","name":"","pauseType":"delay","timeout":"6","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":360,"y":260,"wires":[["2f43cdf7.563312"]]},{"id":"b2024dc9.6f8b1","type":"delay","z":"34b007c5.43ff98","name":"","pauseType":"delay","timeout":"8","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":360,"y":320,"wires":[["66be6ecb.21544"]]},{"id":"50e62efd.59a2d","type":"amazon-echo-device","z":"34b007c5.43ff98","name":"Waterfall Lights ","topic":"","x":1440,"y":960,"wires":[["40384b9.9ee8c34"]]},{"id":"40384b9.9ee8c34","type":"change","z":"34b007c5.43ff98","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"11","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1700,"y":960,"wires":[["39146849.97a528"]]},{"id":"39146849.97a528","type":"link out","z":"34b007c5.43ff98","name":"Waterfall Lights Out","links":["5083b31.6b1194c","80d3783d.51edd","d36e594a.275a4"],"x":1915,"y":960,"wires":[]},{"id":"b77bf1a4.fb1ee","type":"amazon-echo-device","z":"34b007c5.43ff98","name":"Waterfall","topic":"","x":1420,"y":760,"wires":[["62f98e14.235fb"]]},{"id":"62f98e14.235fb","type":"change","z":"34b007c5.43ff98","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"Feature Speed 3","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"Off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1700,"y":760,"wires":[["caa526a3.baeb88"]]},{"id":"caa526a3.baeb88","type":"link out","z":"34b007c5.43ff98","name":"Alexa Waterfall Out ","links":["6eeafd57.607f64","fd26ec8e.3b8ec"],"x":1915,"y":760,"wires":[]},{"id":"afb80e33.eab428","type":"amazon-echo-device","z":"34b007c5.43ff98","name":"Fire","topic":"","x":1410,"y":800,"wires":[["6e69ae29.09bf2"]]},{"id":"6e69ae29.09bf2","type":"change","z":"34b007c5.43ff98","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"Spa Speed 4","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"Spa Pump Off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1700,"y":800,"wires":[["e2aebe63.1e1bf"]]},{"id":"e2aebe63.1e1bf","type":"link out","z":"34b007c5.43ff98","name":"Alexa Fire Out ","links":["c78b53bf.f80fe"],"x":1915,"y":800,"wires":[]},{"id":"c6806579.b081a8","type":"start-up-trigger","z":"34b007c5.43ff98","x":140,"y":240,"wires":[[]]},{"id":"a34d1e79.c05f9","type":"delay","z":"34b007c5.43ff98","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":360,"y":420,"wires":[["a1488789.613968"]]},{"id":"7908d200.73464","type":"delay","z":"34b007c5.43ff98","name":"","pauseType":"delay","timeout":"4","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":360,"y":480,"wires":[["18c3f854.f9ca28"]]},{"id":"18c3f854.f9ca28","type":"exec","z":"34b007c5.43ff98","command":"sudo iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":790,"y":480,"wires":[[],[],[]]},{"id":"a1488789.613968","type":"exec","z":"34b007c5.43ff98","command":"sudo iptables -I INPUT 1 -p tcp --dport 80 -j ACCEPT","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":680,"y":420,"wires":[[],[],[]]},{"id":"60be82d.510447c","type":"amazon-echo-hub","z":"34b007c5.43ff98","port":"8080","processinput":"1","x":1130,"y":800,"wires":[["50e62efd.59a2d","cfa9f92a.2b05a8","cac6006e.26a51","afb80e33.eab428","b77bf1a4.fb1ee","e684884e.d30688","879618eb.206918","5e366a97.da2794"]]},{"id":"2ad6c36e.00133c","type":"function","z":"34b007c5.43ff98","name":"Waterfall Light Hub Input","func":"var nodeid=\"50e62efd.59a2d\";\n\nif (msg.payload == \"1\"){\n msg.payload = {\n on: true,\n nodeid: nodeid\n }\n\n} else if(msg.payload == \"0\"){\n msg.payload = {\n on: false,\n nodeid: nodeid\n }\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":810,"y":1400,"wires":[["60be82d.510447c"]]},{"id":"c3cba273.276c3","type":"link in","z":"34b007c5.43ff98","name":"","links":["b41c8b25.e5cdb8"],"x":655,"y":1400,"wires":[["2ad6c36e.00133c"]]},{"id":"cf777302.89d428","type":"function","z":"34b007c5.43ff98","name":"Spa Light Hub Input","func":"var nodeid=\"cfa9f92a.2b05a8\";\n\nif (msg.payload == \"1\"){\n msg.payload = {\n on: true,\n nodeid: nodeid\n }\n\n} else if(msg.payload == \"0\"){\n msg.payload = {\n on: false,\n nodeid: nodeid\n }\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":800,"y":1360,"wires":[["60be82d.510447c"]]},{"id":"fc0a71ab.e43c8","type":"link in","z":"34b007c5.43ff98","name":"","links":["778718b9.ed54c8"],"x":655,"y":1360,"wires":[["cf777302.89d428"]]},{"id":"91e0ccfc.742f2","type":"function","z":"34b007c5.43ff98","name":"Pool Light Hub Input","func":"var nodeid=\"cac6006e.26a51\";\n\nif (msg.payload == \"1\"){\n msg.payload = {\n on: true,\n nodeid: nodeid\n }\n\n} else if(msg.payload == \"0\"){\n msg.payload = {\n on: false,\n nodeid: nodeid\n }\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":800,"y":1320,"wires":[["60be82d.510447c"]]},{"id":"7f5ff622.8ea51","type":"link in","z":"34b007c5.43ff98","name":"","links":["7b8d8de4.b77ffc"],"x":655,"y":1320,"wires":[["91e0ccfc.742f2"]]},{"id":"72ceb556.c8d99c","type":"function","z":"34b007c5.43ff98","name":"Pool Hub Input","func":"var nodeid=\"879618eb.206918\";\n\nif (msg.payload == \"1\"){\n msg.payload = {\n on: true,\n nodeid: nodeid\n }\n\n} else if(msg.payload == \"0\"){\n msg.payload = {\n on: false,\n nodeid: nodeid\n }\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":820,"y":600,"wires":[["60be82d.510447c"]]},{"id":"e31936a5.aad6e8","type":"function","z":"34b007c5.43ff98","name":"Fire Hub Input","func":"var nodeid=\"afb80e33.eab428\";\n\nif (msg.payload == \"1\"){\n msg.payload = {\n on: true,\n nodeid: nodeid\n }\n\n} else if(msg.payload == \"0\"){\n msg.payload = {\n on: false,\n nodeid: nodeid\n }\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":780,"y":1280,"wires":[["60be82d.510447c"]]},{"id":"35122503.921892","type":"link in","z":"34b007c5.43ff98","name":"Fire State","links":["e2094a75.00b4e"],"x":655,"y":1280,"wires":[["e31936a5.aad6e8"]]},{"id":"63da2c65.87bd04","type":"mqtt in","z":"34b007c5.43ff98","name":"Pool Pump Speed 1","topic":"Pool Pump Speed 1","qos":"0","datatype":"json","broker":"b0ef9109.119168","x":190,"y":540,"wires":[["2ed7a72.2dcf0d8"]]},{"id":"bb095f12.8c1308","type":"mqtt in","z":"34b007c5.43ff98","name":"Pool Pump Speed 2","topic":"Pool Pump Speed 2","qos":"0","datatype":"json","broker":"b0ef9109.119168","x":190,"y":580,"wires":[["2ed7a72.2dcf0d8"]]},{"id":"fcae7e13.e68f58","type":"mqtt in","z":"34b007c5.43ff98","name":"Pool Pump Speed 3","topic":"Pool Pump Speed 3","qos":"0","datatype":"json","broker":"b0ef9109.119168","x":190,"y":620,"wires":[["2ed7a72.2dcf0d8"]]},{"id":"65ae6d08.d3c8ac","type":"debug","z":"34b007c5.43ff98","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":590,"y":860,"wires":[]},{"id":"982d0e99.6e7b9","type":"mqtt in","z":"34b007c5.43ff98","name":"Pool Pump Speed 4","topic":"Pool Pump Speed 4","qos":"0","datatype":"json","broker":"b0ef9109.119168","x":190,"y":660,"wires":[["2ed7a72.2dcf0d8"]]},{"id":"5e366a97.da2794","type":"amazon-echo-device","z":"34b007c5.43ff98","name":"Bubbles","topic":"","x":1420,"y":640,"wires":[["5641e5e4.b24a0c"]]},{"id":"5641e5e4.b24a0c","type":"change","z":"34b007c5.43ff98","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"1","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1700,"y":640,"wires":[["d3c478c.098f608"]]},{"id":"d3c478c.098f608","type":"link out","z":"34b007c5.43ff98","name":"Alexa Bubbles Out","links":["2746fbc0.561394","d4c08309.2b93a8"],"x":1915,"y":640,"wires":[]},{"id":"2ed7a72.2dcf0d8","type":"BooleanLogic","z":"34b007c5.43ff98","name":"","operation":"OR","inputCount":"4","topic":"result","x":430,"y":600,"wires":[["6b48e655.be7698"]]},{"id":"6b48e655.be7698","type":"change","z":"34b007c5.43ff98","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"true","fromt":"bool","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"false","fromt":"bool","to":"0","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":600,"wires":[["72ceb556.c8d99c"]]},{"id":"132011c1.7360a6","type":"function","z":"34b007c5.43ff98","name":"Feature Hub Input","func":"var nodeid=\"b77bf1a4.fb1ee\";\n\nif (msg.payload == \"1\"){\n msg.payload = {\n on: true,\n nodeid: nodeid\n }\n\n} else if(msg.payload == \"0\"){\n msg.payload = {\n on: false,\n nodeid: nodeid\n }\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":830,"y":780,"wires":[["60be82d.510447c"]]},{"id":"3e877697.d4ead2","type":"mqtt in","z":"34b007c5.43ff98","name":"Feature Pump Speed 1","topic":"Feature Pump Speed 1","qos":"0","datatype":"json","broker":"b0ef9109.119168","x":200,"y":720,"wires":[["8da5cc48.3ddd3"]]},{"id":"c9fdf88e.0ed6d","type":"mqtt in","z":"34b007c5.43ff98","name":"Feature Pump Speed 2","topic":"Feature Pump Speed 2","qos":"0","datatype":"json","broker":"b0ef9109.119168","x":200,"y":760,"wires":[["8da5cc48.3ddd3"]]},{"id":"97203828.66b8b8","type":"mqtt in","z":"34b007c5.43ff98","name":"Feature Pump Speed 3","topic":"Feature Pump Speed 3","qos":"0","datatype":"json","broker":"b0ef9109.119168","x":200,"y":800,"wires":[["8da5cc48.3ddd3"]]},{"id":"33e6d4d4.15b654","type":"mqtt in","z":"34b007c5.43ff98","name":"Feature Pump Speed 4","topic":"Feature Pump Speed 4","qos":"0","datatype":"json","broker":"b0ef9109.119168","x":200,"y":840,"wires":[["8da5cc48.3ddd3"]]},{"id":"8da5cc48.3ddd3","type":"BooleanLogic","z":"34b007c5.43ff98","name":"","operation":"OR","inputCount":"4","topic":"result","x":430,"y":780,"wires":[["f05a1796.3e3c7"]]},{"id":"f05a1796.3e3c7","type":"change","z":"34b007c5.43ff98","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"true","fromt":"bool","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"false","fromt":"bool","to":"0","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":780,"wires":[["132011c1.7360a6"]]},{"id":"917dddc8.c9de7","type":"inject","z":"34b007c5.43ff98","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"59 23 * * 3,0","once":false,"onceDelay":0.1,"x":190,"y":60,"wires":[["8d25afb9.113758"]]},{"id":"8d25afb9.113758","type":"exec","z":"34b007c5.43ff98","command":"sudo reboot","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":390,"y":60,"wires":[[],[],[]]},{"id":"b0ef9109.119168","type":"mqtt-broker","z":"","name":"","broker":"192.168.1.252","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]
 

randytsuch

LifeTime Supporter
Mar 29, 2008
286
Los Angeles, Ca
Interesting thread, but seems to have died?

FWIW, I run Home Assistant on a pi, and use that with MQTT to talk to a couple of ESP's. The ESP's interface to my pool and spa equipment (I have two separate systems).
Only basic controls though, it turns on my pumps to circulate water. I have a couple DS18b20's to monitor temp, I drilled and tapped holes then used a little john guest adapter to install them.
Use relays to control the VSP on the pool, and a bigger relay to power on my spa pump.

I also run node red, but not really using for pool control yet, although now I'm thinking about using it for controlling the spa temp instead of using 3 wire control.

Been playing with Alexa and NR lately, like to geek factor on controlling stuff with voice, but using for lights and home theater system, not for pool yet.
I use node-red-contrib-amazon-echo to setup device and flows for the devices.
And I have setup node-red-contrib-alexa-remote2 so I send messages to my dots, and to listen to dots for commands. Also use this to control amazon plugs that I can't control otherwise.

I haven't been here for a long time, but am in the middle of fixing one of my temp sensors, and am updating some of my documentation for it, so stopped in here to see what was up.

Randy
 

Katodude

Silver Supporter
Aug 22, 2017
1,291
West Palm Beach/Florida
Pool Size
15000
Surface
Plaster
Chlorine
Salt Water Generator
SWG Type
Hayward Aqua Rite (T-15)
I use Node Red and Alexa to turn stuff on in pool.

What I have not figured out how to do is to ask Alexa what my pool temp is. None of the Nodes seem bi directional.
 

randytsuch

LifeTime Supporter
Mar 29, 2008
286
Los Angeles, Ca
I use alexa-remote2 to send canned messages to my dots, there's a good tutorial here
It takes a little work in setup this palette with your amazon account, but the link explains how to do it well.

You use the routine node to make announcements. My wife loves the "wash done" announcement when the washing machine finishes a load.
I haven't used a variable as part of the announcement, but that should work.

So I would start by getting the pool temp, and sending it to a routine node to one of your amazon devices, so the device will say the temp.
I expect you'll need to format the temperature to get alexa to say it.

If that works, you can kick the flow off either with remote2 or amazon-echo, I've used both to start flows based on saying a keyword to alexa.

Hopefully this makes sense.

Randy
 
  • Like
Reactions: cmc0619

Enjoying this content?

Support TFP with a donation.

Give Support

randytsuch

LifeTime Supporter
Mar 29, 2008
286
Los Angeles, Ca
That's because we're all happily running our DIY pool controllers while we count the money we saved :D
LOL
Took a quick look at what you did, impressive. I didn't know there was a library for controlling pool equipment, may need to look into that.

For the alexa stuff, I figured out how to get alexa to announce the temp, but it uses a specific dot. Or you can have it announce on all of them, I don't know how to get it to announce on the dot that was asked.
This flow gets the pool temperature over mqtt periodically, I think it gets sent once every couple of mins.
It saves the temp in a flow variable as a string. Right now it sends the message to alexa on demand, but that part can change to make it when you ask Alexa.
If I was a better programmer I'd have combined the strings, but I was lazy and used a delay instead. 1.5 sec delay works well for my setup.

[{"id":"a6938566.d51548","type":"mqtt in","z":"747a5cca.e3fd04","name":"pool temp","topic":"esp06Pool/PoolTemp/Temperature","qos":"2","datatype":"auto","broker":"944a7ac8.8b9eb8","x":100,"y":1700,"wires":[["89a3f20c.b8d4f"]]},{"id":"8671e27.a13302","type":"alexa-remote-routine","z":"747a5cca.e3fd04","name":"Pool temp","account":"55f990fa.da9d9","routineNode":{"type":"speak","payload":{"type":"regular","text":{"type":"msg","value":"payload"},"devices":["G090LF10725409SL"]}},"x":590,"y":1840,"wires":[[]]},{"id":"89a3f20c.b8d4f","type":"function","z":"747a5cca.e3fd04","name":"Save Pool Temp","func":"// Setup flow variable for if washer is on\n\nvar x = msg.payload\nx = x.toString();\nflow.set(\"PoolTemp\",x);\nmsg.payload = x;\n\nreturn [msg];\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":260,"y":1700,"wires":[[]]},{"id":"73742f54.dc048","type":"function","z":"747a5cca.e3fd04","name":"Get Pool Temp","func":"// Retrieve PoolTemp\nvar LocalTemp = flow.get('PoolTemp');\nmsg.payload = LocalTemp\nreturn [msg];\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":260,"y":1780,"wires":[["1dea86a2.753689","c747fd78.abef1"]]},{"id":"5bf9acd0.162ea4","type":"inject","z":"747a5cca.e3fd04","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":110,"y":1780,"wires":[["73742f54.dc048"]]},{"id":"1dea86a2.753689","type":"alexa-remote-routine","z":"747a5cca.e3fd04","name":"Pool Temp is","account":"55f990fa.da9d9","routineNode":{"type":"speak","payload":{"type":"regular","text":{"type":"str","value":"Pool Temp is"},"devices":["G090LF10725409SL"]}},"x":450,"y":1780,"wires":[[]]},{"id":"c747fd78.abef1","type":"delay","z":"747a5cca.e3fd04","name":"","pauseType":"delay","timeout":"1500","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":400,"y":1840,"wires":[["8671e27.a13302"]]},{"id":"944a7ac8.8b9eb8","type":"mqtt-broker","z":"","name":"HA mqtt","broker":"192.168.222.245","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"55f990fa.da9d9","type":"alexa-remote-account","z":"","name":"AlexaRT","authMethod":"proxy","proxyOwnIp":"192.168.xxx.xxx","proxyPort":"3456","cookieFile":"authfile","refreshInterval":"3","alexaServiceHost":"pitangui.amazon.com","amazonPage":"amazon.com","acceptLanguage":"en-US","userAgent":"","useWsMqtt":"on","autoInit":"on"}]
 

cmc0619

Gold Supporter
May 2, 2018
169
Cherry Hill, NJ
Pool Size
20000
Surface
Plaster
Chlorine
Salt Water Generator
SWG Type
CircuPool Edge-40
Thanks! That alexa-remote node looks right up my alley too. I really need to get back on the Alexa/pool game. Had it working for the first few weeks and then a code change killed it. The nodejs-poolcontroller is super cool if you have the higher end Pentair gear controlled over a RS-485 connection. I like that washer idea too. My wife makes extensive use of Alexa to tell our kids what to do during covid home school. She'll get a kick out of having the tables flipped on her!
 

chiefwej

LifeTime Supporter
TFP Guide
Jun 12, 2011
3,611
Tucson
For anyone looking for a quick, cheap and simple approach, here is what I did.
 

randytsuch

LifeTime Supporter
Mar 29, 2008
286
Los Angeles, Ca
@cmc0619
Since you're a real programmer, I'm sure you can do better than what I did. My background is HW, but I manage to brute force programs together to get them to do what I want.
I use relays to control my Haywood heater and VSP pump. I know the pump supports a serial port, but relays were easier since I only have a esp out by the pool, not a pi. If I ever upgrade, will consider a pi and see if I want serial control. But relays work fine.

For my washing machine, I use a tasmota loaded smart plug with energy monitoring. Tasmota is setup to send out the current used every min (I think) over MQTT.
When the current goes above a level, NR sets a wash started flag. Then if this flag is set, and current drops low enough, send wash done notification. I've been sending texts, but don't always have my phone with my at home so having alexa say it is nice.
I tried sensing movement with a vibration sensor, but couldn't get that to work. Current sense is easy with tasmota and a smart plug.

The other useful notifications I get are when the garage door is open too long and the garage refrigerator door is open too long. I use esp's connected to reed switches to sense the door positions. Other day my daughter forgot to close the garage, and after a while Alexa announced garage is open so I knew to check it.


@chiefwej
I'm cheap too, so I like what you did on a budget.

Info on my pool system

Randy
 

cmc0619

Gold Supporter
May 2, 2018
169
Cherry Hill, NJ
Pool Size
20000
Surface
Plaster
Chlorine
Salt Water Generator
SWG Type
CircuPool Edge-40
@cmc0619
Since you're a real programmer, I'm sure you can do better than what I did. My background is HW, but I manage to brute force programs together to get them to do what I want.

Definitely not a programmer! The maxim for all of my projects is 'No programming, no soldering' That's why node-red is so cool to me
 

WannaPool

Well-known member
Feb 17, 2011
55
Interesting thread, but seems to have died?
@randytsuch Not officially dead, just on hold for awhile. :)

I am back at it. Getting a new Intelliflow pump installed this week, so I need to figure out how to control it.
.... oh and I also have to physically install this controller it, as now it is sitting on my desk, not controlling anything!

@cmc0619 I may need some guidance on nodejs-poolController
- Specifically, I would like to develop WITHOUT connecting the pump. Not sure if this can be done.
- There doesn't seem to be a node-red package for this. Are you just using Node-Red to send API commands?

Basically I only need to send a few commands to the pump to adjust the speed.
 

cmc0619

Gold Supporter
May 2, 2018
169
Cherry Hill, NJ
Pool Size
20000
Surface
Plaster
Chlorine
Salt Water Generator
SWG Type
CircuPool Edge-40
5.3 example

I'm not sure. I know it could be done in 5.3 because they had that virtual controller. njpc just returned all 0's when polled. I haven't done anything with 6.1. The link above has web call examples for how to do it on 5.3. I want to say @Katodude is doing it on the current stuff but not sure. But yes, you just use node-red to do a webcall to njpc. The example in my link above is probably still somewhat useful you just have to change the URLs. My pool is just now thawing out and I started a new job that's sucking up all my time but if I get a free minute I can power up the controller, install 6.1 and take a look.
 

WannaPool

Well-known member
Feb 17, 2011
55
@cmc0619 Thanks Cliff!

This definitely helped me see how it can be done. It looks like the endpoints for the APIs have changed in v6. There is now a "config" group of endpoints, as well as a "state" group, which both look to effectively do what you've done in the 5.3 example.

If you are familiar with "Swagger," you can try the new API commands out here: Test nodejs-poolController API
Also, if you are familiar with POSTMAN (Postman), this is a nice utility which also allows you to test out APIs.
You can download all of the preformatted API commands from here: nodejs-poolcontroller Postman Collection
(You save the collection (JSON file), and import into POSTMAN, and then can set input parameters, such as IP address, etc.., and then run them)

I really wish there was some sort of "Intelliflow" stub that would emulate the pump electronics... I really don't want to be developing on a live piece of expensive equipment!

The goal (assuming I will be running the pump 24 hours, which has been recommended to me)
1) During the day (8-5ish): Pump will recirculate entire pool with spa spillover active. Speed/flow will be set accordingly.
2) At the end of the day, control system will switch my return valve to kill the spillover, and only return to pool. Speed/Flow will be adjusted accordingly
3) At any time the solar goes on, speed/flow will be adjusted accordingly.

Any other things I should be "controlling" or "monitoring" on this pump?
 
  • Like
Reactions: cmc0619

Katodude

Silver Supporter
Aug 22, 2017
1,291
West Palm Beach/Florida
Pool Size
15000
Surface
Plaster
Chlorine
Salt Water Generator
SWG Type
Hayward Aqua Rite (T-15)
I am almost a little embarrassed to admit that I am still running 5.3. It just works, and I have a severe case of being too lazy to upgrade. The commands to send to the pump are super easy. Everything else is just controlled with NodeRed sending commands to my relay hats, and I have NodeRed send commands to the nodeJSpoolController for pump speeds.

I even have the spillover work in nice water fall mode by running all returns to the spa and regulating the pump speed so it just flows nicely.

I really want to upgrade but I just dont want to do the work.
 

WannaPool

Well-known member
Feb 17, 2011
55
@Katodude If it ain't broke... don't fix it. :)

Thanks to the threads above from @randytsuch and emac002, I now have Alexa integration working. The one thing I CANNOT figure out is which echo device an Alexa command is received from... i.e. if I say "Turn SPA on" while at my KITCHEN echo, I would like to have Alexa respond back with "OK. SPA turned on" from the Kitchen echo. Unfortunately, I do not think this is possible to determine the origination with the "Amazon Echo Hub" node.
 

Enjoying this content?

Support TFP with a donation.

Give Support