There are a lot of things that can cause a flooded basement: a leaky pipe, an overflowing washing machine, or a crack in the wall. Regardless of the cause, you need a way to either stop the water and clear out the flood. Thankfully, a simple investment into a few inexpensive gadgets is all it takes.

We've covered smart home gear to keep your basement dry – such as smart valves and other gadgets to protect your home when you're away – but what about a simple project you can do in under 30 minutes that would protect your basement from water and your home from expensive damage?

In this article, I'm going to walk you through installing a sensor that detects when there's a water leak on the floor in the basement, and then a smart switch that will turn off a potential known source of water in the basement. You could just as easily program the same switch to activate a water pump to get the water out.

All You Need - Two Gadgets

In this project, the first purchase you need to make is a D-Link Wi-Fi water sensor, for roughly $60 (our review of the D-Link Connected Home Kit).

The second gadget to purchase is a WeMo Wi-Fi smart plug, for about $40.

I know what you're thinking. "But what about those annoying hubs and smart home protocols I need to know?"

Nope. All you need are these two smart gadgets, both of which are very simple to set up and work directly with your home Wi-Fi network. No special external hub required. Easy right?

Here's what the hardware will look like when it arrives. The WeMo smart plug is on the left and the D-Link water sensor is on the right.

flood-guard1

The water sensor is nice because you can plug the unit in somewhere above the floor, and the extended cable lets you drop the water sensor down to the location on the floor that you want to monitor.

Now, in my specific setup, I'm monitoring the area of the floor underneath my dehumidifier. I have an elevated dehumidifier that drains condensate out the condensate port down to a special condensate pump container I purchased just for this purpose.

flood-guard2

The condensate pump has the black inlet hose with water flowing down from the dehumidifier, and when the water level hits a certain height, the pump kicks in and pumps water up the clear tube on the back port. That tube runs up the wall and eventually goes into the same septic pipe intake that the clothes washer water drains into.

flood-guard3

Now, I'm sure you can imagine plenty of scenarios here where water could leak. The hose on the back of the dehumidifier could come loose. The clear hose on the outlet side of the pump could burst or come loose. The float switch could fail and the condensate pump tank could overflow.

All of these things would eventually lead to a growing water puddle, and if left unchecked, a flooded basement and lots of damage down there. Not something I want, and an investment of only $100 is a very small price to pay for peace of mind.

Setting Up the Water Sensor and Plug

The D-Link water sensor control unit is the plug itself. It's pretty big so if you're planning to plug it into a power strip, it'll use up the space of two or three plugs, so plan accordingly.

flood-guard4

Then you plug the sensor extension into the body of the controller, and the actual water sensor cord into that extension cord. This gives you maybe four feet or so where you can place the sensor down on the basement floor exactly where you know water will go if there's ever a leak.

flood-guard5

The next unit to hook up is the We-Mo plug. This is even easier. You simply plug it in, and then plug the device you want to control into it. In this case I've got both the D-Link water sensor controller and the WeMo switch in the power strip elevated about three feet above the floor on a shelf. The dehumidifier is plugged into the WeMo switch.

flood-guard6

Once you have your smart gadgets plugged in and powered up, it's time to connect them to your home network and to the Internet.

Connecting to the Internet

Both of these units have a similar setup routine. In the case of the WeMo device, install the WeMo app on your phone. You can find it on either iTunes or Google Play.

Both the WeMo and D-Link come with a built-in Wireless network that they transmit the moment you plug in the unit. Your mobile device or tablet will see this network, and you can connect to it without any password. In the case of the D-Link, you will need to know the PIN number printed on a small card that comes with the device.

Open the WeMo software, and follow the steps to set up your unit. The first step will be to use your phone's Wi-Fi settings to connect to the WeMo's wireless network.

wemo-mobile1

Once you connect to the network, you'll just need to tell the unit what your Wi-Fi network password is. Once you do that, the device will connect to your wireless network, and you can switch your phone back to your home's Wi-Fi to continue the setup process.

Rename the unit to whatever you want it to be called on IFTTT later on, and add your email address if you'd like to get notifications from the device. You'll likely also need to create your internet WeMo account if you don't have one already. When you're done you'll see the unit configured and in the ON status with a green indicator.

wemo-post-1

That's the WeMo set up and operating already. Your job is half done!

The D-Link water sensor requires the installation of the MyDlink Home app, also available either from iTunes or Google Play. Like the WeMo, you'll need to create your internet MyDlink account.

This app will walk you through the same process where you need to have your phone connect to the sensor's own Wi-Fi network first, configure the password for your home network, and then switch your phone back to your home Wi-Fi to continue. Give the device a nickname, and on the final screen you'll see the device status active and functional.

dlink-post-1

If it says a firmware upgrade is required, I recommend doing it -- there are likely important security and other bug fixes included in any firmware upgrades.

Setting Up the IFTTT Recipe

Now that you've got the hardware set up and everything is talking to the Internet, you're ready to make the magic happen with an IFTTT recipe. If you don't have an IFTTT account yet, then go ahead and set one up, and I recommend reading our IFTTT guide to learn how to use it.

The first step will be to set up your water sensor trigger. In IFTTT, just search for "d-link" to find the D-Link Water Sensor.

d-link-water-sensor

The only trigger available for it is Water Detected. Click it.

d-link-water-sensor2

If this is the first time you'll be setting up a WeMo device to your IFTTT account, you'll need to use the WeMo app to connect your WeMo devices to the account. You'll find the Connect to IFTTT option in the app's settings area.

dlink-post-2

Once you've made that connection, you can search for "wemo" in IFTTT to find the WeMo Switch.

wemo1

In this example, the Action that I wanted to take is to turn off the switch if there's a water leak.

wemo2

If you have multiple WeMo switches in your house, then you'll find the list of them on the next step.

wemo3

I also suggest that you click to enable "Receive notifications when this recipe runs", because if you've had a water leak, even though your smart switch avoided a much worse leak (or flood) from happening, you still want to know about it so you can go and clean up the small mess.

wemo4

Once you're done creating this recipe, that's all you have to do. Now, for only $100 and very little effort, you have an automated system that'll keep your basement dry in the case of mechanical failure, and it'll alert you when a problem happens.

But, what if you don't have a dehumidifier? You can use this same approach to detect a water leak under a clothes washer, or even just placing the sensor at the lowest corner of your basement where water is most likely to pool first if there's the start of a flood.

In those cases, instead of using a WeMo plug to turn off a dehumidifier, you may want to purchase a WeMo wall switch that you can use to control your water pump.

Then, when the sensor detects a water leak, at least you can turn off the most likely source of water coming into the basement.  Even if you purchase this third switch in addition to the two devices mentioned earlier in this article, the cost is only $50, making the total cost of keeping your basement dry just $150. It may not work when the power goes out, but for a large majority of situations that lead to flooded basements, it'll work well. It's a small price to pay for peace of mind.

Have you ever had a basement flood that this setup would have prevented? What other "smart" ideas for these sensors in the basement can you come up with? Share your ideas in the comments section below!