Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
BETTESWORTHConstruction
ESP32

Home Assistant ESP32 Water-Softener Salt Tank Monitor

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

The most practical DIY design is an ESP32 running ESPHome with an ultrasonic distance sensor mounted above the brine tank, publishing an estimated salt percentage to Home Assistant. Add filtering, a delayed low-salt automation, and a separate offline alert. For more meaningful weight-based inventory tracking, use an HX711 and load cells—but expect substantially more mechanical work.

This is an inventory estimate, not a guarantee that the softener will regenerate correctly. Salt bridges, cavities, uneven surfaces, sensor obstructions, and plumbing forces can all produce misleading readings.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What the monitor can—and cannot—measure

An ultrasonic sensor measures the distance between the sensor and the nearest reflecting surface. The shorter that distance, the higher the estimated salt surface. It does not directly measure salt mass, water hardness, regeneration status, gallons remaining, or whether salt beneath a crust is available to the softener.

A load-cell system measures the total force supported by the tank. After calibration, that can provide a useful mass estimate, but it still cannot prove that the salt is feeding correctly. A salt bridge can leave considerable weight in the tank while preventing brine formation.

#1 Best Overall
ESP-WROOM-32 ESP32 ESP-32S Development Board 2.4GHz Dual-Mode WiFi + Bluetooth Dual Cores Microcontroller Processor Integrated with Antenna RF AMP Filter AP STA Compatible with Arduino IDE (3PCS)
  • 2.4GHz Dual Mode WiFi + Bluetooth Development Board
  • Support LWIP protocol, Freertos
  • SupportThree Modes: AP, STA, and AP+STA
  • Ultra-Low power consumption, Compatible with Arduino IDE
  • ESP32 is a safe, reliable, and scalable to a variety of applications

Use the dashboard label Estimated salt level, rather than implying certified accuracy. The monitor reduces the likelihood of an empty tank; it cannot detect every failure mode.

Choose the sensing method

Criterion Ultrasonic Load cell
Installation Low to medium difficulty Medium to high difficulty
Measures Surface distance Total supported weight
Tank relocation Not normally required Often required
Main sensitivity Echoes, obstructions, condensation Pipe forces, walls, platform alignment
Best use Simple refill warning Consumption and mass tracking

Ultrasonic: the best first project

Choose ultrasonic sensing when the tank has a usable lid or opening and an approximate percentage is sufficient. ESPHome’s ultrasonic platform uses separate trigger and echo pins. Its documented default update interval is 60 seconds, with a default two-metre timeout; configure a shorter, realistic timeout for the actual tank distance. See the ESPHome ultrasonic documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Load cells: better data, harder installation

Choose load cells when tracking approximate salt consumption matters more than installation simplicity. The entire tank must sit on a rigid weighing platform, isolated from walls, cabinets, connected pipes, and uneven flooring. ESPHome’s HX711 component supports gains of 32, 64, or 128 and requires calibration with known loads.

Other options

Capacitive or radar-style point sensors can provide a simple “below this height” alarm, but usually do not provide a continuous percentage. Commercial sensors may be preferable when support and minimal wiring matter more than local control.

Parts and safety

  • ESP32 development board
  • Ultrasonic sensor, or an HX711 module and suitable load cells
  • Appropriate low-voltage power supply
  • Mounting bracket, enclosure, cable gland, and strain relief
  • Optional voltage divider or level shifter for an ultrasonic echo line
  • Optional temperature and humidity sensor for diagnosing condensation

Do not assume every HC-SR04-style module is electrically identical. Some modules operate at 5 V and may return an echo voltage unsuitable for a 3.3 V ESP32 GPIO. Check the exact module’s datasheet and use a divider or level shifter where required. Keep the ESP32 and other electronics outside the brine tank, in a protected enclosure with a drip loop and corrosion-resistant hardware.

Install ESPHome and connect Home Assistant

  1. Install ESPHome through Home Assistant or use the ESPHome command line.
  2. Create a node and flash the first firmware over USB.
  3. Add the ESPHome native API and encryption.
  4. Adopt the node in Home Assistant when it is discovered.
  5. Confirm that the raw sensor entity updates before installing the sensor permanently.
  6. Enable OTA updates only after the wired flash succeeds.

