Skip to content
MCU Atlas
ESP32ESP32-C6

ESP32 pool controller: automated filtration and solar heating over MQTT

Turn an ESP32, a relay module and two temperature probes into a set-and-forget pool controller: automated filtration, solar heating and MQTT for Home Assistant.

Difficulty:IntermediateSource available

What it is

Free, MIT-licensed pool-controller firmware by Stephan Strittmatter: an ESP32, a two-channel relay module and two DS18B20 probes run pool filtration on a temperature-aware schedule, control solar heating, and publish over MQTT for Home Assistant.

What you need

How hard

Intermediate overall: the bench build is beginner-level (breadboard, two soldered pull-ups, prebuilt release binaries, web-UI onboarding), but the install switches mains — 8 safety callouts on this page, and the repo's own advice to hire an electrician if you've never wired mains. About half a day end to end.

Key Facts

  • Two pump channels, four modes: Auto (temperature-aware schedule + solar), Manual, Boost, Timer
  • Native Home Assistant MQTT Discovery — 14 sensors, 2 switches (pool-pump, solar-pump), mode selector and ~15 config entities; openHAB, Node-RED and ioBroker over plain MQTT
  • Temperature-aware filtration: runtime extends as the pool warms — repo guidance 8–12 h/day above 26 °C, 4–8 h at 20–26 °C, 1–4 h below 20 °C
  • DIY parts: the repo's own estimate ~€35–60 required, under €100 all-in; commercial controllers $392 (Pentair EasyTouch PL4) to $2,499 (full installed systems), US street prices checked 2026-11-16
  • Telemetry is temperature-only (2× DS18B20) — no pH, chlorine, ORP, flow or water level (those live in the sibling water-quality-monitor repo)
  • MIT-licensed, maintained since 2019; 10 releases June–September 2026; prebuilt firmware binaries for all 3 supported boards on every release
  • Bench build beginner-level, install switches mains — 8 verbatim safety callouts on this page (RCD/GFCI, contactor, IP rating, grounding, fusing, commissioning)

About This Project

Pool ownership is daily math: run the pump enough to keep the water clear, not so long that the bill hurts. This free, MIT-licensed firmware by Stephan Strittmatter (smart-swimmingpool) does that math — and the solar heating too: a plain ESP32, a two-channel relay module and two DS18B20 probes become a set-and-forget pool controller. The circulation pump runs on your schedule and stretches on warm days, the solar pump runs only when the collector can add heat, and everything publishes over MQTT — natively visible in Home Assistant. Maintained since 2019; ten releases June–September 2026. MCU Atlas is not affiliated with smart-swimmingpool.

Why it matters

Commercial pool control costs hundreds to thousands of dollars before installation. But most of a home pool's needs are simple: filter on a schedule, filter longer when it's warm, solar pump only when it pays, water-temperature visibility — a small automation problem an ESP32 eats for breakfast. It's local-first: configuration lives in a web interface the controller serves, state survives reboots, no cloud account.

Honesty note: telemetry here is temperature-only — pool and solar-collector water temperature. No pH, chlorine, ORP, flow or water level; the maintainers keep pH/chlorine work in a sibling repo (water-quality-monitor).

The 10x cost story, scoped like for like

The 10x claim holds against an installed commercial system, not a bare module: 4–8x vs bare commercial hardware, past 10x vs a typical installed system — though those add chemistry dosing, displays and valve control. The repo's own parts estimate and the commercial anchors we checked (Pentair EasyTouch, Hayward OmniPL and full installed systems, US street prices fetched 2026-11-16) are in the key facts and the parts list below, dated and attributed — the numbers live there, not in this prose.

What you get

Two pump channels, four modes. One relay each for the circulation and solar pumps — Auto, Manual, Boost (both pumps continuous) or Timer mode.

Temperature-aware filtration. A daily start/end window; runtime extends as the pool warms past a threshold (24 °C default) — repo guidance: 8–12 h/day above 26 °C, 4–8 h at 20–26 °C, 1–4 h below 20 °C. A failed temperature reading forces the solar pump off.

Native Home Assistant MQTT Discovery, plus openHAB, Node-RED and ioBroker over plain MQTT.

Built-in web interface with REST API, WPS provisioning, reboot-surviving state, a watchdog with boot-loop safe mode, and OTA updates.

Three supported boards — generic ESP32 DevKit V1, Norvi AE01-R (default; relays and OLED built in), Olimex ESP32-C6-EVB with TFT. Prebuilt binaries ship on every release.

Optional local display (Norvi OLED / Olimex TFT + rotary encoder).

The bench build and the install

