Made a Water Leak Sensor

Just figured I would post the other thing I’ve made so far. I found this instructable through a friend at work:

And bought a few of those door sensors from MonoPrice because they were relatively cheap at 24 bucks and they had the 3rd unused switch that was unused internally and had it’s own screw down block. So from there I did the following:

  • drilled two small holes
  • wrapped two lengths of bare wire double helix style down a length of nylon rope (so they never actually touch)
  • zip tied both ends to keep the bare wire in place on the rope
  • attached the two bare wires to each of the screw down terminals
  • closed up the mono price door sensor, hot glued and duct taped it to make it water “proof”
  • wrote a new device type based on the zwave water sensor (had to reverse some logic and change some versions)

After that I tested it. Here is a very short video if you want to see. Worked great! Was very happy. I’m pretty sure I don’t need to worry about debouncing the water shorting the wires together as a button press, but I still need to confirm completely.

Let me know what you think or if you have any questions. I will post the code on github also shortly.



Thanks for sharing, very interested in this! I have 2 of the monoprice sensors still in box. This will be great under the aquarium, just in case!

How difficult would it be to rig one of this leak frog gadget with the monoprice open/close sensor?

I would assume it would be pretty easy to open one of those up and find two spots to solder wires onto. In my case, my bare wire is acting as those two square metal plates you see on the bottom of the frog, and my rope covers a bit more area and is flexible to boot. But yes, if you want it to look like a frog instead of a rope… :smiley:

Here is the device type code on git hub:


:slight_smile: I’m trying to preserve the sound the leak frog makes when there’s water contact. So if I’m understanding this correctly, I just need to tap to those two metal plates and wire it to the screw terminals of the monoprice z-wave sensor?

You would also need to waterproof the monoprice sensor and install (and test) the device type I posted.

Thanks! Looks like I will busy tinkering with this tomorrow.

Thank you Justin for posting your project. I was able to make one today and it will go into service immediately. Instead of creating another thread I will just post the pics here for others who might look into doing the same thing.

Monoprice Dooor/Window sensor out of its enclosure

I used an old USB cord laying around and wired two of the wires to the external terminal post.

For testing, I just put the bare leads between a tissue.

A little bit of water…

And the notification from ST!


Great, so looks like the device type worked. Glad to hear it. Thanks for the photos!!

1 Like

Awesome I’ve wanted to do some water sensors in my old shelf basement but would of needed many to do what I wanted. Doing it this way could be done with maybe 1 or 2 depending on restrictions in length of wire. I’m already familiar with the Easy Button project. I used it to make pressure sensors on my stairs.

Can you help a new Smart Things user out and explain how to install that .groovy file?


Log into
Click on ‘create your own device types’ right after you login, or click ‘My device types’ on top menu
Click 'New Smart Device’
Select 'From Code’
Paste the groovy code
Click Create

Also don’t forget to update the device with this new device type you just created. You first pair your device with smartthings, and then under “my devices” you select it and select “edit” in its detail page. From there you will see a pull down menu that should have your new device type in it.


1 Like

Sweet. Thanks, guys! My sensors are in the mail.


I received two sensors today. I hacked up one of them for a laundry room water sensor. I ran two sets of wires in parallel so I could have it detect water on the floor below the washer (where I had a drip from a corroded water hose…that was less than a year old!) and in the valve/drain box I the wall. It works great. The other will be going in our teenager’s bathroom since he’s oblivious to everything going on around him.

Thanks for giving me two water sensors for the price of one!



Excellent! Thanks for sharing the pix and update.

Just noticed that I never updated this thread with the github delta change link which I added just to make it easier to see the diff. Here is that link. That shows the delta I had to make to the standard zwave sensor device type to add this water sensor capability.


Does your custom device type report battery status? I have it installed and it doesn’t seem to report battery status

I have two instances of this hardware and device type, and both show battery level at 100%. I believe that confirms that they’ve sent a battery update. How long have you waiting to see if you get a message? I wouldn’t think battery readings are very frequent but that’s just my guess.