My new automation system.

CMC...nice relay/analog board. That was quick! About the phone control...can you install it on your wife’s phone as well? My plan is to eventually buy a cheap android tablet and install my user interface on that. That way I can leave it around near the patio. But gesture control? Haha

The HAT is AMAZING. Really loving what it did to the build. My only complaint is the relay contacts max out at 18 AWG. Anything larger and they don't fit. Great for my needs though. As for the phone control, it's a webpage. So I just went to it on all the phones and added the bookmark as a tile on our iphones. I also have a droid tablet near the door for the security system (konnected.io) but it's mounted to the wall so not easily moved. Honestly, I think I just wanted a reason to get a gesture control board... :D


One other suggestion, when I get around to installing my pressure sensors, I have bought these:


There is something comforting (to me at least) to be able to verify the digital readings with existing pressure gauges. The readings of my pressure transducers seem pretty accurate so far (not installed, just bench testing)...I hope to verify correlation over a wider range by keeping my old gauges on.

Another great suggestion! I was actually looking for one of these and didn't know what they were called. I just bought a pressure gauge last season so I wanted to keep using it if I could. Also for visual confirmation for when I'm out there without a phone.
 
I attach a current sensor transformer around the wire and then connect it to the DAC1/2 ports on the I/O hat.
Cmc, have you ever tried switching this sensor to the other leg of the 220v pump to see if the current/power readings are consistent? My cheap fluke meter is consistent until the lower amperage range where the legs show a consistent difference...I don’t think that’s possible, both legs should be the same, right?

CMC, I’ve also added your current sensing/power measurement functionality [to my todo list]...I am actually not quite trusting the power usage readings I get from my pump over the rs485 bus. They “floor” at 139watts and to date I have seen no other ecostar owner indicate that happens on their pump. I should probably just measure it manually to see what is happening.
So I measured the legs of my 220v pump lines and sure enough, the ecostar reported watts floor (actually 136 watts, not 139 watts) is incorrect. Currents continue to go down as the pump rpm is lowered below 1000. Good for efficiency, bad for my automation project where I want REAL watts. I think I am ordering some of your current donuts from eBay.
 
