Introduction: A Smart Water Sensor That Sends Text Messages

About: thanks

The esp8266 will log on to your local network. One gpio2 (D4) will go low when water is detected. When the esp8266 detects water it will use http://www.Twilio.com to send an SMS text message to your phone.

Parts List

1. Esp8266 stand-alone unit with water sensor $15, available at https://www.tindie.com/products/Paulware/text-sending-water-sensor/

2. Esp8266 programmer $10, available https://www.tindie.com/products/Paulware/esp8266-programmer/

3. 5V usb power supply $3, available from ebay.

Total parts cost: $28

Steps

1. Follow this instructable to program the unit: https://www.instructables.com/id/ProgramESP8266/

2. Edit sensor.lua, modify the SSID and password to match your local network

3. Disconnect programmer from laptop, remove the esp8266 from programmer and place it in the water sensor.

4. Connect the standalone esp8266 to a 5V power supply. Allow 10 seconds to boot up

5. Place a drop of water on the sensor

You should receive a text message on your cell phone in about 15 seconds

Step 1: Set Your Ssid and Password for Your Local Network

When you order a sensor from tindie like this one:
https://www.tindie.com/products/Paulware/text-sending-water-sensor you will receive an esp8266 that has already been flashed as is ready to be programmed.

Before you receive the unit, the manufacturer will send an email requesting the phone number to send the text.

He will then test the unit by sending a sample text to your phone. When you receive the sensor.lua file, it will have your correct phone number. It will not have the correct SSID and password, you need to add that part.

Edit the first 2 lines of the sensor.lua file:

local SSID = "YourSSID"

local password = "YourPassword"

Change the SSID to be the name of your local home network. Change the password to be the security password for your network.

Step 2: Program the Esp8266 to Be a Water Sensor

Follow this instructable to program the device:

https://www.instructables.com/id/ProgramESP8266/

Step 3: Test the Unit

Connect the standalone esp8266 to a 5V power supply. Allow 10 seconds to boot up

Test the device by applying a drop of water to the sensor

You should receive a text message on your cell phone in about 15 seconds

Step 4: