Sump pump water level monitor using ESP8266 and Gmail sender update

For the last couple of weeks, it rained a lot and sometimes I got emails almost every 10 minutes sent by the sump pump monitor through ESP8266 I made (previous post). I thought that was too often and started thinking what would be better way to receive the notifications.

Here is what I wanted

  • to see more data than simple notification when the pump runs. In other words, I’d like to see periodic measured data such as the water level every minute.
  • to receive emails in regular basis, like every hour with the data collected for an hour. If I don’t get an email over an hour, that means there is something wrong, for example, power outage, monitoring system malfunction, wifi router error, or the monitoring system is sunk in the water (the worst case).
  • to receive email when the water level is too high.

So, I made some update and cleaned my original code. Now I get emails every hour and the title of the email look like this.

50 (41/69) 36 min

which means the current level is 50cm, the highest level for the past hour is 41cm, the lowest is 69cm. Since the ultrasonic sensor is mounted on top of the sump pump pit, the smaller number means the higher water level. 36min means the pump runs with 36 minutes interval. Now the body of the email looks like this.

69 67 66 65 65 64 62 61 60 60 59 58 57 56 55 54 53 52 51 51 50 49 48 48 47 46 46 44 42 41 69 68 67 66 65 64 63 62 61 60 59 59 58 57 56 55 54 52 52 51 50
It measures the water level (the distance from the sensor to the water surface) every minute (actually a little longer than a minute due to other delays) and converted into a string and add it up to a string for an hour and put the string value to the body of the email.
The Gmail widget on my phone shows the last few messages as shown below screenshot.
Selection_091
If you’re interested, you can download the Arduino code for this update from my github repository (LINK).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s