ESPHome devices normally integrate through the local native API, rather than MQTT. Home Assistant documents automatic discovery and manual setup at its ESPHome integration page. The API uses port 6053 by default and supports encryption with a 32-byte Base64-encoded key; details are in the ESPHome API documentation.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
ELEGOO 3PCS ESP-32 Dev Boards, ESP-WROOM-32, USB-C, WiFi Bluetooth 4.2 | Low-power IoT Applications, Smart Devices, Automation, Wireless Communication, GPIO Headers, Simplifying Development
  • Dual-Core Performance Up to 240 MHz: Run sensor processing, wireless communication, automation logic and connected-device tasks on a 32-bit dual-core ESP32 platform designed for responsive embedded and IoT projects
  • Built-in Wi-Fi and Bluetooth 4.2: Connect to 2.4 GHz Wi-Fi networks or use Bluetooth Classic and BLE for wireless sensors, smart devices, remote controls, home automation and other connected projects
  • Flexible Power-Saving Modes: ESP32 power-management features support dynamic clock scaling and low-power operating modes, helping developers reduce energy use in compatible sensing, monitoring and connected-device applications, suitable for battery-powered Internet of Things (IoT) devices.
  • USB-C Programming with CP2102: Connect through USB-C for power, sketch uploads and serial monitoring, while GPIO, UART, SPI and I2C interfaces support sensors, displays, motor drivers and other modules (USB-C cable not included)
  • Over-the-Air Update Support: Configure OTA functionality through a compatible ESP-32 software framework to update deployed firmware over Wi-Fi without reconnecting the board by USB for every revision

Build the ultrasonic monitor

Mounting position

Mount the transducer vertically above the expected salt surface, as close to the tank centre as practical. Avoid the brine well, float assembly, salt chute, lid ribs, tank walls, and wiring. The acoustic path must be clear, and the mount must not vibrate when the lid is moved.

Use a removable bracket or compression fitting so the sensor can be cleaned and repositioned. Test several positions with the lid open and closed. A shorter false echo from a lid obstruction can look like a sudden refill.

Base ESPHome configuration

esphome:
  name: water-softener-salt-monitor
  friendly_name: Water Softener Salt Monitor

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

logger:

api:
  encryption:
    key: "REPLACE_WITH_A_32_BYTE_BASE64_KEY"

ota:
  - platform: esphome
    password: "REPLACE_WITH_A_STRONG_OTA_PASSWORD"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  ap:
    ssid: "Water Softener Fallback"
    password: !secret fallback_ap_password

captive_portal:

sensor:
  - platform: ultrasonic
    trigger_pin: GPIO17
    echo_pin: GPIO16
    name: "Salt Surface Distance"
    id: salt_surface_distance
    unit_of_measurement: "m"
    device_class: distance
    state_class: measurement
    update_interval: 60s
    timeout: 1.5m
    filters:
      - median:
          window_size: 5
          send_every: 1
          send_first_at: 1

Replace the GPIO assignments after checking your board and wiring. Keep the timeout realistic: an excessively long wait can make missing echoes harder to diagnose.

Convert distance into an estimated percentage

Measure two reference distances:

  • Empty distance: sensor to the lowest meaningful salt level.
  • Full distance: sensor to a normally full salt surface.

Because the distance decreases as the tank fills, the conversion is inverted:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  - platform: template
    name: "Salt Level"
    id: salt_level
    unit_of_measurement: "%"
    device_class: battery
    state_class: measurement
    accuracy_decimals: 0
    update_interval: 60s
    lambda: |-
      const float empty_distance = 1.05;  // replace after measuring
      const float full_distance  = 0.20;  // replace after measuring
      float d = id(salt_surface_distance).state;

      if (isnan(d) || d < 0.05 || d > empty_distance + 0.10) {
        return NAN;
      }

      float percent =
        (empty_distance - d) /
        (empty_distance - full_distance) * 100.0;

      return clamp(percent, 0.0f, 100.0f);
    filters:
      - median:
          window_size: 5
          send_every: 1
          send_first_at: 1

The reference values above are placeholders. A geometric percentage is not automatically a mass percentage. Narrow, tapered, or cabinet-shaped tanks may need a lookup table or conservative threshold rather than a linear conversion.

Calibrate it in practice

  1. Record the distance at the lowest usable reference.
  2. Fill the tank to its normal maximum and record the full distance.
  3. Add salt in known increments, allowing the surface to settle.
  4. Compare the displayed estimate with the amount added.
  5. Choose a low threshold that leaves useful refill time.

Display a rounded value or broad status bands instead of false precision: for example, Full (70–100%), Normal (35–69%), Low (15–34%), and Refill soon (below 15%). These are starting points, not universal thresholds.

