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.