I used a Shelly Uni.
I used ADS1115
Yea sweet I thought so. Ill give it a crack
So I got one of these, wired it up and it is all good to go. The only this, how on earth do I mount this thing?
The thread is like 12mm, my pip from the low end of the Tank is like 40mm. So I need some kind of 40 mm T with a female 12mm thread?
Anyone done this?
thanks alot
i have connected the pressure sensor and the green line also to gnd line shelly uni plus . and its working well more accurate than taking off the green line.
what i want to connect also the temperature sensor and the green line is used for pressure sensor . how can we do it . both together
please advice
FYI, I found these, got myself 4,
3 x 0.5Bar for my 5M tanks and 1 x 10Bar for my booster pump output.
Connecting mine to a ADC (MCP3008) which then connects to a Raspberry Pi ZeroW. From there I insert the data into an influxes and also post onto mqtt.
Just finished 20 diagrams showing water level in 5% increments, about to try and figure out how templates work, so as to show specific image based on water level.
G
No.
The ESP32ās like a NodeMCU has 4 x Analog inputs.
You can then flash it with say Tasmoto allowing you to MQTT send the values to a mqtt broker running on your home assistant, just take note of the output from the sensor, get the higher voltage, like 10v output and then use a voltage divider onto the input analog pin.
my case i got 5V output from my Raspberry pi, should have gone 5V, but was thinking of using nodemcu so ordered with 3.3V output, then decided to connect o a MCP3008, which duh can handle 5V data input on analog pin, would have been better, but itās all good.
Or you can do custom Arduino sketch.
G
Hi All, so finally almost 1 year after creating this post, I went ahead and have installed 2 of these drop-in-tank style pressure sensors, and they are absolute beasts! They look like they would cost $600+ when you hold them.
These output 0 - 5v. So I went ahead and made a voltage divider using 2 resistors and wired up to my WT32-ETH1 esp ADC pin. I do seem to be getting some unstable readings with quite a bit of fluctuation, not sure if this is excessive or not.
21:42:32][D][sensor:094]: 'Water Tank Level': Sending state 0.22436 % with 0 decimals of accuracy
[21:42:33][D][sensor:094]: 'Water Tank Level': Sending state 0.39606 % with 0 decimals of accuracy
[21:42:34][D][sensor:094]: 'Water Tank Level': Sending state 0.23657 % with 0 decimals of accuracy
[21:42:35][D][sensor:094]: 'Water Tank Level': Sending state 0.40323 % with 0 decimals of accuracy
[21:42:36][D][sensor:094]: 'Water Tank Level': Sending state 0.13882 % with 0 decimals of accuracy
[21:42:37][D][sensor:094]: 'Water Tank Level': Sending state 0.34237 % with 0 decimals of accuracy
[21:42:38][D][sensor:094]: 'Water Tank Level': Sending state 0.07500 % with 0 decimals of accuracy
The other thing is I am now really struggling with calibration of this sensor. I measured the readings at certain data points, measured the reading @ 50%, 0% and 100% and entered as per below.
sensor:
- platform: adc
pin: GPIO34
name: "Water Tank Level"
update_interval: 1s
attenuation: auto
unit_of_measurement: "%"
accuracy_decimals: 0
filters:
- median:
window_size: 15
send_every: 4
- delta: 0.1
- calibrate_linear:
datapoints:
# Map 0.0 (from sensor) to 0.0 (true value)
- 0.00 -> 0
- 0.95 -> 15
- 3.30 -> 100
Is this the correct way to do this? I must be honest I have not done a lot with voltage dividers and ADC, and have not even touched the calibrate_linear function, so I am not really to sure if its correct but as I understand it,
It will give me a percentage based on the current voltage based on my set data points.
Please le me know if something looks wrong or if I can improve this.
Thanks
Dean,
I played with voltage dividers and ADC and had similar experiences with fluctuations. I then bought a Shelly uni. plugged the sensor to the uni and canāt be happier. The shelly does all the hard lifting.
All I had to do then was set a median over x number of readings - fill the tank then do the calculations for the voltage i had. I can share the yaml if you want. I canāt take credit for too much of it as I had some great help along the way.
Pat
Yea the only issue with the Uni is wifi is a bit of a distance, so I have a external WiFi AP in client mode and am connecting to the esp via ethernet.
Not sure if I can work around a this with a Uni
My uni is located about 50 metres from my outdoor AP (unifi). The signal is strong enough to throughput the meagre data. (-70dBm) I had been running my setup using a battery and solar but have recently pulled a 24v supply to the location. I had though when doing this that i should have also laid an ethernet at the same time (future proofing)
Pat
Ok thanks,
Can you share the Shelly Uni device you used, ill see if I can source one locally.
iām in OZ and got mine through ozsmartthings. Itās a shelly uni plus.
Great, Thanks.
Found a few. Will give them a try. If you could share your YAML that would be great.
Dean,
Here we go.
I display the volume here.
When the volume goes below 11,000 an automation turns the tank pump on for 4 hours - this is checked at 10.00am daily - I usually have enough solar output by then. This tops the tank back to 21,000 or so.
Pat
# this sensor calculates the volume given the size of the tank and the reading of voltage from shelly uni.
sensor:
- platform: template
sensors:
top_tank_volume:
value_template: >
{% set voltage = states('sensor.top_tank_water_median_voltage') | float %}
{{ ((voltage / 4.1) * 22000) | round (0) }}
unit_of_measurement: litres
friendly_name: top tank volume
# this sensor takes the voltage readings ffrom the shelly and averages them out
- platform: statistics
name: "top tank water median voltage"
entity_id: sensor.top_tank_water_level_adc
state_characteristic: median
max_age:
hours: 2
precision: 2
Thanks for this.
I would prefer to monitor the tanks based on a %. Is this possible?
Also, I picked up 3 Shelly Uniās today, what input do I wire into? Any resistors or anything etc?
Cheers
Dean
The wiring for the shelly is pretty straightforward. I followed the guide from Lars Klint on you tube. No resistors required. I just power the sensor and the shelly from 24v. One wire then connects to the data output of the sensor
As to displaying a percentage - iām sure that can be done but Iām no expert on this - youāre better checking the docs or in the forums. I believe way back in this thread DM-AU showed a tank percentage.
Donāt forget to wire the green wire to ground as well. The shelly documentation is pretty good.
Pat
Dean, to get percentages from Patrickās yaml use ChatGPT and ask it to convert Patrickās code to percentage. Just copy it into ChatGPT. I find itās a great resource to get quick answers, sometimes about code I have no idea how to write.
Yea im just finding it is struggling with indentation, especially with LAMBDA,
Gemini is anyway as that is what im using. Maybe I should try chatGPT
Or Perplexity. Worth trying the 3 of them. Iāve had no luck with Gemini.