They were always the same but my pump isn’t variable speed. I thought they would be different but after reading a few threads here about 240v being an in and an out on the two load lines and both legs should absolutely be the same, so I pulled one and put it back in a box. THEN I realized that I wasn’t mathing right as the sequent board is 3.3v and the current flow outputs were 5v so I read up on voltage dividers and just when I was going to make one my sequent board got zapped by a power outage. So I’m now using their relay only board (was going to be for expansion/backup) and all my ADC stuff is down at the moment :(.

Cmc, have you ever tried switching this sensor to the other leg of the 220v pump to see if the current/power readings are consistent? My cheap fluke meter is consistent until the lower amperage range where the legs show a consistent difference...I don’t think that’s possible, both legs should be the same, right?


So I measured the legs of my 220v pump lines and sure enough, the ecostar reported watts floor (actually 136 watts, not 139 watts) is incorrect. Currents continue to go down as the pump rpm is lowered below 1000. Good for efficiency, bad for my automation project where I want REAL watts. I think I am ordering some of your current donuts from eBay.
 
Small updates... I have the Hayward ColorLogic LEDs for my spa and pool lighting. They have various light shows that are controlled by turning them off and on within a preset amount of time. So I decided to add the shows to my system and have it set them automatically.

I also read here (Thanks JoyfulNoise!) on TFP that my Dolphin controller has an automation mode. So I switched it to that and hacked off a power cord and added it to one of my unused relays. So when I hit the button on my phone my pool cleaner kicks off. I haven't added it to my scheduler (yet?) right now I use the phone UI to do it on an as needed basis

That's all for now.
 

Attachments

  • noderedlights.png
    noderedlights.png
    382.2 KB · Views: 49
  • noderedui.png
    noderedui.png
    413 KB · Views: 51
  • IMG_5862.PNG
    IMG_5862.PNG
    16.2 KB · Views: 48
  • IMG_5861.PNG
    IMG_5861.PNG
    19.5 KB · Views: 42
  • Like
Reactions: MyAZPool
Small updates... I have the Hayward ColorLogic LEDs for my spa and pool lighting. They have various light shows that are controlled by turning them off and on within a preset amount of time. So I decided to add the shows to my system and have it set them automatically.
I will be doing that on mine as well, my lights always start at the last selected state (light show/color is stored internally at my lights). Is yours like that and if so, where is the “current state” of the light kept in your automation software? Is there a chance it will become unsynced with the actual light’s stored state? That is definitely a possibility on mine that I have to plan for.

By the way, node red does look nice...much simpler than what I am doing.
 
In my lights, if you turn off and on with a delay of 11-15 seconds in between it resets it and starts back at the first light mode. I have that 12second delay in there which essentially resets it each time so I didn't have to keep track of state.

BTW, I picked up one of those Photons for my chlorine/pH testing project. They're pretty slick! I think I'm going to use Arduino for it though. All the sensors I've been able to find for the color sensors are 5v and I don't want to deal with voltage dividers if I don't have to.

Have you checked out block programming for your photon? It's kind of like node-red but generates code instead of running on the device.
 
In my lights, if you turn off and on with a delay of 11-15 seconds in between it resets it and starts back at the first light mode. I have that 12second delay in there which essentially resets it each time so I didn't have to keep track of state.
That explains it...yes mine doesn't have that...I will be storing the "last state" in flash on the Photon, but will have a mechanism to re-sync if for some reason that happens.

BTW, I picked up one of those Photons for my chlorine/pH testing project. They're pretty slick! I think I'm going to use Arduino for it though. All the sensors I've been able to find for the color sensors are 5v and I don't want to deal with voltage dividers if I don't have to.
My pressure sensors are 5V, the voltage dividers aren't bad...but I ended up adding an ADS1115 chip (with 5V feed) for my four pressure sensors because I was becoming pin limited anyway on my Photon for all the things I plan on adding.

If you are experimenting with your free chlorine tester idea with the color sensors, I have a suggestion that may or may not be possible: forget the 2nd part of the FC test (drops) and try to simply interpret the color of the solution after adding the DPD powder. I can usually tell whether mine is approximately right, maybe a color sensor would be more accurate or "accurate enough"

Have you checked out block programming for your photon? It's kind of like node-red but generates code instead of running on the device.
No, but truthfully I'm enjoying this C++ coding...I've always wanted to do it and now finally getting a bit of experience. Problem is, I don't remember it very well, especially all the syntax. I glanced at that block programming, I may check it out a bit more at a later time. Thanks.
 
  • Like
Reactions: cmc0619
Awesome job.

Love the Din rail mounting, keeps everything very clean. Also like the Sequent hat seems very clean and they also make a Din rail mount for the Pi.

So just wondering if your 24VAC power supply is under powered. It seems like valve actuators take .75A each and if you wanted to drive more than one at a time you would need a bigger power supply.

I am definitely going to be borrowing some of your ideas!!!
 
Love the implementation, I’ll echo Kato...the DIN looks fantastic! The DIN implementation sure gives you the flexibility to make changes as your pictures from the start show a total change in placement of all your hardware components.

I’m interested in those MOV transistors because I have had a relay stick in one of my other non-pool applications (central home vacuum). Is that a sacrificial device (sacrifices/destroys itself over time and MUST be replaced eventually)? Anyway, I’ll take a look at that.

I really like the relays with the pushbutton ON, too. Now if you could just make your “scenes” work with that (spa, etc), so that you could have full manual button control AND phone app control. That’s something I am considering for future (buttons on my control center to control major functions).

Node red looks really neat and simple. I’ll be interested to see if you can get all desired functionality out of it if/when decisions/scenes get more complicated. It looks pretty flexible and with all the 3rd party support it seems like it should give you everything you need.

About the valve actuators...Kato asked a good question...but remember that the actuators only draw power when moving...so you may be OK depending on that.

Thanks for the continued updates!
 

Enjoying this content?

Support TFP with a donation.

Give Support
So just wondering if your 24VAC power supply is under powered. It seems like valve actuators take .75A each and if you wanted to drive more than one at a time you would need a bigger power supply.

I hadn't thought of that. It was the only one I could find. Doing the math... The transformer is a 25w unit. So capable of providing ~1Amp. I guess I'll have to run the actuators one after the other. Good thought, thanks!
 
I’m interested in those MOV transistors because I have had a relay stick in one of my other non-pool applications (central home vacuum). Is that a sacrificial device (sacrifices/destroys itself over time and MUST be replaced eventually)? Anyway, I’ll take a look at that.

Yep! That's exactly how it works. I'm unsure how I'll know when it needs to be replaced. Maybe I'll just swap them out at the beginning of each season.

I really like the relays with the pushbutton ON, too. Now if you could just make your “scenes” work with that (spa, etc), so that you could have full manual button control AND phone app control. That’s something I am considering for future (buttons on my control center to control major functions).

You could hook a button to a GPIO and read it from Node-RED easily enough. That would do it. I'm hoping to get the functionality of that from the gesture board. The idea is to keep wet hands out of the box.

Node red looks really neat and simple. I’ll be interested to see if you can get all desired functionality out of it if/when decisions/scenes get more complicated. It looks pretty flexible and with all the 3rd party support it seems like it should give you everything you need.

So far it's been able to do everything I need it to. Really loving not having to code!
 
Here is a 24VAC transformer that I have found. It comes in its own outdoor box and in a bunch of different sizes. I am thinking about the 96W one which will drive 4 actuators at the same time.



Also in your video (which was great) you mention that there are some different relays and breakers that you would have used that are smaller. Do you have the links to those?
 
Here is a 24VAC transformer that I have found. It comes in its own outdoor box and in a bunch of different sizes. I am thinking about the 96W one which will drive 4 actuators at the same time.



Also in your video (which was great) you mention that there are some different relays and breakers that you would have used that are smaller. Do you have the links to those?

Thanks! I will keep those transformers in my back pocket just in case.

For the relays, Automation Direct, my usual goto, just got these in. It looks like the coil voltage matches the switching voltages though? Which can't be right. I don't see the point of that. Probably just a typo. Less ambiguously, are these from ASI. I actually picked one up and it works. One of the benefits of these relay types is they have slots on the sides so you can jumper the common wires together. So you only have to run one wire to them and then it gets distributed to the others as long as they're sitting next to each other. Certain models also have built-in kickback protection too.

The breakers are here: base and plugin.

Over time I'll probably swap my parts out to get the size down. If I can get it small enough I'd buy a smaller box as well.
 
Ok, I got my Pi running and the Sequent MegaIO board on as well.

Any chance you would be willing to share your flow. I would love to have a starting point.

Sure! Copy this into a text file and import it. It's the whole shebang.

[{"id":"6c9add44.450fc4","type":"tab","label":"Pool Controller","disabled":false,"info":""},{"id":"76b95cfa.d13364","type":"tab","label":"Lightshow","disabled":false,"info":""},{"id":"5038fe01.7d0bc","type":"tab","label":"State Sync","disabled":false,"info":""},{"id":"bf1384d1.efaeb","type":"tab","label":"Alexa","disabled":false,"info":""},{"id":"aaa6622b.0ef64","type":"tab","label":"Chemical Alerts","disabled":false,"info":""},{"id":"3cd2fa6a.e98a56","type":"tab","label":"Analog Gauges","disabled":true,"info":""},{"id":"f8a89894.0bb678","type":"tab","label":"Testing/WIP","disabled":true,"info":""},{"id":"e2571fd9.f57d4","type":"subflow","name":"Remove \\n","info":"","category":"","in":[{"x":40,"y":80,"wires":[{"id":"9b8cc752.951098"}]}],"out":[{"x":340,"y":80,"wires":[{"id":"9b8cc752.951098","port":0}]}],"env":[]},{"id":"d863f828.dc1e68","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false},{"id":"cb094c81.df18c","type":"ui_group","z":"","name":"PoolWeb","tab":"d863f828.dc1e68","disp":true,"width":"6","collapse":false},{"id":"b0573d51.d62fb","type":"ui_group","z":"","name":"Modes","tab":"d863f828.dc1e68","disp":true,"width":"6","collapse":false},{"id":"42ef5bb3.8fa1b4","type":"ui_base","theme":{"name":"theme-light","lightTheme":{"default":"#0094CE","baseColor":"#0094CE","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"darkTheme":{"default":"#097479","baseColor":"#097479","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":false},"customTheme":{"name":"Untitled Theme 1","default":"#4B7930","baseColor":"#4B7930","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"},"themeState":{"base-color":{"default":"#0094CE","value":"#0094CE","edited":false},"page-titlebar-backgroundColor":{"value":"#0094CE","edited":false},"page-backgroundColor":{"value":"#fafafa","edited":false},"page-sidebar-backgroundColor":{"value":"#ffffff","edited":false},"group-textColor":{"value":"#1bbfff","edited":false},"group-borderColor":{"value":"#ffffff","edited":false},"group-backgroundColor":{"value":"#ffffff","edited":false},"widget-textColor":{"value":"#111111","edited":false},"widget-backgroundColor":{"value":"#0094ce","edited":false},"widget-borderColor":{"value":"#ffffff","edited":false},"base-font":{"value":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"}},"angularTheme":{"primary":"indigo","accents":"blue","warn":"red","background":"grey"}},"site":{"name":"Node-RED Dashboard","hideToolbar":"false","allowSwipe":"false","lockMenu":"false","allowTempTheme":"true","dateFormat":"DD/MM/YYYY","sizes":{"sx":48,"sy":48,"gx":6,"gy":6,"cx":6,"cy":6,"px":0,"py":0}}},{"id":"3ea053cd.557d3c","type":"light-scheduler-settings","z":"","name":"Home","latitude":"39.8944432","longitude":"-75.0062896"},{"id":"c06f6b7a.facf88","type":"ui_group","z":"","name":"Gauges","tab":"d863f828.dc1e68","disp":true,"width":"6","collapse":false},{"id":"6dd92db6.1735e4","type":"ui_tab","z":"","name":"Diagnostics","icon":"dashboard","disabled":false,"hidden":false},{"id":"5c03ba.87d81c48","type":"ui_group","z":"","name":"Diagnostics","tab":"6dd92db6.1735e4","disp":true,"width":"6","collapse":false},{"id":"d8a4245c.0ea428","type":"mqtt-broker","z":"","name":"localhost","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"8def150f.618728","type":"ui_tab","z":"","name":"Lights","icon":"dashboard","disabled":false,"hidden":false},{"id":"c4769a5b.855198","type":"ui_group","z":"","name":"Synchronized","tab":"8def150f.618728","disp":true,"width":"6","collapse":false},{"id":"10282833.0a00a8","type":"ui_group","z":"","name":"Pool","tab":"8def150f.618728","disp":true,"width":"6","collapse":false},{"id":"7a5846d7.baf658","type":"ui_group","z":"","name":"Spa","tab":"8def150f.618728","disp":true,"width":"6","collapse":false},{"id":"ab1400ba.0929d","type":"ui_switch","z":"6c9add44.450fc4","name":"","label":"Pump","tooltip":"","group":"cb094c81.df18c","order":1,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":450,"y":80,"wires":[["f6403a49.1a7cf8"]]},{"id":"219a4ab0.481b66","type":"ui_switch","z":"6c9add44.450fc4","name":"","label":"Pool","tooltip":"","group":"b0573d51.d62fb","order":0,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":90,"y":80,"wires":[["ab1400ba.0929d","f0faefe4.57e1d"]]},{"id":"4d3b95c9.fe8f2c","type":"ui_switch","z":"6c9add44.450fc4","name":"","label":"Spa Light","tooltip":"","group":"cb094c81.df18c","order":2,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":320,"y":400,"wires":[["809373ae.6782c"]]},{"id":"e3d2b36c.2b50e","type":"ui_switch","z":"6c9add44.450fc4","name":"","label":"SPA","tooltip":"","group":"b0573d51.d62fb","order":1,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":90,"y":120,"wires":[["ab1400ba.0929d","fe521bc5.bbe278","4d3b95c9.fe8f2c","db912e3a.9d7d5","bdbcd7ee.7dda88"]]},{"id":"1f4b485c.fd5348","type":"light-scheduler","z":"6c9add44.450fc4","settings":"3ea053cd.557d3c","events":"[{\"start\":{\"dow\":3,\"mod\":960},\"end\":{\"dow\":3,\"mod\":1350}},{\"start\":{\"dow\":6,\"mod\":960},\"end\":{\"dow\":6,\"mod\":1350}},{\"start\":{\"dow\":0,\"mod\":960},\"end\":{\"dow\":0,\"mod\":1350}},{\"start\":{\"dow\":1,\"mod\":960},\"end\":{\"dow\":1,\"mod\":1350}},{\"start\":{\"dow\":2,\"mod\":960},\"end\":{\"dow\":2,\"mod\":1350}},{\"start\":{\"dow\":1,\"mod\":345},\"end\":{\"dow\":1,\"mod\":405}},{\"start\":{\"dow\":2,\"mod\":345},\"end\":{\"dow\":2,\"mod\":405}},{\"start\":{\"dow\":3,\"mod\":345},\"end\":{\"dow\":3,\"mod\":405}},{\"start\":{\"dow\":4,\"mod\":345},\"end\":{\"dow\":4,\"mod\":405}},{\"start\":{\"dow\":5,\"mod\":345},\"end\":{\"dow\":5,\"mod\":405}},{\"start\":{\"dow\":6,\"mod\":345},\"end\":{\"dow\":6,\"mod\":405}},{\"start\":{\"dow\":0,\"mod\":345},\"end\":{\"dow\":0,\"mod\":405}},{\"start\":{\"dow\":4,\"mod\":960},\"end\":{\"dow\":4,\"mod\":1350}},{\"start\":{\"dow\":5,\"mod\":960},\"end\":{\"dow\":5,\"mod\":1350}}]","topic":"","name":"Run Pump","onPayload":"1","onPayloadType":"num","offPayload":"0","offPayloadType":"num","onlyWhenDark":false,"scheduleRndMax":0,"sunElevationThreshold":6,"sunShowElevationInStatus":false,"outputfreq":"output.statechange.startup","x":110,"y":200,"wires":[["ab1400ba.0929d"]]},{"id":"33ac3d6f.e05fa2","type":"comment","z":"6c9add44.450fc4","name":"Scene Menus","info":"","x":70,"y":40,"wires":[]},{"id":"3f5a9921.5119a6","type":"comment","z":"6c9add44.450fc4","name":"Scheduler","info":"","x":60,"y":160,"wires":[]},{"id":"41c56ff9.06e53","type":"comment","z":"6c9add44.450fc4","name":"Device Mgmt","info":"","x":70,"y":260,"wires":[]},{"id":"713cb2a4.853e8c","type":"comment","z":"6c9add44.450fc4","name":"Devices","info":"","x":350,"y":20,"wires":[]},{"id":"fe521bc5.bbe278","type":"ui_switch","z":"6c9add44.450fc4","name":"","label":"Blower","tooltip":"","group":"cb094c81.df18c","order":1,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":450,"y":140,"wires":[["3719a2b8.b2000e","f1b2d0f1.5df6e"]]},{"id":"f6403a49.1a7cf8","type":"exec","z":"6c9add44.450fc4","command":"relay8 0 write 1 ","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Pool Pump","x":610,"y":80,"wires":[[],[],[]]},{"id":"809373ae.6782c","type":"exec","z":"6c9add44.450fc4","command":"relay8 0 write 6 ","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"SPA LED","x":460,"y":400,"wires":[[],[],[]]},{"id":"f1b2d0f1.5df6e","type":"exec","z":"6c9add44.450fc4","command":"relay8 0 write 3 ","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Blower","x":590,"y":140,"wires":[[],[],[]]},{"id":"3719a2b8.b2000e","type":"trigger","z":"6c9add44.450fc4","op1":"1","op2":"0","op1type":"num","op2type":"num","duration":"30","extend":false,"units":"s","reset":"0","bytopic":"all","name":"run blower for 30 seconds","x":650,"y":200,"wires":[["fe521bc5.bbe278"]]},{"id":"3e5128fe.da1318","type":"exec","z":"6c9add44.450fc4","command":"relay8 0 write 5 ","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Heater Enable","x":1040,"y":260,"wires":[[],[],[]]},{"id":"db912e3a.9d7d5","type":"exec","z":"6c9add44.450fc4","command":"relay8 0 write 7 ","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"CFH - Pool/SPA","x":1040,"y":340,"wires":[[],[],[]]},{"id":"8824c1b4.feb27","type":"ui_dropdown","z":"6c9add44.450fc4","name":"","label":"Heat Pool/Spa/Off","tooltip":"","place":"Select option","group":"cb094c81.df18c","order":8,"width":0,"height":0,"passthru":true,"options":[{"label":"Pool","value":"pool","type":"str"},{"label":"Spa","value":"spa","type":"str"},{"label":"Off","value":"off","type":"str"}],"payload":"","topic":"","x":250,"y":300,"wires":[["c59876f7.f446c8"]]},{"id":"c59876f7.f446c8","type":"switch","z":"6c9add44.450fc4","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"pool","vt":"str"},{"t":"eq","v":"off","vt":"str"},{"t":"eq","v":"spa","vt":"str"}],"checkall":"false","repair":false,"outputs":3,"x":430,"y":300,"wires":[["47ea23df.a11ebc","291945cd.cab4ca"],["47ea23df.a11ebc"],["47ea23df.a11ebc","291945cd.cab4ca"]]},{"id":"47ea23df.a11ebc","type":"change","z":"6c9add44.450fc4","name":"Convert pool/spa to 1","rules":[{"t":"change","p":"payload","pt":"msg","from":"pool|spa","fromt":"re","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":260,"wires":[["bdbcd7ee.7dda88"]]},{"id":"f0faefe4.57e1d","type":"ui_switch","z":"6c9add44.450fc4","name":"","label":"Pool Light","tooltip":"","group":"cb094c81.df18c","order":2,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":320,"y":460,"wires":[["4a10dc85.b73054"]]},{"id":"4a10dc85.b73054","type":"exec","z":"6c9add44.450fc4","command":"relay8 0 write 8 ","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Pool LED","x":460,"y":460,"wires":[[],[],[]]},{"id":"9b8cc752.951098","type":"change","z":"e2571fd9.f57d4","name":"Remove \\n","rules":[{"t":"set","p":"payload","pt":"msg","to":"$number($trim(payload))","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":190,"y":80,"wires":[[]]},{"id":"66b944b0.27b3fc","type":"ui_dropdown","z":"76b95cfa.d13364","name":"","label":"Pool Lightshow","tooltip":"","place":"Select option","group":"10282833.0a00a8","order":8,"width":0,"height":0,"passthru":true,"options":[{"label":"Voodoo Lounge","value":1,"type":"num"},{"label":"Deep Blue Sea","value":2,"type":"num"},{"label":"Afternoon Skies","value":3,"type":"num"},{"label":"Emerald","value":4,"type":"num"},{"label":"Sangria","value":5,"type":"num"},{"label":"Cloud White","value":6,"type":"num"},{"label":"Twilight","value":7,"type":"num"},{"label":"Tranquility","value":8,"type":"num"},{"label":"Gemstone","value":9,"type":"num"},{"label":"USA!","value":10,"type":"num"},{"label":"Mardi Gras","value":11,"type":"num"},{"label":"Cool Cabaret","value":12,"type":"num"}],"payload":"","topic":"lights","x":140,"y":40,"wires":[["3158ee90.939e62"]]},{"id":"b2b69678.946868","type":"exec","z":"76b95cfa.d13364","command":"relay8 0 write 8 off","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Initialize Light","x":480,"y":40,"wires":[[],[],["928d33b0.94e848"]]},{"id":"8e5cb9ab.4e77b","type":"counter-loop","z":"76b95cfa.d13364","name":"Flip Lightswitch counter","counter":"il8e5cb9ab4e77b","counterType":"msg","reset":true,"resetValue":"value-null","initial":"1","initialType":"num","operator":"lt","termination":"poollightcount","terminationType":"global","increment":1,"incrementType":"num","x":190,"y":100,"wires":[[],["aad5ee82.c2b86"]]},{"id":"6fd976c4.9da7d8","type":"exec","z":"76b95cfa.d13364","command":"relay8 0 write 8 off","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Turn off light","x":530,"y":100,"wires":[[],[],["b5d52480.32e57"]]},{"id":"928d33b0.94e848","type":"delay","z":"76b95cfa.d13364","name":"","pauseType":"delay","timeout":"12","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":640,"y":40,"wires":[["838ee5ee.e387d8","8e5cb9ab.4e77b"]]},{"id":"bfc8d9ae.71d038","type":"exec","z":"76b95cfa.d13364","command":"relay8 0 write 8 on","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Turn on light","x":830,"y":100,"wires":[[],[],["8e5cb9ab.4e77b"]]},{"id":"b5d52480.32e57","type":"delay","z":"76b95cfa.d13364","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":680,"y":100,"wires":[["bfc8d9ae.71d038"]]},{"id":"838ee5ee.e387d8","type":"exec","z":"76b95cfa.d13364","command":"relay8 0 write 8 on","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Turn on light","x":830,"y":40,"wires":[[],[],[]]},{"id":"3be8066.fa2c3fa","type":"inject","z":"3cd2fa6a.e98a56","name":"Read ADC","topic":"","payload":"0 aread 1","payloadType":"str","repeat":"30","crontab":"","once":false,"onceDelay":"","x":110,"y":40,"wires":[["395e5cba.fa4a0c"]]},{"id":"395e5cba.fa4a0c","type":"exec","z":"3cd2fa6a.e98a56","command":"megaio ","addpay":true,"append":"","useSpawn":"false","timer":"1","oldrc":false,"name":"ADC 1 (Pressure)","x":310,"y":40,"wires":[["2af2b023.dba56"],[],[]]},{"id":"2af2b023.dba56","type":"subflow:e2571fd9.f57d4","z":"3cd2fa6a.e98a56","x":510,"y":40,"wires":[["2d7d100e.1a468"]]},{"id":"2d7d100e.1a468","type":"function","z":"3cd2fa6a.e98a56","name":"Convert to psi","func":"msg.payload -= 500;\nmsg.payload /= 4000;\nmsg.payload *= 174;\nreturn msg;","outputs":1,"noerr":0,"x":680,"y":40,"wires":[["f1145478.416188"]]},{"id":"f1145478.416188","type":"ui_gauge","z":"3cd2fa6a.e98a56","name":"Filter Pressure","group":"c06f6b7a.facf88","order":0,"width":0,"height":0,"gtype":"gage","title":"Filter Pressure","label":"psi","format":"{{value | number:1}}psi","min":"0","max":"60","colors":["#4040dc","#28e628","#ca3838"],"seg1":"10","seg2":"20","x":880,"y":40,"wires":[]},{"id":"3158ee90.939e62","type":"function","z":"76b95cfa.d13364","name":"set lightcount","func":"global.set(\"poollightcount\",msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":40,"wires":[["b2b69678.946868"]]},{"id":"91b58b76.544a6","type":"ui_switch","z":"6c9add44.450fc4","name":"","label":"Pool Cleaner","tooltip":"","group":"cb094c81.df18c","order":1,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":330,"y":520,"wires":[["d0586a6e.02c758","fbdce6c7.1197b8"]]},{"id":"fbdce6c7.1197b8","type":"exec","z":"6c9add44.450fc4","command":"relay8 0 write 2 ","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Pool Cleaner","x":510,"y":520,"wires":[[],[],[]]},{"id":"d0586a6e.02c758","type":"trigger","z":"6c9add44.450fc4","op1":"1","op2":"0","op1type":"num","op2type":"num","duration":"2","extend":false,"units":"hr","reset":"0","bytopic":"all","name":"run Dolphin for 2 hours","x":540,"y":580,"wires":[["91b58b76.544a6"]]},{"id":"6790bfdc.54cda","type":"mosca in","z":"f8a89894.0bb678","mqtt_port":1883,"mqtt_ws_port":8080,"name":"","username":"","password":"","dburl":"","x":150,"y":340,"wires":[["27c455a7.550502"]]},{"id":"e8460bf7.48a85","type":"i2c scan","z":"f8a89894.0bb678","x":260,"y":160,"wires":[["27c455a7.550502"],["27c455a7.550502"]]},{"id":"758f5200.383768","type":"i2c in","z":"f8a89894.0bb678","name":"","address":"49","command":"7","count":"4","x":180,"y":80,"wires":[["27c455a7.550502"]]},{"id":"89de7681.ba68e","type":"inject","z":"f8a89894.0bb678","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":160,"wires":[["e8460bf7.48a85"]]},{"id":"1625e2de.fc6895","type":"inject","z":"f8a89894.0bb678","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":120,"y":20,"wires":[["758f5200.383768"]]},{"id":"cc3b4b62.45fa98","type":"Sonoff device","z":"f8a89894.0bb678","mode":"0","broker":"d8a4245c.0ea428","device":"sonoff","name":"","onValue":"ON","offValue":"OFF","cmdPrefix":"cmnd","statPrefix":"stat","telePrefix":"tele","x":330,"y":340,"wires":[["27c455a7.550502"]]},{"id":"27c455a7.550502","type":"debug","z":"f8a89894.0bb678","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":630,"y":160,"wires":[]},{"id":"78d87de0.e9ed24","type":"amazon-echo-hub","z":"bf1384d1.efaeb","port":"80","enableinput":true,"x":110,"y":40,"wires":[["b90c6a9b.298f98","509bc835.4a6a","7cde0fad.3b137","1770a6ef.6ec379","59ccb178.f365c"]]},{"id":"b90c6a9b.298f98","type":"amazon-echo-device","z":"bf1384d1.efaeb","name":"Pool Pump","topic":"","x":190,"y":120,"wires":[["a4272b6f.a9bf5","644ae9aa.79d628","5a5cf23b.07769c"]]},{"id":"509bc835.4a6a","type":"amazon-echo-device","z":"bf1384d1.efaeb","name":"Blower","topic":"","x":170,"y":160,"wires":[["25a27d0b.770dd2"]]},{"id":"a4272b6f.a9bf5","type":"change","z":"bf1384d1.efaeb","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"true","fromt":"bool","to":"1","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"false","fromt":"bool","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":120,"wires":[["644ae9aa.79d628","5a5cf23b.07769c"]]},{"id":"644ae9aa.79d628","type":"link out","z":"bf1384d1.efaeb","name":"Alexa/Pool Pump","links":["d19c2244.e3657"],"x":495,"y":120,"wires":[]},{"id":"5010df54.5a8cc","type":"link out","z":"bf1384d1.efaeb","name":"Alexa/Blower","links":["646fdfae.29fe4"],"x":495,"y":160,"wires":[]},{"id":"d19c2244.e3657","type":"link in","z":"6c9add44.450fc4","name":"Link To Pump","links":["644ae9aa.79d628","20a89bfd.aaba14"],"x":355,"y":60,"wires":[["ab1400ba.0929d"]]},{"id":"646fdfae.29fe4","type":"link in","z":"6c9add44.450fc4","name":"Link to Blower","links":["5010df54.5a8cc","65e45e6f.e6002"],"x":355,"y":120,"wires":[["fe521bc5.bbe278"]]},{"id":"25a27d0b.770dd2","type":"change","z":"bf1384d1.efaeb","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"true","fromt":"bool","to":"1","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"false","fromt":"bool","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":160,"wires":[["5010df54.5a8cc"]]},{"id":"a5eac548.5b5db8","type":"exec","z":"5038fe01.7d0bc","command":"relay8 0 read 1","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Pool Pump","x":390,"y":40,"wires":[["831390b4.4fbe4"],[],[]]},{"id":"459694a8.a64c9c","type":"inject","z":"5038fe01.7d0bc","name":"","topic":"","payload":"1","payloadType":"num","repeat":"60","crontab":"","once":true,"onceDelay":0.1,"x":70,"y":180,"wires":[["f17a2b3f.c72f28","a14596c7.c6a758","5b14b616.fb32f8","5729255b.99c83c","b8d63b6a.1e8618","b106c0be.424bf","6223bf4d.c9464"]]},{"id":"7a2213a5.ad8dec","type":"exec","z":"5038fe01.7d0bc","command":"relay8 0 read 8","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Pool Lights","x":390,"y":280,"wires":[["57ae9b88.316ed4"],[],[]]},{"id":"8450e84.062e018","type":"exec","z":"5038fe01.7d0bc","command":"relay8 0 read 3","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Blower","x":370,"y":100,"wires":[["1779cfba.eaa9f"],[],[]]},{"id":"a3f161a3.889a","type":"exec","z":"5038fe01.7d0bc","command":"relay8 0 read 5","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Heater Enable","x":400,"y":160,"wires":[["d09e89c.b02fc78"],[],[]]},{"id":"9c775e6f.ea521","type":"exec","z":"5038fe01.7d0bc","command":"relay8 0 read 7","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Heat - Pool(0) or Spa(1)","x":430,"y":220,"wires":[["5d2a620f.bd4e1c"],[],[]]},{"id":"5d3c20c6.16c5b","type":"ui_led","z":"5038fe01.7d0bc","group":"5c03ba.87d81c48","order":0,"width":0,"height":0,"label":"Pump","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"red","value":"0","valueType":"num"},{"color":"green","value":"1","valueType":"num"}],"name":"","x":770,"y":40,"wires":[]},{"id":"ef17f85c.cab488","type":"ui_led","z":"5038fe01.7d0bc","group":"5c03ba.87d81c48","order":0,"width":0,"height":0,"label":"Blower","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"red","value":"0","valueType":"num"},{"color":"green","value":"1","valueType":"num"}],"name":"","x":770,"y":100,"wires":[]},{"id":"41b535e7.fbb36c","type":"ui_led","z":"5038fe01.7d0bc","group":"5c03ba.87d81c48","order":0,"width":0,"height":0,"label":"Lights","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"red","value":"0","valueType":"num"},{"color":"green","value":"1","valueType":"num"}],"name":"","x":770,"y":280,"wires":[]},{"id":"d32ed0fb.45653","type":"ui_led","z":"5038fe01.7d0bc","group":"5c03ba.87d81c48","order":0,"width":0,"height":0,"label":"Heater Enable","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"red","value":"0","valueType":"num"},{"color":"green","value":"1","valueType":"num"}],"name":"","x":770,"y":160,"wires":[]},{"id":"201d9165.ec5c6e","type":"ui_led","z":"5038fe01.7d0bc","group":"5c03ba.87d81c48","order":0,"width":0,"height":0,"label":"Pool(Grn)/Spa(Red)","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"red","value":"1","valueType":"num"},{"color":"green","value":"0","valueType":"num"}],"name":"","x":770,"y":220,"wires":[]},{"id":"9391bec1.b17bd","type":"exec","z":"5038fe01.7d0bc","command":"relay8 0 read 6","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Spa Lights","x":390,"y":340,"wires":[["338c2ac8.2b8476"],[],[]]},{"id":"496b2bf6.855034","type":"ui_led","z":"5038fe01.7d0bc","group":"5c03ba.87d81c48","order":0,"width":0,"height":0,"label":"Spa Lights","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"red","value":"0","valueType":"num"},{"color":"green","value":"1","valueType":"num"}],"name":"","x":770,"y":340,"wires":[]},{"id":"831390b4.4fbe4","type":"subflow:e2571fd9.f57d4","z":"5038fe01.7d0bc","name":"","env":[],"x":630,"y":40,"wires":[["5d3c20c6.16c5b","20a89bfd.aaba14"]]},{"id":"1779cfba.eaa9f","type":"subflow:e2571fd9.f57d4","z":"5038fe01.7d0bc","name":"","env":[],"x":630,"y":100,"wires":[["ef17f85c.cab488","65e45e6f.e6002"]]},{"id":"57ae9b88.316ed4","type":"subflow:e2571fd9.f57d4","z":"5038fe01.7d0bc","x":630,"y":280,"wires":[["41b535e7.fbb36c","8f66271.68333d8"]]},{"id":"d09e89c.b02fc78","type":"subflow:e2571fd9.f57d4","z":"5038fe01.7d0bc","x":630,"y":160,"wires":[["d32ed0fb.45653","c884054b.639ba8"]]},{"id":"5d2a620f.bd4e1c","type":"subflow:e2571fd9.f57d4","z":"5038fe01.7d0bc","x":630,"y":220,"wires":[["201d9165.ec5c6e","8589d08c.7225a"]]},{"id":"338c2ac8.2b8476","type":"subflow:e2571fd9.f57d4","z":"5038fe01.7d0bc","x":630,"y":340,"wires":[["496b2bf6.855034","2c4f48c3.5927f8"]]},{"id":"f17a2b3f.c72f28","type":"delay","z":"5038fe01.7d0bc","name":"","pauseType":"random","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"3","randomLast":"15","randomUnits":"seconds","drop":false,"x":240,"y":40,"wires":[["a5eac548.5b5db8"]]},{"id":"a14596c7.c6a758","type":"delay","z":"5038fe01.7d0bc","name":"","pauseType":"random","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"5","randomLast":"12","randomUnits":"seconds","drop":false,"x":240,"y":100,"wires":[["8450e84.062e018"]]},{"id":"5b14b616.fb32f8","type":"delay","z":"5038fe01.7d0bc","name":"","pauseType":"random","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"4","randomLast":"11","randomUnits":"seconds","drop":false,"x":240,"y":280,"wires":[["7a2213a5.ad8dec"]]},{"id":"5729255b.99c83c","type":"delay","z":"5038fe01.7d0bc","name":"","pauseType":"random","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"3","randomLast":"10","randomUnits":"seconds","drop":false,"x":240,"y":160,"wires":[["a3f161a3.889a"]]},{"id":"b8d63b6a.1e8618","type":"delay","z":"5038fe01.7d0bc","name":"","pauseType":"random","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"3","randomLast":"10","randomUnits":"seconds","drop":false,"x":240,"y":220,"wires":[["9c775e6f.ea521"]]},{"id":"b106c0be.424bf","type":"delay","z":"5038fe01.7d0bc","name":"","pauseType":"random","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"3","randomLast":"10","randomUnits":"seconds","drop":false,"x":240,"y":340,"wires":[["9391bec1.b17bd"]]},{"id":"20a89bfd.aaba14","type":"link out","z":"5038fe01.7d0bc","name":"To Pool Pump","links":["d19c2244.e3657"],"x":855,"y":40,"wires":[]},{"id":"cc37a29a.31e43","type":"link in","z":"6c9add44.450fc4","name":"Link to Heater Enable","links":["c884054b.639ba8"],"x":915,"y":300,"wires":[["3e5128fe.da1318"]]},{"id":"7328063f.8420e8","type":"link in","z":"6c9add44.450fc4","name":"Link to Pool Light","links":["8f66271.68333d8","f3cc8127.ebe7f"],"x":215,"y":460,"wires":[["f0faefe4.57e1d"]]},{"id":"65e45e6f.e6002","type":"link out","z":"5038fe01.7d0bc","name":"To Blower","links":["646fdfae.29fe4"],"x":855,"y":100,"wires":[]},{"id":"8f66271.68333d8","type":"link out","z":"5038fe01.7d0bc","name":"To Pool Light","links":["7328063f.8420e8"],"x":855,"y":280,"wires":[]},{"id":"c884054b.639ba8","type":"link out","z":"5038fe01.7d0bc","name":"To Heater Enable","links":["cc37a29a.31e43"],"x":855,"y":160,"wires":[]},{"id":"8589d08c.7225a","type":"link out","z":"5038fe01.7d0bc","name":"To Heat-Pool/Spa","links":["ee4d532a.3f15f"],"x":855,"y":220,"wires":[]},{"id":"2c4f48c3.5927f8","type":"link out","z":"5038fe01.7d0bc","name":"To SPA Light","links":["6b38805b.af4e3"],"x":855,"y":340,"wires":[]},{"id":"9e1689d2.542098","type":"exec","z":"5038fe01.7d0bc","command":"relay8 0 read 2","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Pool Cleaner","x":390,"y":400,"wires":[["8ac065c.474e598"],[],[]]},{"id":"6223bf4d.c9464","type":"delay","z":"5038fe01.7d0bc","name":"","pauseType":"random","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"3","randomLast":"10","randomUnits":"seconds","drop":false,"x":240,"y":400,"wires":[["9e1689d2.542098"]]},{"id":"8ac065c.474e598","type":"subflow:e2571fd9.f57d4","z":"5038fe01.7d0bc","x":630,"y":400,"wires":[["9cf5b9db.bc2f28","eabef902.96fab8"]]},{"id":"9cf5b9db.bc2f28","type":"ui_led","z":"5038fe01.7d0bc","group":"5c03ba.87d81c48","order":0,"width":0,"height":0,"label":"Pool Cleaner","labelPlacement":"left","labelAlignment":"left","colorForValue":[{"color":"red","value":"0","valueType":"num"},{"color":"green","value":"1","valueType":"num"}],"name":"","x":770,"y":400,"wires":[]},{"id":"eabef902.96fab8","type":"link out","z":"5038fe01.7d0bc","name":"To Pool Cleaner","links":["25d00f2f.86451"],"x":855,"y":400,"wires":[]},{"id":"25d00f2f.86451","type":"link in","z":"6c9add44.450fc4","name":"Link to Pool Cleaner","links":["eabef902.96fab8","64d76f18.a4c44"],"x":235,"y":580,"wires":[["91b58b76.544a6"]]},{"id":"6b38805b.af4e3","type":"link in","z":"6c9add44.450fc4","name":"Link To Spa Light","links":["2c4f48c3.5927f8","17fa8504.5cf05b"],"x":215,"y":400,"wires":[["4d3b95c9.fe8f2c"]]},{"id":"ee4d532a.3f15f","type":"link in","z":"6c9add44.450fc4","name":"Link to Heat-Pool/Spa","links":["8589d08c.7225a"],"x":915,"y":380,"wires":[["db912e3a.9d7d5"]]},{"id":"291945cd.cab4ca","type":"change","z":"6c9add44.450fc4","name":"Convert pool/spa to 0/1","rules":[{"t":"change","p":"payload","pt":"msg","from":"pool","fromt":"re","to":"0","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"spa","fromt":"re","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":630,"y":340,"wires":[["db912e3a.9d7d5"]]},{"id":"18891e58.dff662","type":"inject","z":"6c9add44.450fc4","name":"Run Cleaner at 7am","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"00 07 * * *","once":false,"onceDelay":0.1,"x":100,"y":500,"wires":[["91b58b76.544a6"]]},{"id":"af725cdf.760cb","type":"inject","z":"6c9add44.450fc4","name":"Run Cleaner at 3pm","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"00 15 * * *","once":false,"onceDelay":0.1,"x":100,"y":560,"wires":[["91b58b76.544a6"]]},{"id":"7cde0fad.3b137","type":"amazon-echo-device","z":"bf1384d1.efaeb","name":"Pool Light","topic":"","x":180,"y":200,"wires":[["324e0eb4.8ed632","5a5cf23b.07769c"]]},{"id":"1770a6ef.6ec379","type":"amazon-echo-device","z":"bf1384d1.efaeb","name":"Spa Light","topic":"","x":180,"y":240,"wires":[["629e808f.ddd6"]]},{"id":"324e0eb4.8ed632","type":"change","z":"bf1384d1.efaeb","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"true","fromt":"bool","to":"1","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"false","fromt":"bool","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":200,"wires":[["f3cc8127.ebe7f","5a5cf23b.07769c"]]},{"id":"629e808f.ddd6","type":"change","z":"bf1384d1.efaeb","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"true","fromt":"bool","to":"1","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"false","fromt":"bool","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":240,"wires":[["17fa8504.5cf05b"]]},{"id":"f3cc8127.ebe7f","type":"link out","z":"bf1384d1.efaeb","name":"Alexa/Pool Light","links":["7328063f.8420e8"],"x":495,"y":200,"wires":[]},{"id":"17fa8504.5cf05b","type":"link out","z":"bf1384d1.efaeb","name":"Alexa/Spa Light","links":["6b38805b.af4e3"],"x":495,"y":240,"wires":[]},{"id":"792c993b.714078","type":"ui_dropdown","z":"76b95cfa.d13364","name":"","label":"Spa Lightshow","tooltip":"","place":"Select option","group":"7a5846d7.baf658","order":8,"width":0,"height":0,"passthru":true,"options":[{"label":"Voodoo Lounge","value":1,"type":"num"},{"label":"Deep Blue Sea","value":2,"type":"num"},{"label":"Afternoon Skies","value":3,"type":"num"},{"label":"Emerald","value":4,"type":"num"},{"label":"Sangria","value":5,"type":"num"},{"label":"Cloud White","value":6,"type":"num"},{"label":"Twilight","value":7,"type":"num"},{"label":"Tranquility","value":8,"type":"num"},{"label":"Gemstone","value":9,"type":"num"},{"label":"USA!","value":10,"type":"num"},{"label":"Mardi Gras","value":11,"type":"num"},{"label":"Cool Cabaret","value":12,"type":"num"}],"payload":"","topic":"lights","x":140,"y":220,"wires":[["962526eb.af10b8"]]},{"id":"52ac1c80.ccac54","type":"counter-loop","z":"76b95cfa.d13364","name":"Flip Lightswitch counter","counter":"il8e5cb9ab4e77b","counterType":"msg","reset":true,"resetValue":"value-null","initial":"1","initialType":"num","operator":"lt","termination":"spalightcount","terminationType":"global","increment":1,"incrementType":"num","x":190,"y":280,"wires":[[],["741e5f82.18edd"]]},{"id":"800b0bcb.679d38","type":"exec","z":"76b95cfa.d13364","command":"relay8 0 write 6 off","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Turn off light","x":530,"y":280,"wires":[[],[],["4ef20dc3.8a34b4"]]},{"id":"f984205f.31cee","type":"exec","z":"76b95cfa.d13364","command":"relay8 0 write 6 on","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Turn on light","x":830,"y":280,"wires":[[],[],["52ac1c80.ccac54"]]},{"id":"4ef20dc3.8a34b4","type":"delay","z":"76b95cfa.d13364","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":680,"y":280,"wires":[["f984205f.31cee"]]},{"id":"962526eb.af10b8","type":"function","z":"76b95cfa.d13364","name":"set lightcount","func":"global.set(\"spalightcount\",msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":220,"wires":[["5604e6ac.e4c578"]]},{"id":"cc8a2300.ca60c","type":"ui_dropdown","z":"76b95cfa.d13364","name":"","label":"Sync'd Lightshow","tooltip":"","place":"Select option","group":"c4769a5b.855198","order":8,"width":0,"height":0,"passthru":false,"options":[{"label":"Voodoo Lounge","value":1,"type":"num"},{"label":"Deep Blue Sea","value":2,"type":"num"},{"label":"Afternoon Skies","value":3,"type":"num"},{"label":"Emerald","value":4,"type":"num"},{"label":"Sangria","value":5,"type":"num"},{"label":"Cloud White","value":6,"type":"num"},{"label":"Twilight","value":7,"type":"num"},{"label":"Tranquility","value":8,"type":"num"},{"label":"Gemstone","value":9,"type":"num"},{"label":"USA!","value":10,"type":"num"},{"label":"Mardi Gras","value":11,"type":"num"},{"label":"Cool Cabaret","value":12,"type":"num"}],"payload":"","topic":"lights","x":90,"y":160,"wires":[["66b944b0.27b3fc","792c993b.714078"]]},{"id":"5a5cf23b.07769c","type":"debug","z":"bf1384d1.efaeb","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":800,"y":120,"wires":[]},{"id":"aad5ee82.c2b86","type":"delay","z":"76b95cfa.d13364","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":380,"y":100,"wires":[["6fd976c4.9da7d8"]]},{"id":"741e5f82.18edd","type":"delay","z":"76b95cfa.d13364","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":380,"y":280,"wires":[["800b0bcb.679d38"]]},{"id":"5604e6ac.e4c578","type":"exec","z":"76b95cfa.d13364","command":"relay8 0 write 6 off","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Initialize Light","x":480,"y":220,"wires":[[],[],["561ae90a.251378"]]},{"id":"561ae90a.251378","type":"delay","z":"76b95cfa.d13364","name":"","pauseType":"delay","timeout":"12","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":640,"y":220,"wires":[["ad75c034.59f64","52ac1c80.ccac54"]]},{"id":"ad75c034.59f64","type":"exec","z":"76b95cfa.d13364","command":"relay8 0 write 6 on","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Turn on light","x":830,"y":220,"wires":[[],[],[]]},{"id":"59ccb178.f365c","type":"amazon-echo-device","z":"bf1384d1.efaeb","name":"Pool Cleaner","topic":"","x":190,"y":280,"wires":[["b11f67ff.6471e8"]]},{"id":"b11f67ff.6471e8","type":"change","z":"bf1384d1.efaeb","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"true","fromt":"bool","to":"1","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"false","fromt":"bool","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":280,"wires":[["64d76f18.a4c44"]]},{"id":"64d76f18.a4c44","type":"link out","z":"bf1384d1.efaeb","name":"Alexa/Pool Cleaner","links":["25d00f2f.86451"],"x":495,"y":280,"wires":[]},{"id":"93299a0f.7dae18","type":"exec","z":"3cd2fa6a.e98a56","command":"megaio ","addpay":true,"append":"","useSpawn":"false","timer":"1","oldrc":false,"name":"ADC 2 (Temperature)","x":320,"y":100,"wires":[["cfd08ca.95b4a7"],[],[]]},{"id":"fb05fe35.4b0ad","type":"inject","z":"3cd2fa6a.e98a56","name":"Read ADC","topic":"","payload":"0 aread 1","payloadType":"str","repeat":"30","crontab":"","once":false,"onceDelay":"","x":110,"y":100,"wires":[["93299a0f.7dae18"]]},{"id":"cfd08ca.95b4a7","type":"subflow:e2571fd9.f57d4","z":"3cd2fa6a.e98a56","x":510,"y":100,"wires":[["d0affc4e.de329"]]},{"id":"d0affc4e.de329","type":"function","z":"3cd2fa6a.e98a56","name":"Convert to F","func":"msg.payload -= 500;\nmsg.payload /= 4000;\nmsg.payload *= 174;\nreturn msg;","outputs":1,"noerr":0,"x":670,"y":100,"wires":[["d3c66a1f.561a98"]]},{"id":"d3c66a1f.561a98","type":"ui_gauge","z":"3cd2fa6a.e98a56","name":"Temperature","group":"c06f6b7a.facf88","order":0,"width":0,"height":0,"gtype":"gage","title":"Temperature","label":"F","format":"","min":"32","max":"100","colors":["#4040dc","#28e628","#ca3838"],"seg1":"75","seg2":"90","x":870,"y":100,"wires":[]},{"id":"87b90ae.1a666f8","type":"exec","z":"3cd2fa6a.e98a56","command":"megaio ","addpay":true,"append":"","useSpawn":"false","timer":"1","oldrc":false,"name":"ADC 3 (Pump Current)","x":320,"y":160,"wires":[["38bf004d.f4a95"],[],[]]},{"id":"16522bdd.f4dde4","type":"inject","z":"3cd2fa6a.e98a56","name":"Read ADC","topic":"","payload":"0 aread 1","payloadType":"str","repeat":"30","crontab":"","once":false,"onceDelay":"","x":110,"y":160,"wires":[["87b90ae.1a666f8"]]},{"id":"38bf004d.f4a95","type":"subflow:e2571fd9.f57d4","z":"3cd2fa6a.e98a56","x":510,"y":160,"wires":[["5de90ae6.aa8304"]]},{"id":"5de90ae6.aa8304","type":"function","z":"3cd2fa6a.e98a56","name":"Convert to Amps","func":"msg.payload -= 500;\nmsg.payload /= 4000;\nmsg.payload *= 174;\nreturn msg;","outputs":1,"noerr":0,"x":690,"y":160,"wires":[["39945eba.4b38f2"]]},{"id":"39945eba.4b38f2","type":"ui_gauge","z":"3cd2fa6a.e98a56","name":"Amps","group":"c06f6b7a.facf88","order":0,"width":0,"height":0,"gtype":"gage","title":"Amps","label":"amps","format":"","min":"0","max":"20","colors":["#4040dc","#28e628","#ca3838"],"seg1":"5","seg2":"10","x":850,"y":160,"wires":[]},{"id":"808afec7.89c","type":"pimcp3008","z":"3cd2fa6a.e98a56","name":"","dev":"3008","pin":0,"dnum":0,"bus":0,"x":240,"y":260,"wires":[[]]},{"id":"bdbcd7ee.7dda88","type":"trigger","z":"6c9add44.450fc4","op1":"1","op2":"0","op1type":"num","op2type":"num","duration":"3","extend":false,"units":"hr","reset":"0","bytopic":"all","name":"Heater off after 3 hrs","x":840,"y":240,"wires":[["3e5128fe.da1318"]]},{"id":"4501d834.a7a7d8","type":"e-mail","z":"aaa6622b.0ef64","server":"smtp.gmail.com","port":"465","secure":true,"tls":true,"name":"myemail@gmail.com","dname":"send email","x":750,"y":360,"wires":[]},{"id":"107309c8.e21806","type":"file","z":"aaa6622b.0ef64","name":"Log Chlorine Change","filename":"/tmp/chlorine.txt","appendNewline":false,"createDir":false,"overwriteFile":"true","encoding":"none","x":420,"y":200,"wires":[[]]},{"id":"80c675d2.5c5638","type":"ui_button","z":"aaa6622b.0ef64","name":"Chlorine Timer Reset Button","group":"cb094c81.df18c","order":6,"width":0,"height":0,"passthru":false,"label":"Chlorine Replenished","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"date","topic":"","x":160,"y":200,"wires":[["107309c8.e21806"]]},{"id":"587e3deb.4e33a4","type":"file in","z":"aaa6622b.0ef64","name":"Read Chlorine Time","filename":"/tmp/chlorine.txt","format":"utf8","chunk":false,"sendError":false,"encoding":"none","x":200,"y":360,"wires":[["1410eb18.1bed35"]]},{"id":"6960e3d0.ce34ac","type":"inject","z":"aaa6622b.0ef64","name":"Check Chlorine Expiration every 6 hours","topic":"","payload":"","payloadType":"date","repeat":"21600","crontab":"","once":true,"onceDelay":0.1,"x":200,"y":300,"wires":[["587e3deb.4e33a4"]]},{"id":"c7aa7984.609258","type":"function","z":"aaa6622b.0ef64","name":"Compare Dates","func":"var timestamp2 = Date.now();\nmsg.payload += 1209600;\nmsg.payload -= timestamp2;\nif (msg.payload > 0) {\n return msg;\n}\n","outputs":1,"noerr":0,"x":580,"y":360,"wires":[["4501d834.a7a7d8"]]},{"id":"1410eb18.1bed35","type":"subflow:e2571fd9.f57d4","z":"aaa6622b.0ef64","name":"","x":390,"y":360,"wires":[["c7aa7984.609258"]]}]
 
Last edited:
  • Like
Reactions: MyAZPool
Thank you for posting the flow. Very impressive. I am looking to do something similar and had started out with the Photon, but my new plan involves a RPi in the house and Arduino by the equipment to pull sensor data, control the relays, etc. I'm very interested in learning more about the node-js pool controller. I have an Intelliflow pump, that is standalone, since my controller can only turn it on/off. Would love to be able to control the 4 preset speeds without purchasing the add-on relay that is $200+ from Pentair.
 
Thank you for posting the flow. Very impressive. I am looking to do something similar and had started out with the Photon, but my new plan involves a RPi in the house and Arduino by the equipment to pull sensor data, control the relays, etc. I'm very interested in learning more about the node-js pool controller. I have an Intelliflow pump, that is standalone, since my controller can only turn it on/off. Would love to be able to control the 4 preset speeds without purchasing the add-on relay that is $200+ from Pentair.

Nice. I'm waiting for my pump to die so I can pick up an Intelliflo. The RS-485 adapters to interface the pump with a pi start as low as 6.99 on amazon. So it's pretty cheap to get into experimenting with nodejs-poolController. That would also allow you much more control over your pump vs just using the relay speed settings.

I've started keeping my flows on github.
 
Here is a 24VAC transformer that I have found. It comes in its own outdoor box and in a bunch of different sizes. I am thinking about the 96W one which will drive 4 actuators at the same time.

BTW, thanks for pointing out that my transformer is undersized. In preparation for actuators, I picked up this transformer which does 72VA sustained and 100VA temporary. It's HUGE going to have to carve out some more space for it in my enclosure.
 

Enjoying this content?

Support TFP with a donation.

Give Support
Thread Status
Hello , This thread has been inactive for over 60 days. New postings here are unlikely to be seen or responded to by other members. For better visibility, consider Starting A New Thread.