Skip to content

Hladina: a rain water tank level sensor for Home Assistant

Hladina (Czech for water surface) measures the distance to the water in a tank or well with an ultrasonic sensor and converts it to litres and percent. It reports to Home Assistant and lets you know when the level drops below your threshold.

  • Works with Home Assistant
  • Open source
  • No cloud
1 990 Kč
Pre-order

A pre-order costs nothing. You pay after we e-mail you that your device from the first batch is ready to ship, and you can cancel until then.

Illustration of use. Photos will follow from the first batch. See the enclosure

How it works and how it connects

Diagram: sensor, head cable, enclosure with Jádro, WiFi to Home Assistant and what you get from it
  1. The ultrasonic sensor in the tank lid measures the distance to the water.
  2. The sensor cable runs through a cable gland into the box and ends in a keyed 6-pin JST-PH plug that only fits one way.
  3. Inside the box is the Jádro board with an 18650 cell; it sleeps between readings.
  4. Readings go over WiFi to Home Assistant at home, no cloud.
  5. A low water alert on your phone, a chart of the water level, and the pump switched off when water runs low.

Connect to Home Assistant in three steps

  1. Insert the cell

    Take the lid off (two screws on the underside) and insert an 18650 cell. The status LED is on and the device waits 5 minutes for WiFi setup.

  2. Set up WiFi over Improv

    Over a USB-C cable from Chrome or Edge, or over Bluetooth from Home Assistant. You confirm Bluetooth pairing by pressing the BOOT button on the board.

  3. Adopt it in Home Assistant

    Home Assistant finds the device through the ESPHome integration. Confirm it, pick the tank shape and enter its dimensions. Then close the lid and mount the enclosure and the sensor.

What it measures

A rain water tank is a black box: you only find out it is empty when the hose stops running. Hladina fixes that. An ultrasonic sensor mounted above the water measures the distance to the surface and the firmware works out the level, the volume in litres and how full the tank is in percent. When the volume drops below your threshold, Home Assistant can notify you.

It works just as well in a well. You will see how the level reacts to dry spells, rain and pumping, and the history tells you whether watering from the well in August is a good idea.

Installation

The DYP-A02YYUW sensor is waterproof (IP67) and comes on a fixed cable that is already routed through the PG7 gland and connected inside the enclosure. You do not thread or crimp anything, you just mount the sensor in the lid or ceiling of the tank, pointing straight down with nothing in the way. The electronics box stays outside or in the access shaft. It is printed in white PETG, has no external port or buttons and the lid is sealed with a TPU ring. PETG becomes brittle in direct sun over time and softens around 70 to 80 °C, so keep the box in the shade. The seal has not been tested yet, so we do not state an IP rating.

It runs on a common 18650 Li-ion cell, which is not included. It spends most of its time in deep sleep: it wakes up, takes several readings, reports and is back asleep within seconds. By calculation (not measurement) a 3000 mAh cell lasts about 10 months at a 30 minute interval and room temperature, noticeably less in frost. The calculation is in the manual. Charge it by swapping in a charged cell, or over USB-C under the lid indoors. You change the interval and other settings from Home Assistant in maintenance mode, when the device does not sleep.

Then you choose the tank shape (vertical cylinder, horizontal cylinder, box, or a custom height to volume table), enter the dimensions and the sensor height above the bottom, and the firmware does the maths.

In Home Assistant

The device shows up through the ESPHome integration with entities for level, volume, percent, a low level binary sensor and battery voltage. Build a dashboard card, chart your summer water use, or stop irrigation automatically when the tank runs low. A median filter keeps a single bad reading from spiking your graphs.

Open source and repairable

Schematics, PCB, enclosure models and firmware are all published. Firmware is ESPHome under MIT, hardware under CERN-OHL-P-2.0. No cloud, no app, works without internet. Hladina costs 1 990 CZK, is available for pre-order and ships to Czechia and Slovakia via Packeta once the first batch is made.

What is in the box

  • Jádro in a PETG enclosure with a TPU seal ring and a printed lid
  • Waterproof ultrasonic sensor DYP-A02YYUW on a cable, routed through the PG7 gland and connected inside the enclosure at the factory
  • 18650 cell holder wired inside the enclosure (cell not included)
  • Link to the manual and source files

Specifications

Product codePR-HLADINA
Sensorultrasonic DYP-A02YYUW, UART, IP67
Range3 to 450 cm
Tank shapesvertical cylinder, horizontal cylinder, box, custom table
Outputslevel, volume in litres, percent, low level alarm, battery voltage
Filteringmedian of several readings
Power18650 Li-ion cell in a holder inside the enclosure (cell not included), charged over USB-C under the lid or by swapping the cell
Battery operationdeep sleep, interval set from Home Assistant
Battery lifecalculated estimate about 10 months at a 30 min interval (3000 mAh cell, room temperature)
ChipESP32-C6-WROOM-1 (WiFi 6, BLE, Thread)
FirmwareESPHome, MIT licence
Enclosureprinted PETG, sealed
Warranty24 months
Price1 990 CZK

FAQ

Does it work in a well?

Yes. The sensor reaches 450 cm, which covers most dug wells. It needs a clear path to the water with no ladder, pipe or ledge in the way of the beam.

Do I need Home Assistant?

It is recommended, because that is where you set the tank shape, measurement interval and alerts. Values are also shown in the local web UI and can be sent over MQTT.

How long does the battery last?

By calculation, not measurement, a 3000 mAh 18650 cell lasts about 10 months at a 30 minute interval and room temperature. Noticeably less below freezing, a longer interval gives a proportionally longer life. WiFi signal matters too. The calculation is in the manual.

Is a battery included?

No. The enclosure has a wired holder for a common 18650 Li-ion cell with 2500 to 3500 mAh from a known brand (button top or flat top). Buy from a reputable seller, cells labelled 9900 mAh are fakes. A cell inserted the wrong way round does no harm, the device just does not start.

My tank has an odd shape. Can it handle that?

Yes. Choose the custom table and enter height and volume pairs, either from the tank manufacturer or measured while filling.

Do condensation or foam cause problems?

Drops on the transducer or thick foam can give bad readings. That is why Hladina takes the median of several measurements. Mounting the sensor away from the inlet helps too.

Do you ship to my country?

We ship to Czechia and Slovakia via Packeta, other EU countries on request. Hladina is on pre-order and ships once the first batch is produced.

Docs and source files

Device documentation · Firmware from the browser · How it works

You might also like