Pressure sensor for Pool Pump

So I am trying to get a reading from my Pool Pump so I know when it will need back flushed. I bought a Shelly Uni and have it connected and getting a voltage, it is currently reading zero because it is just sitting on my desk. They give you a formula to convert the Voltage reading to Pressure (P=(Vout/5-0.1)*4/3). But I think this may be above my home assistant skills. This is the pressure sensor i bought:

I know it has to do with templates but not quite sure how to use them and where do i put the yaml code or even what the yaml would look like.

I think it should look something like this but now quite sure:

template:
- sensor:
- name: “Pool Pump Pressure”
unit_of_measurement: “PSI”
state: >
{% set voltage = states(‘sensor.pool_pressure’) | float %}

        {{ ((voltage) / 5 - 0.1 * 4/3) | (default=0) }}

I just found an example that was close and plugged the numbers in from the equation. Just not sure if it is correct or where do i save this.

Thanks

template:
  - sensor:
      - name: "Pool Pump Pressure"
        unit_of_measurement: "PSI"
        icon: "mdi:gauge"
        state: >
          {% set voltage = states('sensor.pool_pressure') | float(0) %}
          {{ ((voltage / 5 - 0.1) * 4 / 3) | round(2) }}
        availability: "{{ states('sensor.pool_pressure') | is_numeric }}"

Ok I started getting readings on the sensor. But I get an error with the last line of the code. If I just remove that line it works just fine.

Now one last thing, How do i set a scan interval of 1 hour?

I put scan interval of 360 and i get an error.

is there a way to set a scan interval?

Sorry that should be:

availability: "{{ states('sensor.pool_pressure') | is_number }}"

No, and there is no need. The template updates whenever the source sensor sensor.pool_pressure updates.

I am thinking of doing the same thing. How has it worked for you so far?

I understand this is very late but…

It seems cheap enough to replace if it starts to go bad.

Hi Dan,

I have the exact same sensor and a shelly uni, with plans to add this to the pool filter.

Did you flash the uni with ESPHome etc or are yoiu using the shelly integration?

Thanks

Jarrod.

Sorry I know it has been a while. I just now started to get this running on my pool for the season. i am using the shelly intergration. The temperature is perfect but for whatever reason Home Assistant is not pulling in the voltage from the Uni. If i go to the uni’s web interface i can see the voltage change as my pump is running but just does not show up in HA. Has anyone else tried this or have it working?

Thanks

This is a great add to my pool as well — buying the supplies! Out of curiosity, what powers your Uni? Did you buy a power supply ? If so, any recommendations or specs (voltage / amps)

Thanks

I just bought a 12v 1amp power supply off of Amazon to power the Uni. So far temps have been rock solid but I’m still not sure about pressure. The equation it gives you to use doesn’t seem right. When the pump is off it gives it still shows a pressure but should be reading 0. But I do get readings when the pump is running. Going to take a look at it next week to see if I can get better results with it.

1 Like

Awesome. Thanks for sharing. Let us know if you do get closer to a better reading.

One more question if you don’t mind, what powers the pressure sensor ? Since it’s 5v I’m assuming it’s not the same as the Unis PS.

I’m trying to do the same for my pool filter. I’d love to see how you physically connected this to your pool equipment.

I removed my pressure gauge on the side of my filter and installed a stainless T then threaded each into that T. I am not at home at this time and won’t be til next week. I will take some pictures when I get home.

Thanks - so you managed to keep the original analog gauge and introduce the digital sensor?

Hey Damato - Wondering if you could shed some light into the wiring of the Uni to the sensor. My sensor is 5V like yours, and I did go buy the 12V adapter on Amazon as suggested. My Uni powers fine, however Im still not able to get any readings from my sensor.

At this point, my sensor (which has 3 wires - Red, Black, Green) is wired as follow:

  • Shelly Yellow to Sensor Red
  • Shelly White to Sensor Black
  • Shelly Green to Sensor Green

How did you wire yours?

Has anyone tried using an esp8266 with an Amazon 1/4 Pressure Transducer Sensor Pressure Gauge Input 5V Output 0.5-4.5V / 0-5V Pressure Transmitter ?

I recently built a pool temp sensor using an esp8266 with a Dallas temp sensor. Works great so I was hoping this would be somewhat straightforward… haha

Update NVM – just had to educate myself on the analog to digital input (ADC) of the Uni and realizing it’s not the same as the binary inputs on it or the Shelly Plus Add-on.

Curious how the Uni or a Shelly Add-on module are sensitive enough to detect the voltages at lower pressures. Seems like both modules start around 2v for their inputs, but the sensors start at 0.5V. So even for a 30psi sensor it doesn’t measure over 2V until around 14psi. Is my interpretation of how this works correct?? If so, I like to run my pump at lower speeds so my typical filter pressure is 5psi or lower. The sensor should be sitting a little over +1V which would not be picked up by the Shelly modules correct?