Introduction: DIY-Security

In this tutorial, I will teach you how to set up a home monitoring system with the Adafruit Feather HUZZAH board.

Step 1: Parts

The parts you need for this are:

Feather Huzzah ESP8266

Li-poly battery

Breadboard

Reed switch (magnetic switch)

10k ohm resistor

Jumper wires

An iPhone or Android device

A computer running the arduino ide

A house

A wall

A door

Step 2: Wiring

To start, attach 3v to + and Gnd to - on from the feather to the breadboard.

Then, attach one end of the reed switch to + and the other to GPIO pin 15 on the feather.

Next, attach the DHT22 sensor to the breadboard. You can bend the sensor over like I did or just keep it upright.

The wires for the DHT22 from the left are:

+ to pin 1

+ to 10k resistor to pin 2

pin 2 to feather pin 2

- to pin 4

Step 3: Blynk Setup

To make the application for the system, you need to install Blynk on an iPhone or Android device. Open the app, sign up and start a new project. When the new project window opens, change the device to ESP8266 and the connection type to WiFi. You can choose any name you like for the project.

When the project opens, tap the screen to open the widget menu. Drag two gauges, a value display (not a labeled value), and a notification widget.

Click the first gauge to open up the settings. Change the name to humidity, pin to virtual - V5, and label to /pin/ %. Click ok to exit.

Open up the other gauge. Set the name to Temperature, the pin to virtual - V6, and the label to /pin/ C.

Now open the value display by clicking on it. Set the name to door and the input to digital - GP15. Click ok to close.

You can move the tiles by dragging them. Once you are done your layout should look like the picture above.

Step 4: Setup Code

For the code to work, you need to download these libraries:

https://github.com/blynkkk/blynk-library

https://github.com/adafruit/Adafruit_Sensor

https://github.com/adafruit/DHT-sensor-library

Follow this tutorial to setup your feather huzzah:

https://learn.adafruit.com/adafruit-feather-huzzah...

The project's code is located here:

https://github.com/Leocarson/DIY-security

Download the code and open it in the arduino ide.

To set up the code, select Adafruit Huzzah ESP8266 in the ide. It should be set up properly by default.

Change the SSID and password to your wifi's SSID and password.

To get the auth token, in your Blynk project click the nut icon. Under the long string of letters and numbers in blue, click the E-Mail button. That should your auth token to your email that you used to sign up with blynk.

Copy and paste the auth token into the auth variable.

Plug in the ESP8266, select the port icon and choose one that shows up (for me it was always COM10). Then, upload the code. If you get an error that starts with Warning: esp_sync failed, refer to the upload error section at the end.

Step 5: Mounting the Project

To mount the project to your door, put the circuit on the floor and close your door.

Tape the wired part of the reed switch to the wall connecting to the door

Tape the magnet part to the door next to the wired part.

Plug a battery in or run the feather from a USB adapter

You should be good to go! If you encounter any errors, write them in the comments below. If you had an upload error the next step will help you with that. Connect the feather to power, open up blynk and press the play button on your project to run the code. Thank you for reading and following along (if you did). If you liked this tutorial, give it your vote for th

Step 6: Debugging the ESP_upload Error

When making this project I encountered an error that would give me an error when uploading at random times. I found a few solutions that might work. If you find another solution, write it in the comments.

1. Plugging a battery in

2. Unplugging and plugging in the USB

3. Closing and reopening the arduino ide

4. Changing the board to Generic ESP8266 Module

5. Connecting GPIO 0 to Ground

Internet of Things Contest 2017

Participated in the
Internet of Things Contest 2017