alaudet / raspi-sump

A sump pump monitoring system using Python and Raspberry Pi
https://www.linuxnorth.org/raspi-sump/
MIT License
92 stars 36 forks source link

trigger additional scripts when threshold is reached #48

Closed veeectorm closed 5 years ago

veeectorm commented 5 years ago

I wanted to ask if there is any way to trigger an additional script when the threshold is reached. I wanted to use pushbullet or pushover to send a push notification on top of the existing SMS/Email notif.

THanks!

alaudet commented 5 years ago

Sure, in reading.py

if water_depth > critical_water_level and configs['alert_when'] == 'high':
    alerts.determine_if_alert(water_depth)
    *** do other stuff ***