Rank #3
Sale
ELEGOO ESP-32 Super Starter Kit with Tutorial Compatible with Arduino IDE | Development Board, USB-C Dual Core Microcontroller Support AP/STA/AP+STA, CP2102 Chip, WiFi, Bluetooth, 200+ parts for IoT
  • Powerful ESP-32 Board: Unlock the world of Internet of Things (IoT) and advanced electronics with the heart of this kit: the ESP-32 board. It features a powerful dual-core processor, integrated Wi-Fi and Bluetooth 4.2, making it perfect for building connected, smart devices that communicate with your phone or the cloud. It's fully compatible with the Arduino IDE for easy programming.
  • Super Starter Kit: This kit contains over 35 different modules and electronic components, including sensors, displays, motors, and input devices. From LEDs and buttons to an OLED screen, servo motor, and keypad, you have everything needed to explore a vast range of projects in one box.
  • Step by Step Online Tutorial: Jump right in with our detailed, beginner-friendly tutorial. Access 30+ projects with complete code, clear circuit diagrams, and step-by-step instructions. Learn the fundamentals of electronics, coding, and how to utilize the ESP-32's unique capabilities without any prior experience.
  • Hands-on Learning for All Skill Levels: Perfect for students, makers, engineers, and hobbyists. Start with basic circuits and coding, then progress to intermediate and advanced IoT applications. Build practical projects like weather stations, smart home controllers, remote-controlled devices, and interactive gadgets. The skills you learn are the foundation for real-world innovation.
  • Quality & Great Support: Elegoo is committed to quality. We provide a clear, detailed tutorial guide, refined code, and a well-organized component kit. All modules are carefully selected for reliability and ease of use. Our dedicated technical support team and active online community are ready to help you succeed in your learning journey.

Add the Home Assistant entities and alert

Expose the percentage, raw distance, device availability, and an invalid-reading state. A template binary sensor can represent a valid low reading:

binary_sensor:
  - platform: template
    name: "Water Softener Salt Low"
    id: salt_low
    device_class: problem
    lambda: |-
      return !isnan(id(salt_level).state) &&
             id(salt_level).state < 20.0;

Add a Home Assistant dashboard tile or gauge, but keep the raw distance visible for troubleshooting. The automation documentation supports numeric-state triggers with a duration condition:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
automation:
  - alias: Water softener salt low
    triggers:
      - trigger: numeric_state
        entity_id: sensor.salt_level
        below: 20
        for: "01:00:00"

    conditions:
      - condition: state
        entity_id: sensor.salt_level
        state_not: "unavailable"

    actions:
      - action: notify.mobile_app_your_phone
        data:
          title: "Water softener salt is low"
          message: >
            Estimated salt level is {{ states('sensor.salt_level') }}%.
            Check the brine tank and refill if necessary.

    mode: single

The mobile notification service name depends on the device registered by the Home Assistant Companion app. Home Assistant’s Notify documentation explains notification targets.

Use a one-hour duration, a cooldown, and a recovery notification after refilling. Do not convert an invalid reading or NaN into 0%; that creates a false emergency alert. Alert separately when the ESP32 has been unavailable for a chosen period.

Optional: weigh the tank with an HX711

A typical arrangement uses four load cells beneath a rigid platform and an HX711 amplifier connected to the ESP32. ESPHome documents the basic wiring as VCC to 3.3 V, GND to GND, and the module’s DOUT/DT and CLK/SCK pins to free GPIOs.

sensor:
  - platform: hx711
    name: "Salt Tank Raw Weight"
    id: salt_tank_raw_weight
    dout_pin: GPIO21
    clk_pin: GPIO22
    gain: 128
    update_interval: 60s
    filters:
      - median:
          window_size: 7
          send_every: 1
          send_first_at: 1
      - calibrate_linear:
          - 120000 -> 0
          - 810000 -> 100
    unit_of_measurement: "%"
    accuracy_decimals: 0

