#Guidance on how to approach new pump failure notification

1 messages · Page 1 of 1 (latest)

jaunty crescent
#

I need to know if my sump pump has failed. It should run several times within 30 minutes of rainfall. Maybe I am overthinking how to do this. I think it's too complex for the 'new automation' tool.

So within the past 30 minutes, if it rained and the pump hasn't run, send a pump failure notification.

Approach:

  1. Automation 1: every minute, check openweathermap_condition for any of the words rain, shower, thunderstorm and if found set an input boolean to true for 30 minutes.
  2. Automation 2:
    a. every 30 minutes, if that rain Boolean is true and the pump did not run in the past 30 minutes** send a notification of pump failure.
    b. mute the notifier for 8 hours after a notification

** I would need help to scan the pump run history in HA's database.

Maybe there is a simpler approach to accomplish this. Thx in advance!

jaunty crescent
#

and I need some way to set the value on HA load to false/zero

sand hull
#

Is it really that deterministic where it'll ALWAYS run within 30 minutes of rain? I feel like that'll give you a fair number of false positives.

I would need help to scan the pump run history in HA's database.

I'd suggest having a sensor that just records the last runtime to make that comparison easier

#

Usually best to try and see if you can approach something based on the actual triggers you want to observe instead of "every X minutes".

Could you trigger on a weather entity's state directly instead?

#

Probably would be better to have some type of water / water level sensor to determine this though

jaunty crescent
#

The basin is at the low spot in a large area shaped like a funnel, so it is likely to run upon any rainfall.

#

You reminded me of a water sensor I built long ago. I still have it, but it would be too much of project to install for this basin, so I'll keep it in mind as a backup solution.

#

If I trigger on the weather state, I'd have to wait to see if the pump runs. That may be a viable option.

young plover
#

Openweathermap provides a sensor that is the rate of rainfall over the past 10 minutes, and it is updated every 10 minutes. I would use a numeric_state trigger when that sensor is > some value for 30 minutes. Then you can have a template condition for the pump having a last_changed property < now()-timedelta(minutes=30)

The downside is that this would be affected by restarts of HA

lavish cliff
#

Curious why you don't just put a simple flood/water sensor on the floor near your sump pit and call it a day. No worries about HA restarts and really the last thing you want to rely on during a storm is the internet and a MAYBE accurate but probably delayed somewhat weather forecast to monitor a sump.

You really want to know about the sump failure as soon as it happens, not some time later. Just my 2 cents.

tawdry crow
#

Yeah, I agree with jazzy. A sensor in the pit above the level where the float switch should trigger would be best.

tawdry crow
#

sometimes your soil is saturated and sometimes it's pretty dry and it's going to change how quickly the sump needs to run. I suppose if you have a nice well draining soil around, it should be more consistent. I live in what feels like a drained swamp, so a couple days of rain means the sump is turning on fast. if it hasnt rained in a bit, a shower isn't going to really move through the soil fast enough

jaunty crescent
#

Yes, a high level switch is the best solution functionally, but like I said, too much of project to install for this basin. have the rain from openweathermap as a sensor working now, and I'd like to sum the readings over the past n hours.

#

I would use the sum in the automation as a condition. Like if sum of rain last 2 hours > somevalue and if the pump didn't run in last 2 hours. How are these dealt with?

jaunty crescent
#

I think this may work. I will check how it ran in the morning.

#
    - condition: and
      conditions:
        - condition: numeric_state
          entity_id: sensor.openweathermap_rain
          attribute: sum
          above: 0.1
        - condition: numeric_state
          entity_id: counter.sump_pump_ran_recently_counter
          below: 1```
#

counter.sump_pump_ran_recently_counter is a helper that I'd like to get rid of too.

jaunty crescent
#

So sum is not an attribute of sensor.openweathermap_rain. So where to go from here? Statistics integration (I have no experience with it), template_sensor, helper?

young plover
# jaunty crescent So sum is not an attribute of sensor.openweathermap_rain. So where to go from h...

If you want to trigger an automation based on accumulated rainfall over the past 2 hours, then you first need to calculate accumulated rainfall in another sensor, and then calculate only the past 2 hours in an additional sensor.

The first would be an “integral” helper. Create one of those based on the rainfall rate sensor, and choose “left Riemann sum” for the integration rule.

That will create a total accumulation rainfall sensor that never resets. Like the water meter for your home, the amount it changes from day to day or month to month is what is important; the current value it reports is somewhat meaningless.

So then if you want to know how much it has changed in the past 2 hours, you’d need a “statistics” helper to do that. Create one based off your new integral sensor and use “change” for the state characteristic, and input 00:02:00 for the max age. You can leave everything else blank or with the default value.