Home Assistant and ESPhome base pool controller

I currently have a pool controller which is completely disconnected, and with meanwhile heavy usage of HomeAssistant in our house and some ESPhome devices I wan’t to implement the pool also.

Features wanted

  • Relay driver outputs:
    • Pump
    • Heating
    • 3-Way solar valve
    • Dosing system
  • 1-Wire inputs for temperature probes (ds18b20)
  • I2C available for
    • Ph / Rx probes (Atlas-Scientific)
    • Display

Hardware
The first idea was to create the complete hardware myself:

But I immediately realised this would take a lot of time… And swimming season is coming.
As such, this hardward project is currently on-hold.

Now, as there is a lot of common of the shelf hardware which can be flashed with ESPhome, I started with a Sonoff 4CH, which appears to be R3. When I opened the device, there is place to put some header ping, these can firstly be used to flash the device, but mor important they give me I/O.
So, next step was to develop a small daugtherboard which offers me 1-wire for some temperature sensors and I2C for extensions.

I’ve sent the board to production on 19/05, hopefully it will be fully functional.

Software
This is the most complex piece I think and I just started development.

The idea is that I can work with profiles:

  • Filtering / pumping
    • Off (Winter)
    • Minimal
    • Maximal
    • Auto (based on temperature / sun)
  • Heating (Heatpump)
    • Off
    • Maximal (when pump runs)
    • Auto (based on excessive power from solar-panels)
  • Solar absorbers (3-way valve)
    • Off
    • Auto (based on delta temperature water <-> sensor)

I could delevlop this completely in Homeassistant, or completely in ESPhome or a mix of both.
My idea was to do most in ESPhome, as such the controller could run if there is an issue with HomeAssistant.
But my first test allready identified an issue, if connection with HomeAssistanbt is lost for a couple of minutes, the clock on the ESP resets. As I will be doing a lot time-based, it means all automation would break.
So here, I might use some inspiration…

Look for raspipool, there is a lot of functionality there.

Atlas-scientific make a pool measurement kit which works out of the box with esphome.

1 Like

Hi Nick, I know raspipool, but I don’t wan’t to use a raspberry.
The Atlas-scientific kit is only for water quality measuring, not for steering of pumps,…

They do have dosing pumps.

I was referring to raspipool more for inspiration really.

I’ve developed several things myself over time including pool pump control with a smart switch, water temperature, water level and liquid chloring level (in a drum) using ESPHome and documented here:

If anyone is interested in a non-DIY solution, I’ve created an integration for the Poolstation platform used by a few manufacturers (at least Idegis and Astralpool) for their smart chlorinators.

Since their chlorinators have Temperature, PH, ORP and Chlorine sensors as long as several dry contact relays for connecting other equipment, I can now see and manage the pump and lights from home assistant.

In case you want to take a look: GitHub - cibernox/homeassistant-poolstation: HomeAssistant custom component for integrating the Poolstation platform.

Hey! Did you end up with a solution?
I’ll be moving to a house with a pool and was wondering how to do the best implementation for a controller. Had the exact same thoughts you had about doing most with ESPHome so it could keep working during some HA or network failure.
I saw your repo didn’t have any updates since May 2021 so I was wondering if you tried something else that worked better.
Thanks :slight_smile: