Impact-Site-Verification: 33531259-4261-44da-bd01-8f3462366472

ESPool: a reliable low-cost ESP32 pool temperature sensor for Home Assistant

Home Assistant history graph for ESPool pool temperature displayed in Fahrenheit, showing 78.6 °F.

Written by

in

This is a practical DIY pool project: an ESP32, one or more 10k NTC pool probes, ESPHome, and Home Assistant. The goal is not a fancy display. The goal is a stable water temperature sensor that is accurate enough to trust, visible in HA, and cheap enough to install without buying a full pool automation system.

Home Assistant history from the ESPool pool temperature sensor displayed in Fahrenheit. In this example, the pool is reported at 78.6 °F with tenth-of-a-degree precision.
Home Assistant history from the ESPool pool temperature sensor, displayed in Fahrenheit. In this example, the pool is reported at 78.6 °F with tenth-of-a-degree precision.
The same ESPool project in ESPHome Device Builder, with one resistance sensor, one NTC sensor and one ADC input per temperature probe.
The same ESPool project in ESPHome Device Builder, with one resistance sensor, one NTC sensor and one ADC input per temperature probe.

Example Home Assistant dashboard

Once the ESP32 values are in Home Assistant, the dashboard is completely up to you. My pool view mixes quick status cards, Celsius and Fahrenheit temperature tiles, pump and heating diagnostics, treatment information, camera context, and history graphs. You can keep it much simpler with only one pool temperature card, or go much deeper if you also monitor solar panels, a heat pump, pump RPM, salt system output, weather, and outside temperature.

Example Home Assistant pool dashboard with ESPool temperature cards, pump status, solar mode, treatment and equipment health
An example Home Assistant pool dashboard using ESPool temperature data. The layout is personal: users can customize cards, gauges, entities and sections to match their own pool.
Home Assistant history graph comparing ESPool pool solar heat pump and weather temperatures
A history view can compare the pool, solar outlet, heat pump outlet, outdoor temperature and weather reference. This is useful for understanding what your heating system actually does over several days.

Why I built ESPool

Floating pool thermometers are convenient, but they are not always where the water flow is representative. App-based pool gadgets can also disappear, drift, need batteries, or report values that are good enough for a quick look but not good enough for automations.

ESPool uses a wired AR-PRO 520272-style 10k thermistor probe connected to an ESP32. The ESP32 runs ESPHome, publishes the value to Home Assistant, and lets HA keep the history. In my case, the reading is displayed to one decimal place in Celsius, which is exactly what I want for pool monitoring: a clean 28.1 °C instead of a vague “warm enough”.

One, two or three temperature probes?

My installation has three temperature probes, but most pools do not need that many.

Pool setupRecommended probesWhy
No heater1 probeMeasure the real pool water temperature and publish it to Home Assistant.
One heater, solar loop, or heat pump2 probesOne reference temperature plus one outlet temperature to see what the heater adds.
Solar panels + heat pump3 probesThis is my setup: pool reference, solar outlet, then heat pump outlet.

In my plumbing, the three Home Assistant sensors are Temperature Piscine, Temperature Solaire, and Temperature Thermopompe. That lets me compare the raw pool water, the water after the solar panels, and the water after the heat pump. If your pool has no heater, delete the second and third probe blocks from the configuration and keep only the first one.

Estimated cost and build time

Prices move, especially on Amazon and electronics shops, so treat this as a realistic ballpark in CAD, not a fixed bill of materials. A basic ESP32 dev board is often in the low double digits in Canada, and an AR-PRO 520272 replacement probe is much cheaper than many OEM pool automation temperature sensors. For context, the AR-PRO listing describes it as a 10k-ohm 520272 replacement probe with a 20-foot cable, while OEM-style Pentair sensors can cost much more from pool parts suppliers.

BuildApprox. parts costTypical time
1-probe pool temperature sensorAbout $30-$55 CAD2-4 hours
2-probe heater/solar monitoringAbout $45-$80 CAD3-5 hours
3-probe solar + heat pump monitoringAbout $60-$110 CAD4-6 hours

The extra cost is mostly the extra probes and a few resistors. The ESP32, USB cable, small wires, heat-shrink, and enclosure are shared. If you already have electronics parts around, the real cost can be lower. If you buy a weatherproof box and proper cable glands, it can be higher, but that is worth doing for a pool equipment area.

Parts used

  • ESP32 development board, for example an ESP32 DevKit / esp32dev board.
  • AR-PRO 520272 air/water/solar temperature sensor, 10k NTC, 20-foot cable.
  • One 10k ohm resistor per temperature probe.
  • Dupont wires, terminal blocks or soldered joints, depending on how permanent you want the build to be.
  • A weather-resistant project box, or a small 3D-printed ESP32 case installed inside a larger protected enclosure.
  • ESPHome and Home Assistant.