Full step-by-step is in the repo's build guide (docs/build-from-zero.md). The bench build is beginner-level: breadboard and screw terminals, the only soldering two 4.7 kΩ pull-ups; the repo rates it "beginner — basic soldering and ability to follow instructions". Flash with PlatformIO over serial or a prebuilt release binary; a built-in web UI walks you through Wi-Fi, MQTT and Home Assistant setup with AP-mode onboarding — no coding. Then the install: sensors into the pool lines, relay module switching your pump's mains inside an IP-rated enclosure — electrician territory if you've never wired mains (see below).

Home Assistant and MQTT

Native Home Assistant MQTT Discovery: point it at your broker and the entities create themselves — no YAML. You get 14 sensors (pool, solar and controller temperatures plus diagnostics), two switches (pool-pump, solar-pump), the mode selector, and around 15 config entities — temperatures, hysteresis, circulation parameters and the timer window settable from Home Assistant itself. A shared availability topic marks it offline instantly. Not a Home Assistant user? The same topics work with openHAB, Node-RED or ioBroker.

One caveat: open issues include OTA binary-verification and TLS hardening — updates are trusted-network-only until they land.

Difficulty, time and safety — read before you build

Difficulty: 3/5 — bench 2/5 (beginner); installed 4/5 (mains commissioning). Time: about half a day — 2–4 h bench, 1–2 h installing, 30 min attended first run. Safety callouts below are the project's own, carried verbatim from its electrical-safety documentation.

⚡ This build switches mains voltage (230 V AC EU-standard; same hazard class at 120 V in North America). Risk of shock, fire, equipment damage; the project is not CE/UL certified — personal use only, and local electrical codes may require certified installation (repo README warning block; docs/electrical-safety.md).

🔌 RCD/GFCI protection is mandatory on the pump/controller circuit. The repo requires a residual-current device (RCD/FI) for every install (README; electrical-safety.md rule 2). US/Canada readers: NEC Article 680 requires GFCI protection for pool pump receptacles/circuits — the EU RCD and US GFCI play the same role here.

🧱 Relay isolation, done right: use a relay module with optocoupler isolation (repo BOM spec); the relay switches the Live conductor only — Neutral and Protective Earth run directly to the pump (electrical-safety.md "Relay Output Wiring"). Keep 5 V/3.3 V sensor wiring ≥ 5 cm away from mains inside the enclosure.

⚙ Motor loads weld cheap relay contacts. Pumps are inductive loads; the repo's contactor guide documents contact-welding on its own relays and prescribes a DIN-rail contactor for pumps > 300 W or > 2 A running current, and for ECM pumps (capacitive inrush can micro-weld contacts; an RC snubber does NOT prevent this) — docs/contactor-guide.md. Symptom to warn about: "pump runs despite OFF display" = welded contact (docs/hardware-guide.md line 458).

🌧 IP-rated enclosure per location: IP54 indoor, IP65 outdoor-sheltered, IP66+ direct weather — plus cable glands (PG9/PG11), drip loops, strain relief, and mains/low-voltage cables on opposite sides (electrical-safety.md IP table + best practices). Pool environments are high-humidity/splash by definition.

🌍 Grounding: PE to the pump motor (and to the enclosure if metal), green/yellow ≥ 2.5 mm², star topology (no daisy-chaining), verify continuity with a multimeter before commissioning (electrical-safety.md "Grounding").

🔦 Fuse and wire size to the pump load: e.g. ≤ 500 W → 1.5 mm²/6 A, 500–1000 W → 1.5 mm²/10 A, 1000–2000 W → 2.5 mm²/16 A; fuse on the Live before the controller (electrical-safety.md "Wire Sizing").

🧪 Commissioning discipline: complete the breadboard test first, verify sensors (a −127 °C reading = wiring fault), test relays no-load with a multimeter, and stay with the controller for the first 30 minutes of mains operation listening for buzzing/arcing (build-from-zero.md Steps 7–9; electrical-safety.md "Commissioning"). Always disconnect power before working.

On the mains side, the repo's advice: "if you are not experienced with mains-voltage wiring, hire a qualified electrician"

License and credits

All credit to Stephan Strittmatter and smart-swimmingpool, who have maintained this firmware since 2019 under the MIT license; the safety documentation quoted above is the project's own. MCU Atlas is an independent resource, is not affiliated with smart-swimmingpool, and has not built or installed this controller — every behavioural claim above is the project's own documentation, cited below.

ESP32 pool controller: automated filtration and solar heating over MQTT

Illustration

How to Build It

Breadboard the controller, flash it (PlatformIO or a prebuilt release binary), onboard through its web UI, then install it at the pump — the mains side is electrician territory.

