Pool Automation Done!

Just wanted to post my latest Home Automation for my Pool. Took a bit of planning but when it was all done I think it came out ok?

I used a NodeMCU to control the 2 contactors so the 220 for the pumps didn’t blow the little relays that I have for other systems. One is a main pump and the other is a sheer decent.

The Sonoff 4 channel is for the 24V automatic intermatic valves to change the suction and delivery of water.

The other NodeMCU is for the landscape lights, pool heater, and dingelberry lights above the firepit.

Distribution for the 120V
Distribution for the 24V (Intermatic Valves)

For the temperature monitor for the heater I used a DS18B20 and cut the pipe and inserted a T. Cut a hole for the probe and coated it like crazy with Water grade epoxy from home depot. SO the probe doesn’t deteriorate. But I have it screwed in with plumbers tape so if I need to remove and replace I can easily do so. I had to order 5 so I’m good for a while. I popped it out a year later and it looks perfect. Slightly yellow but the epoxy is in tact.

NodeMCU for the pool pumps work off of a 120V and just activate the flow through for the 220. I had to make sure and get the right ones.

Then I have a slew of timers through tasmota, just in case home assistant is down, and also automation through home assistant for physical buttons.

The original box has 2 Kuled Switches flashed with Tasmota to control the pool lights.

All came together well. Kinda had to get it going as I was building it. If I did it again I would lay it out better and have another 4 way relay for expansion. But it works for everything I need now.

Let me know what you think!!

7 Likes

Awesome! Do you notice if there is any difference in water temp measured in the pipe vs in your pool? I am considering adding something like this to my existing system (which only controls my pump with one 3 wire contactor)

1 Like

how you set the position on the intermatic.
These are just ON until reach position so I would presume timing. but i would worry that at some point it get out of sync. How you do this?

1 Like

What’s funny is I measured the pool with a thermal pen so I know the sensor is spot on. Maybe within .5 degrees, but the pool temp on the heater unit is 3-4 deg higher.

The pool Heater unit temperature controller is off but the sensor I put in is right on the money

hey @Chris8837 in your last picture, the NodeMCU’s are mounted in the box. What type of screws and bolts are that? Any details on the procedure for mounting?

I just used regular screws that where as big as the holes in the nodeMCUs and the mount is a plexiglass that’s screwed into the housing in 4 locations. So the screws are in the back poking through. Then I used a nut to secure the screws in place and as an added bonus they raised the nodeMCUs off of the plexiglass.

So basically I built it all on a plexiglass sheet I had. Screwed it all in from the back. So it was all built before I put it in the box. Then I screwed the plexiglass to the outdoor rated box in 4 spots.

I used a sharpie marker to define the holes and a drill to drill the plexiglass. Then the screws just popped everything up.

The node mcus aren’t screwed in but the holes weren’t perfect so they are well seated when I pushed them on. I wanted this way if I needed to ever swap parts.

But it’s been rock solid for over a year now.

Eventually I need to get a dual micro usb and a step down current regulator so I dont have to use a couple Samsung charging bricks. Lol

tmjpugh:

The Intermatic shut off wherever you adjust the cam. So I just fed it 24v as it’s intended by the 24v regulator in the box underneath it.

Then for the switch’s to change the water flow? I use automations in home assistant.

I have it so whenever one is selected the other 3 must be off and vice versa.

So if I want the spa only to be heated the automation turns on those 2 on the sonoff then the other 2 are shut off immediately.

I can control the pool in 4 different setting this way.

Spa only
Spa spillway (sucking from pool)
Normal Everyday Mode (slightly going to spa)
Pool only mode. Sucking and returning to pool.

I can’t completely isolate the pool as the Intermatic valves don’t allow for a 5th with those cams. But if I can isolate the spa it works just fine to heat it up.

I just heat the spa and the pool at the same time if I’m heating the pool.

- id: spa_heater
  alias: Spa Heater
  trigger:
  - platform: state
    entity_id: automation.spa_heater
    from: 'off'
    to: 'on'
  action:
  - service: switch.turn_on
    entity_id: switch.02_pro_switch_1
  - service: switch.turn_off
    entity_id: switch.02_pro_switch_2
  - service: switch.turn_on
    entity_id: switch.02_pro_switch_3
  - service: switch.turn_off
    entity_id: switch.02_pro_switch_4
  - service: automation.turn_off
    entity_id: automation.pool_heater
  - service: automation.turn_off
    entity_id: automation.normal_mode_2
  - service: automation.turn_off
    entity_id: automation.normal_mode
- id: pool_heater

Here’s a sample of one of the 4

I too am curious about this. Can you give some details? I have been looking at options this past weekend to do the same.
From my standpoint, I will be adding some solar panels to add heat to my pool, but not sure how to handle the valve control without adding additional ball valves to the plumbing.

I guess if you didn’t add automatic ball valves you would always be going through the solar?

I wonder if these would do the same thing without having to hook up contactors…

https://www.ebay.com/i/293061377825?chn=ps&norover=1&mkevt=1&mkrid=711-117182-37290-0&mkcid=2&itemid=293061377825&targetid=885787207871&device=c&mktype=pla&googleloc=9032435&poi=&campaignid=6469750693&mkgroupid=89345420792&rlsatarget=aud-622524041238:pla-885787207871&abcId=1141176&merchantid=118970114&gclid=CjwKCAjw5vz2BRAtEiwAbcVIL48-IsH3ZwHyurrrT9z29sXnNOSlLvMePR8orYUG0SweenkTU5TdvxoCIn4QAvD_BwE

most pumps are 220volt and will have two hot legs and one neutral, so its unlikely. if you have only a single phase pump, it could work

How do you receive the temperature sensor data to control the heater? ESP8266 or ESP32?

You mention using 1x NodeMCU for the pumps and 1x for lighting, but nothing mentioned regarding temperature sensor and how that is being read and managed.

Thanks! I’m slowly building my controller system based on this thread.

I used a ds18b20 tied to a D1 mini. Cut the pvc and tied in a T pvc part with a screw in. The cap was drilled to the ds18b20 size and epoxied with water epoxy to seal the hole and the end of the ds18b20 just in case it coroded from the chemicals.

If it ever breaks and I unscrew the cap with the ds18b20 and just buy another cap and make the part again. But it’s been flawless since I posted this. Haven’t needed to exchange the part. I found the T-split pvc at Lowe’s and the cap was the right thread for the T split. I have this before it hits the heater and filter so I can get an accurate reading on the return water.

Oh okay, I didn’t see the D1 mini in your picture of the control box internals… That’s the part I was confused about.

I just purchased an ESP32 and plan to read the sensor using that.

Here is a picture of the sensor


I did it this way so it’s serviceable. I think the waterproof epoxy is still important. On the inside it’s all over there but the sensor still works and reads without issue