A 3D printer is useful here. You can print a small holder or case for the ESP32 so the board is not loose in the pool shed. I would still keep the electronics away from splashes and condensation, and use a real weather-resistant outer box if the installation is exposed.

Wiring principle

Each probe is wired as a simple voltage divider. The probe goes to 3.3V, the signal goes to an ADC-capable GPIO, and a 10k resistor pulls the signal down to GND.

3.3V ESP32 -> AR-PRO probe -> GPIO ADC signal -> 10k resistor -> GND ESP32

On my ESP32, the pool reference probe is on GPIO34, the solar probe is on GPIO35, and the heat pump probe is on GPIO32. These are ADC input pins, which is what we need for analog thermistor readings.

Complete ESPHome configuration

This is the complete ESPHome configuration pattern for the three-probe version. The comments show what to keep or remove. For a simple pool-only build, keep Sensor 1 and delete Sensor 2 and Sensor 3. Do not paste Wi-Fi, API or OTA passwords into public articles or Git; use ESPHome secrets.

esphome:
  name: espool
  friendly_name: EsPool

esp32:
  board: esp32dev
  framework:
    type: esp-idf

logger:

api:
  encryption:
    key: !secret espool_api_encryption_key

ota:
  - platform: esphome
    password: !secret espool_ota_password

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  power_save_mode: none

  ap:
    ssid: "EsPool Fallback Hotspot"
    password: !secret espool_ap_password

  # Optional but useful if you want a stable Home Assistant device.
  manual_ip:
    static_ip: 192.168.1.111
    gateway: 192.168.1.1
    subnet: 255.255.255.0

captive_portal:

sensor:
  # SENSOR 1 - Pool water reference temperature.
  # Keep this one even for the simplest build.
  # Wiring: 3.3V -> AR-PRO 520272 probe -> GPIO34 signal -> 10k resistor -> GND.
  - platform: resistance
    id: resistance_pool_1
    sensor: adc_pool_1
    configuration: UPSTREAM
    resistor: 10kOhm

  - platform: ntc
    id: ntc_pool_1
    sensor: resistance_pool_1
    calibration:
      b_constant: 3950
      reference_temperature: 25°C
      reference_resistance: 10kOhm
    name: "Temperature Piscine"

  - platform: adc
    pin: 34
    id: adc_pool_1
    attenuation: 12db
    update_interval: 10s
    filters:
      - median:
          window_size: 15
          send_every: 5
          send_first_at: 1
      - exponential_moving_average:
          alpha: 0.2
          send_every: 1

  # SENSOR 2 - Solar loop temperature.
  # Keep this block only if your pool has solar panels or another first heating stage.
  # If not needed, delete this resistance + ntc + adc trio.
  - platform: resistance
    id: resistance_pool_2
    sensor: adc_pool_2
    configuration: UPSTREAM
    resistor: 10kOhm

  - platform: ntc
    id: ntc_pool_2
    sensor: resistance_pool_2
    calibration:
      b_constant: 3950
      reference_temperature: 25°C
      reference_resistance: 10kOhm
    name: "Temperature Solaire"

  - platform: adc
    pin: 35
    id: adc_pool_2
    attenuation: 12db
    update_interval: 10s
    filters:
      - median:
          window_size: 15
          send_every: 5
          send_first_at: 1
      - exponential_moving_average:
          alpha: 0.2
          send_every: 1

  # SENSOR 3 - Heat pump outlet temperature.
  # Keep this block only if you want to measure a second heating stage.
  # In my pool, this confirms what the heat pump adds after the solar panels.
  - platform: resistance
    id: resistance_pool_3
    sensor: adc_pool_3
    configuration: UPSTREAM
    resistor: 10kOhm

  - platform: ntc
    id: ntc_pool_3
    sensor: resistance_pool_3
    calibration:
      b_constant: 3950
      reference_temperature: 25°C
      reference_resistance: 10kOhm
    name: "Temperature Thermopompe"

  - platform: adc
    pin: 32
    id: adc_pool_3
    attenuation: 12db
    update_interval: 10s
    filters:
      - median:
          window_size: 15
          send_every: 5
          send_first_at: 1
      - exponential_moving_average:
          alpha: 0.2
          send_every: 1

  # ESP32 diagnostics. Optional, but helpful when the box lives in a pool shed.
  - platform: internal_temperature
    name: "ESP32 Temp"

  - platform: wifi_signal
    name: "ESP32 WiFi RSSI"
    update_interval: 30s

  - platform: uptime
    name: "ESP32 Uptime"

  - platform: template
    name: "ESP32 Free Heap"
    unit_of_measurement: "kB"
    lambda: |-
      return esp_get_free_heap_size() / 1024.0;
    update_interval: 30s

  - platform: template
    name: "ESP32 CPU Frequency"
    unit_of_measurement: "MHz"
    accuracy_decimals: 0
    lambda: |-
      return (float) CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ;
    update_interval: 60s