The calibration values are placeholders. To calibrate, record the raw reading with no added load, add a known mass, record it again, and map the raw values using calibrate_linear. Recheck calibration after moving the tank.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
ESP-WROOM-32 ESP32 ESP-32S Development Board 2.4GHz Dual-Mode WiFi + Bluetooth Dual Cores Microcontroller Processor Integrated with Antenna RF AMP Filter AP STA Compatible with Arduino IDE (1 PCS)
  • 2.4GHz Dual Mode WiFi + Bluetooth Development Board
  • Support LWIP protocol, Freertos;ESP32 is a safe, reliable, and scalable to a variety of applications
  • SupportThree Modes: AP, STA, and AP+STA
  • Ultra-Low power consumption, Compatible with Arduino IDE
  • 1PCS 30Pin ESP32 Development Board 2.4GHz WiFi Dual Cores Microcontroller Integrated with Antenna RF Low Noise Amplifiers Filters

Keep the tank centred, prevent tipping, and ensure no wall, cabinet, floor irregularity, or connected pipe supports part of the weight. If the platform flexes unevenly or the tank shifts, the reading can drift. Load cells measure total supported mass—not available, bridge-free salt.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Condensation, salt dust, and failure modes

Salt bridges and uneven surfaces

A crust can span an empty cavity. Ultrasonic sensing may report a healthy surface, while the softener cannot draw enough salt. Weighing may report substantial mass for the same reason. Visually inspect the tank when an estimate conflicts with the softener’s behaviour.

Timeouts and NaN

Missing echoes can result from incorrect pins, power problems, excessive distance, condensation on the transducer, or reflections from the brine well and lid. Check ESPHome logs, verify wiring, test with the lid open, use a realistic timeout, and reposition the sensor. Preserve unknown values instead of mapping them to zero.

Condensation and water intrusion

Use a sealed or splash-resistant enclosure, cable gland, drip loop, corrosion-resistant fasteners, and a cleanable sensor face. Keep all electronics out of the tank. Pentair’s commercial documentation likewise warns that its salt sensor is not intended to be submerged; treat that as a general design principle for DIY hardware.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Wi-Fi outages

The ESP32 can continue taking local measurements, but Home Assistant cannot receive them while the network is down. Use the ESPHome fallback access point, encrypted API communication, and an availability alert. This monitor should remain read-only and must not be connected casually to the softener’s control board.

Unstable or delayed readings

Median filtering suppresses isolated false echoes, but excessive filtering can delay a genuine refill. Compare the raw and filtered values, clean the sensor face, and inspect the mount. During the first several weeks, compare the estimate with visual checks and recalibrate if the error is consistent.

Best Value
HiLetgo ESP-WROOM-32 ESP32 ESP-32S Development Board 2.4GHz Dual-Mode WiFi + Bluetooth Dual Cores Microcontroller Processor Integrated with Antenna RF AMP Filter AP STA for Arduino IDE
  • 2.4GHz Dual Mode WiFi + Bluetooth Development Board
  • Ultra-Low power consumption, works perfectly with the Arduino IDE
  • Support LWIP protocol, Freertos
  • SupportThree Modes: AP, STA, and AP+STA
  • ESP32 is a safe, reliable, and scalable to a variety of applications

Keep the monitor independent from softener controls

For most installations, the safe architecture is simple: the ESP32 reads the sensor, ESPHome publishes the result, and Home Assistant provides the dashboard and notifications. Leave regeneration controls untouched. A salt monitor does not automatically know when regeneration occurs or whether the softener is delivering properly softened water.

Some commercial products use controller interfaces. For example, the Watts IS-WQ documentation describes relay-terminal wiring, a 12 VDC/100 mA relay interface, and Nexa, BMS, or stand-alone modes. That is a different architecture and should not be copied onto an unrelated softener.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Commercial alternatives

The Watts IS-WQ Salt Level Sensor is aimed at compatible water-softening installations and offers manufacturer-oriented monitoring. Confirm controller compatibility, operating conditions, and current availability before purchase.

The Pentair Connected Salt Level Sensor is a battery-powered Wi-Fi product using a universal tank clip, the Pentair Home app, and email or push alerts. Its specification sheet lists three AA alkaline batteries and claimed one-year battery life, but it does not establish native Home Assistant integration. Choose it for simpler installation and vendor support, not for guaranteed local ESPHome control.

Neither the reviewed official documentation nor the DIY design establishes universal retail pricing or universal Home Assistant compatibility. Verify those details for the exact model and current software before buying.

Final recommendation

For most Home Assistant users, start with an independent ESP32, ESPHome, and ultrasonic sensor. Mount it carefully, calibrate it against the actual tank, show an estimated rounded percentage, and delay low-salt alerts until the reading remains valid and low. Choose load cells only when mass and consumption tracking justify the platform fabrication. Choose a commercial sensor when supported installation matters more than open calibration and local control.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

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

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.