This time of year water leaks and broken plumbing pipes seem to happen more often.

Some of the most common causes of household water leaks are:

  • Clogged Lines
  • Corrosion
  • Damaged Pipe Joints
  • Excess Water Pressure
  • Loose Water Connectors
  • Rapid Temperature Changes

Whatever the case may be, I will show you a simple way that you can create a smart water leakage detection system for your home or even your office.

Here is what you need for the project:

Some of the steps we covered before and I will link them here. Be sure to follow all of them and if you have any questions, leave them in the comments section below.

Step 1

Install Tasmota on Sonoff Bridge. Tasmota will give you the possibility to connect the bridge to a mqtt server and then to Node-RED.

Step 2

Identify the rf codes for every leakage sensor you have. For this project I will use 2 sensors but you can use as many as you want!

In Node-RED you will have by now a mqtt input node and a debug output node.

Touch each of the probes on the sensor with a moist towel to make them send data to the RF bridge. In the debug window you will see the codes for every sensor. Mine looks like this:

As you can see, I receive 2 data codes from my sensors: 9A5829 and 039B49

Step 3

In this step we will configure Node-RED to process the data and send notification to a mobile phone using Pushbullet. Use this tutorial to configure Pushbullet and Node-RED

Your flow will look like this:

Let’s explain it a little. In the first node you will receive data from the rf bridge. The payload is a string containing  a JSON and we will have to convert this string into an object using the JSON node. No need for configuration, just drag and drop. Of course you will receive data from other sensors too and that is why we created a function node that checks if the payload is from a leakage sensor or not. Using a ‘switch node’ we can change the payload from a code to a name like ‘kitchen’ or ‘bathroom’. Another function will create the actual message that is sent to the phone, something like ‘Water leakage has been detected in the kitchen’. In the end we send this message using Pushbullet but you can use other systems like Telegram.

Find the flow here and import it to Node-RED by clicking on Menu -> Import -> Clipboard and paste the code.

The code above will not cover the notification node (Pushbullet) . You will have to install it and configure it yourself.

Also, check the first function node and add the codes for your sensors!

var data = msg.payload.RfReceived.Data;
if (data === ‘sensor-code’ || data === ‘another-sensor-code’){
msg.payload = data;
return msg;

Deploy and you are ready to go!

Step 4 – Installing the sensor

The sensor comes with some two sided tape. Install the “transmitter” on the wall (or anywhere you like but not the floor 🙂 ) and the “probe” with the poles touching the floor.









Leave a comment below to tell us if this worked and don’t forget to share this link with your friends. A basement water flood is something serious. Trust me, I know.