By Nic Jansma
This is an internet-connected water sensor that will alert you via SMS if water is sensed.
I am currently using this near my sump-pump to alert me if the pump fails. It can be run from either AC or battery power.
For hardware, I'm utilizing a Spark Core hooked up to a Grove Water Sensor.
The Grove Water Sensor's three wires (power, ground and data) are soldered to the top of the device.
I've 3D printed a simple "seat" for the Core to sit on so the external pins don't short. The STL is included under case/
.
The Core is taped to my sump pump's pipe, and the Water Sensor is taped just below ground-level in the sump pump water pit.
The Spark Core firmware is available under firmware/
.
The firmware publishes these two events to the Spark Cloud:
online
when the device first starts upalarm
when water is sensed. The payload is eitheron
oroff
.
The firmware also exposes a variable alarmStatus
: 0
means no alarm, and 1
means the alarm is active.
Something needs to monitor the events the Core is publishing, and to send SMS messages when water is sensed.
The simple Node.js app under monitor/
does this. It will send messages via Twilio when the device comes online, and when the device senses water.
You can run the monitor
app on a home machine, in the cloud, or hosted on a cheap VPS. Simple copy the config.json.sample
to config.json
and update the file for your personal Spark and Twilio tokens and IDs and the phone numbers you want SMS alerts to be sent to.
Total cost is around $42:
- $39 for the Spark Core (from Seeed Studio or MakerShed)
- $2.90 for the Grove Water Sensor
- Cables to connect the Water Sensor to the Core
In addition, you will need to create a Twilio account so you can get SMS alerts. I pay about $1 a month.