Parts Needed

  • ESP32 DevKit V1 (WROOM-32) — or Norvi AE01-R / Olimex ESP32-C6-EVB
  • 2-channel 5 V relay module, optocoupler-isolated (HL-52S / SRD-05VDC-SL-C class)
  • 2× DS18B20 waterproof probes (pool + solar collector)
  • 2× 4.7 kΩ pull-up resistors
  • Breadboard + jumpers (proto) or perfboard (permanent)
  • 5 V ≥1 A USB PSU + cable
  • IP-rated enclosure with cable glands (install)

Steps

  1. 1

    Bench-build the controller

    Breadboard and screw terminals: relay inputs on GPIO 25/26 (esp32dev), DS18B20 probes on GPIO 33 (pool) and 32 (solar), each bus with its 4.7 kΩ pull-up to 3.3 V — that is the only soldering. The repo's own estimate for the full parts list is €35–60 required, under €100 all-in (docs/build-from-zero.md); commercial controllers start around $392 bare (Pentair EasyTouch PL4, US street 2026-11-16) — the scoped 10x story is on the project page.

  2. 2

    Flash the firmware

    PlatformIO over serial (pio run --target upload at 115200) for the first flash — or skip the toolchain entirely and grab the prebuilt firmware-esp32dev.bin from any GitHub release (firmware-norvi_ae01_r.bin and firmware-olimex_esp32_c6_evb.bin ship on every release too). After first flash, OTA updates work from the firmware's own updater.

  3. 3

    Onboard through the web UI

    The controller serves a built-in web interface: AP-mode onboarding (or WPS) walks you through Wi-Fi, the MQTT broker and Home Assistant settings — no coding. REST API included, state survives reboots, and a watchdog with boot-loop safe mode guards bad config.

  4. 4

    Let Home Assistant discover it

    Point it at your broker and MQTT Discovery creates the entities itself — no YAML: 14 sensors (pool, solar and controller temperatures plus diagnostics), the pool-pump and solar-pump switches, the mode selector, and about 15 config entities (temperatures, hysteresis, circulation parameters, timer window) settable from Home Assistant. openHAB, Node-RED and ioBroker work over the same plain MQTT topics.

  5. 5

    Plan the install — safety first

    This build switches mains. RCD/GFCI protection is mandatory on the pump/controller circuit (US/Canada: NEC Article 680 for pool pumps). Use the opto-isolated relay module on the Live conductor only; keep low-voltage wiring ≥5 cm from mains inside the enclosure; PE to the pump motor, star topology; fuse and wire size to the pump load; IP-rated enclosure with cable glands per location. Pumps over 300 W or ECM pumps need a DIN-rail contactor — cheap relay contacts weld under inductive load. The project's electrical-safety doc is the authority; the repo's own advice: if you are not experienced with mains-voltage wiring, hire a qualified electrician.

  6. 6

    Commission it, attended

    Complete the breadboard test first: verify the sensors (a −127 °C reading means a wiring fault), test the relays no-load with a multimeter, then install and stay with the controller for the first 30 minutes of mains operation, listening for buzzing or arcing. A failed temperature reading forces the solar pump off — that is the firmware's own safety behaviour. Always disconnect power before working on it.

Bill of Materials

Parts list

8 parts · 3 linked

Heads up: some Buy links are affiliate links. If you buy through one, MCU Atlas may earn a small commission at no extra cost to you. It never changes which parts we list. How this works

1× 2-channel 5 V relay module, optocoupler-isolated (HL-52S / SRD-05VDC-SL-C)

No verified link — check the original project
No verified link — check the original project
No verified link — check the original project

2× 4.7 kΩ pull-up resistor

1× Breadboard + jumpers (proto) / perfboard (permanent)

No verified link — check the original project

1× 5 V ≥1 A USB PSU + cable

1× IP65 enclosure

No verified link — check the original project
Download CSV

Related Projects

Motorize dumb roller blinds with an ESP32 and a stepper
Illustration
ESP32
An ESP32 and a cheap 28BYJ-48 stepper motorize ordinary roller blinds from a web UI or MQTT, with Home Assistant cover integration. Low-voltage DC only.
Beginner·Code
5 parts listed
Automatic chicken coop door: open at sunrise, lock at dusk, with an ESP32
Illustration
ESP32ESP32-C3
An XIAO ESP32-C3 running ESPHome computes sunrise and sunset on-device, winches the coop door open each morning and lets it gravity-latch at dusk — predator-safe without the twice-daily trudge.
Intermediate·Code
8 parts listed
aquacontrol32: dimmable aquarium LED controller on a plain ESP32
Illustration
ESP32
Turn a plain ESP32 into an aquarium light controller: five dimmable LED channels, sunrise and sunset ramps, a web schedule, temperature probes and a display.
Intermediate·Code
9 parts listed