Tank level measurement solution for Home Assistant
We use an ESP-32 and a JSN-SR04T module to measure the height of water in a rainwater tank. Depending on the distance and the geometry of the tank we deduce the volume contained in the tank
ESPHome is very useful to control the ESP32 and expose the information it offers in Home Assistant
We use node-red to filter extreme data and convert it into useful data
Outlier Node allows you to exclude extreme data and gives the median value of the measurements. This makes it possible to smooth out variations and eliminate measurement errors.
Tank Volume Node allows you to know how much liquid is present in the tank depending on its shape, its dimensions and the height of the water. You have to download it here https://flows.nodered.org/node/node-red-contrib-tank-volume
Another interesting piece of information to have when you have a rainwater tank and a pump is the temperature near the pump because in the event of frost, it can be damaged.
Once you have an ESP32 for the level in the tank, it is very simple to add a DS18B20 temperature probe.
Here is the shopping list:
- ESP32 https://www.amazon.fr/dp/B071P98VTG
- JSN-SR04T Waterproof Ultrasonic Sensor Distance Detection https://www.amazon.fr/gp/product/B07Z915YCY
- DS18B20 temperature sensor modules with waterproof stainless steel probe https://www.amazon.fr/gp/product/B094FKQ9BS
In my particular case, my pump shelter is buried and it is difficult to receive WiFi correctly. So I ran an Ethernet cable from the house and used an ESP32 powered by POE and connected by Ethernet