Sump Pump Monitoring Time Alarm?


(Berthelette) #1

Hi All,

I woud like to receive an alarm if my Sump pump running for more then X minutes. I would like to use ST Outlet to determine if the Sump pump running or not base on the power that it consume.

If the “Energy Alerts” SmartApps can have a timer It would be wonderfull.

I tried to modify the “Energy Alerts” program to add a timer inside but I don’t know too much about this language. I think I miss a thing.

Can some one help me ?

I put the lines for the timer below, In bold here the start and the end my adds.

Thank You

def aboveThresholdValue = aboveThreshold as int
if (meterValue > aboveThresholdValue) then HighPower.value == true else HighPower.value == false
if ( HighPower.value == true ) {
def elapsed = now() - HighPower.rawDateCreated.time
def threshold = ((timeThreshold != null && timeThreshold != “”) ? timeThreshold * 60000 : 60000) - 1000
if (elapsed >= threshold) {
if (lastValue < aboveThresholdValue) { // only send notifications when crossing the threshold
def msg = "${meter} reported ${evt.value} ${dUnit} which is above your threshold of ${aboveThreshold}."
sendMessage(msg)
} else {
// log.debug “not sending notification for ${evt.description} because the threshold (${aboveThreshold}) has already been crossed”
}
}
}
}


(Pizzinini) #2

I recommend not using an outlet that can turn off for a simp pump… just imagine what would happen if Smartthings accidentally turns off the sump pump when it should be running.

Maybe consider an aeon power monitor instead.

I almost know nothing about groovy but Webcore may be an easier alternative.


(Allan) #3

Another option would be to use something like a EcoLink door contact (https://www.amazon.com/Ecolink-Intelligent-Technology-Operated-DWZWAVE2-ECO/dp/B01N5HB4U5) which has external input for contact along with a current sensor (https://www.amazon.com/Functional-Devices-RIB-0-35-150-Terminals/dp/B008HOSOU4/) to detect the pump is running. Then you can have a simple on/off coming into the system which you can setup a custom SHM rule to alert if its running for xxx minutes.

Or if you have other things to monitor use ST_Anything with a ESP8266 and the current sensor to do the same thing plus add a water sensor if it starts to get full as a alert.


(Berthelette) #4

Pizzinini : Thank you for your reply. I didn’t saw that the Aeon Labs HEM was supported by ST.
I just buyed two of those to do my tests.

If I’m able to resolve my program error , I will be perfect with this solution !

Vseven : The idea is good but I prefer to be able to read the electrical power instead of just read if It’s On or not for almost the same price. But I will have to work on the program to do what I want !

Thank You


(Allan) #5

Instead of modifying a potentially complicated program would it make more sense to have a secondary program just do what you want? Or maybe WebCore? I would think there is something in there that can read the power reading and say “If above xxxx for yyy minutes then do zzzz”.


(Berthelette) #6

I didn’t know that WebCoRe was existing. I read a little bit about it and it seems very friendlyuser.

I did my sequence in about 1 hour. All works perfectly. This is awesome !

Thank You very much