How check level in water tank

Hi!
Living in Cyprus we have a water tank on the roof as in many other warm countries. Sometimes we get water cuts för different reasons and I want to find a way to measure the level in the tank and find a way to trigger an alarm in HA if the level go under a set value. I have experienced that we did not notice a cut until the tank was empty and its not fun to not have water.

1 Like

Hi Yuran,

You could use any of the cheap microcontrollers attached to an ultrasonic sensor. I use the pycom adaptation microcontrollers they are based on ESP32 chipset. They are not the cheapest out there but they have wifi lora and Bluetooth on board so I can adapt them for most purposes. I Don’t monitor water tank level but I used it to monitor a garage door using distance. This could easily be adapted to measure water level what is the size of your tank this would depend on the type of ultrasonic sensor required. I will add a github write up on the sensor today for you so you have some guidance of where to start. This integrates easily into HA with mqtt.

Use this project to create a distance sensor

Like minds :slight_smile:

Or get an Oil tank sensor (e.g. Watchman) and put it on the water tank. Measures distance with ultrasound and can pick up with 433Mhz sensor.

Please find details here

or simply a esp8266 with two floats … high level and low level … this is on a pi but same diff https://github.com/Vasiley/Home-Assistant_FishTank/blob/master/packages/water_level.yaml#L21

I personally use a ESP8266 running a firmware called “ESPEasy” and a JSN-SR04T waterproof ultrasonic sensor.

Zero code. You can access it over MQTT or even its own Webserver.

ESPEasy has a “Formula” input, so you can already convert the distance to Liters in the tank and then send a “liters” reading over MQTT.

Own experience. I’m using this exact setup for the exact same purpose. The sensor is at the top of the tank (hole drilled and stuck it there), and since it’s waterproof, condensation doesn’t affect it or the reading.

EDIT: This setup has issues. Read my response below!

1 Like

Hi! Could you share detail your setup. Thanks so much!

Which detail(s) do you need to know? It’s basically described above, there’s not more into it.

But let me warn you: This setup has issues. I tested it over several months and the enclosure of the water tank echoes back and causes misreadings all the time, making it spike to 20cm (Full) and then back to normal. I “solved” the problem by adding a “statistic sensor” in Hassio and picking the “Minimum” of the sensor, because the minimum reading was right. But even then, sometimes it didn’t read right in a long timeframe and suddenly the statistic sensor showed that the MINIMUM was 20cm, which is wrong.

So I wouldn’t recommend it anymore.

Since some months ago I’m now using a pressure sensor on the main water outlet pipe, which ranges from 0 to 1bar. Knowing the water pressure, you can determine the amount in % or liters or gallons in the tank.

I hooked it up to a ESP8266 and read the input with ESPEasy. I then made a template sensor and put some calculations in there that the “tank full” value outputs 100% and that the “tank empty” value outputs 0%.

It reads quite well, but if someone uses water, the pressure drops, so it sometimes goes down 5-7% and then back up when water isn’t used anymore.

A way to “solve” this was adding a filter sensor which averages the readings over 20-30 seconds.

1 Like

please share me config espeasy, home assistant config. Thanks in advance

Can you share the file esp8266?

its not a file i used espeasy and the float is simply a switch …it uses mqtt to broadcast on or off

You better say it. I am a new person with home assistant. Looking forward to your sharing

Hi,

Could you please share your config and the equipment you purchased for the presure sensor. Thanks in advance

I are also interested in this topic. Can you share a guide for reply your project? Thank you