text_sensor:
  - platform: template
    name: "ESP32 Last Reset Reason"
    lambda: |-
      esp_reset_reason_t r = esp_reset_reason();
      switch (r) {
        case ESP_RST_POWERON:   return std::string("POWERON");
        case ESP_RST_EXT:       return std::string("EXT");
        case ESP_RST_SW:        return std::string("SW");
        case ESP_RST_PANIC:     return std::string("PANIC");
        case ESP_RST_INT_WDT:   return std::string("INT_WDT");
        case ESP_RST_TASK_WDT:  return std::string("TASK_WDT");
        case ESP_RST_WDT:       return std::string("WDT");
        case ESP_RST_DEEPSLEEP: return std::string("DEEPSLEEP");
        case ESP_RST_BROWNOUT:  return std::string("BROWNOUT");
        case ESP_RST_SDIO:      return std::string("SDIO");
        default:                return std::string("UNKNOWN");
      }
    update_interval: 300s

  - platform: version
    name: "ESPHome Version"

# Bluetooth is disabled here because this project only needs Wi-Fi + ADC readings.
# Enable it only if you also want this ESP32 to act as a Bluetooth proxy.
# esp32_ble_tracker:
#   scan_parameters:
#     active: false
#
# bluetooth_proxy:
#   active: false

Using Fahrenheit instead of Celsius

ESPHome NTC temperature sensors normally report Celsius internally, and Home Assistant can display temperatures in Fahrenheit if your HA unit system is set that way. For many users, that is the cleanest option: keep the ESPHome YAML in Celsius and let Home Assistant handle display units.

If you want an explicit Fahrenheit entity, add a template sensor under the same sensor: section. For the pool probe, the formula is °F = °C × 9 / 5 + 32.

# Optional Fahrenheit entity for Home Assistant.
# ESPHome NTC sensors are normally reported in Celsius.
# Home Assistant can display them in °F from your HA unit settings, or you can add this template.

- platform: template
  name: "Pool Temperature Fahrenheit"
  unit_of_measurement: "°F"
  accuracy_decimals: 1
  lambda: |-
    return id(ntc_pool_1).state * 9.0 / 5.0 + 32.0;
  update_interval: 10s

Why this should last

The durable part of this project is that the sensing element is not a floating gadget and not a random battery device. It is a wired 10k thermistor probe mounted in the plumbing, read by an ESP32 that can be updated over Wi-Fi. There are no cloud subscriptions and no app vendor dependency for the temperature history once Home Assistant receives the values.

The important installation details are mechanical: protect the ESP32 from water, use solid connections, add strain relief, and avoid leaving loose jumper wires in a damp pool equipment area. A printed ESP32 holder inside a sealed or protected box is a good upgrade for long-term use.

Bonus: magnetic sensor on the solar valve

This part is optional and is outside the basic temperature configuration. I added a small Gebildet-style NO/NC magnetic reed switch on GPIO25 to know whether the valve is sending water through the solar panels or through the bypass. Home Assistant then shows a friendly text value: Panneaux solaires or Bypass.

That bonus is useful for dashboards and troubleshooting, especially when solar heating is automated. It is not required if all you want is a reliable pool temperature sensor.

# BONUS ONLY - Magnetic contact on the solar valve.
# This is not required to read pool temperature.
# It only publishes whether the valve is sending water to the solar panels or bypassing them.

esphome:
  name: espool
  friendly_name: EsPool
  on_boot:
    priority: -100
    then:
      - text_sensor.template.publish:
          id: mode_solaire
          state: !lambda |-
            return id(valve_solaire_contact).state ? "Panneaux solaires" : "Bypass";

binary_sensor:
  - platform: gpio
    id: valve_solaire_contact
    pin:
      number: GPIO25
      mode:
        input: true
        pullup: true
    filters:
      - invert:
      - delayed_on: 50ms
      - delayed_off: 50ms
    internal: true
    on_state:
      then:
        - text_sensor.template.publish:
            id: mode_solaire
            state: !lambda |-
              return id(valve_solaire_contact).state ? "Panneaux solaires" : "Bypass";

text_sensor:
  - platform: template
    id: mode_solaire
    name: "Mode Solaire"

For a low-cost Home Assistant pool setup, I would start with one probe and make it reliable. Add the second and third probes only when you actually need to understand what your heater, solar panels or heat pump are doing.

Next ESPool project: I am also documenting a pressure-monitoring version with a 4-20 mA filter pressure transducer, ADS1115 and Home Assistant alerts: ESPool V2 pool filter pressure monitoring.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *