Fork Star Issue Watch
View Today's Water Level
Donate | FAQ
Raspi-Sump is a sump pit water level monitoring system using a Raspberry Pi, an HC-SR04 Ultrasonic Sensor and written in Python. It monitors the water level in your sump pit and alerts you if the water level is getting too high, possibly indicating a sump pump problem. The source code is available on GitHub.
If you would like notifications on changes, bugs and security issues regarding Raspi-Sump, send me an email at Notifications asking to subscribe to updates.
I will always bcc you on the email so that your info is not visible to other users. I would never share your email address with anyone.....period.
Join the Raspi-Sump Discord group. We have a small group of people that are usually on. It's a good place to get support and discuss other ways to use the application.
If you are interested contact me for an invite link. You need to have a Discord account to join.
sudo pip uninstall raspisump sudo pip3 install --no-binary :all: raspisump sudo apt install python3-matplotlibYour configuration file will be preserved during the upgrade and you will not lose any of your old csv readings. However it is always a good idea to backup your /home/pi/raspi-sump directory just in case.
All future versions of Raspi-Sump will only be tested on Stretch and the latest version which is Buster.
Full Installation Instructions on Github
- RaspberryPi (Any model)
- Python 3
- RPi.GPIO module for Raspberry Pi (automatically installed)
- hcsr04sensor module (automatically installed)
- Matplotlib and Numpy required if you want to graph output of the csv file.
- Packaged install with PIP.
- pre defined interval monitoring of sump pit water level.(time interval is configurable)
- Error handling to compensate for fringe readings.
- Readings logged to csv file.
- Automated SMS Email Alerts if water depth exceeds a predifined level in the sump pit.
- Chart of current sump activity (seen above).
- Monitor the raspi-sump process and if it is stopped automatically restart it. (if running raspi-sump as a continuous process)
- Configure variables for your sump pump and alerts in a seperate configuration file. (raspisump.conf)
- Choose between metric or imperial measurements.
- create charts for viewing today's waterlevel and past days waterlevels on the local webserver of your Raspberry Pi
- Rate limit SMS Email Alerts
- Set alerts to alert you on low water (or other liquid) levels
- User configurable SMS Email Heartbeat Alerts to ensure alerts are working properly. (Off by default)
- 4 wires connected from HC-SR04 sensor to the RaspberryPi
- Sensor mounted on sliding wood platform
- VCC to 5V
- Ground to ground
- Trig to GPIO 17
- Echo to GPIO 27 (with voltage divider)
Use any available GPIO pins for Trig and Echo. 17 and 27 shown as an example only. Simply identify your pins in raspisump.conf.
It is essential to add a voltage divider on the wire connecting the Echo pin on the sensor, to the the GPIO pin on the pi. The sensor sends a 5V current through the wire and the GPIO pin is only rated for 3.3V. Not using a voltage divider can damage your Raspberry Pi. I used a 470 Ohm and a 1K Ohm resistor with the 1K connecting Echo and Ground. Voltage is actually a touch higher at 3.4V but I believe it to be within a tolerable level.
The following image illustrates very well how the voltage divider works.
The 470 Ohm resister is on top and the 1K resistor is on the bot tom. The wires to the right go to the Pi and the ones to the left go to the sensor. The orange wire is the Echo wire and you can see it is connected right at the center of the two connected resistors. The yellow wire goes to Ground on the Pi. There are plenty of diagrams that you can find explaining voltage dividers but this picture provided by github user @rhiller was very helpful in seeing it in practice. Thanks to @rhiller for taking the time to answer many questions. He also has a sump pump monitoring project called pi-distance on Github that you can check out.
sensor mounted to plastic bracket on wood strapping. HC-SR04
A JSN-SR04T sensor can also be used. JSN-SR04T User Manual
Raspi-Sump in the October 2014 Embedded Issue of LinuxJournal
Get the source on GitHub.
Alternatively, download the archive. Raspisump Tarball Downloads