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


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:

Follow this tutorial to setup your feather huzzah:

The project's code is located here:

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

Be the First to Share


    • Digital Fabrication Student Design Challenge

      Digital Fabrication Student Design Challenge
    • Build a Tool Contest

      Build a Tool Contest
    • Tinkercad to Fusion 360 Challenge

      Tinkercad to Fusion 360 Challenge



    5 years ago


    I forgot to tell you that (MQTT pub from Wemos D1 Mini to Home Assistant broker) using Home Assistant allow you too to use its pushbullet notification plugin (also this). Then you will automatically be informed on your devices when something happened.

    Have a nice day,

    Miguipda ;-)


    Reply 3 years ago

    Hey buddy, any idea how I could get Alexa to inform me instead? (I simply prefer Echo, that's all.) Also, could u point mebin the right direction when it comes to better power managment? Like could the reed switch pull a low to wake out of a normally executed deep sleep andb instruct in back into that deep sleep after posting a staus change to Blynk? I Would like to modify this for an outdoor mailbox monitor w/ temp sensor. (Granted, you'll probably only be able to get that temp when mailman decides to show up and trigger the magnetic stitch by opening the mailbox lol a flaw i could easily live with!)

    Also, it's a shared mailbox, so instead of living with having many daily false alarms as my nieighbors open and close the lid to check for the mail as well, I've been looking into several answers in the form of light breaking i.r. sensors, weight of mail trigering a micro-switch, precisly placer motion sensor, laser beam interruption by insertion of a hand or the mail being inserted etc. The more i think, the more grandiose the schematic becomes! And the more grandiose, the less likelihood of me actually being able to pull it off (such as a bluetooth cell phone sniffer to anounce when kids are home from school and possibly even unlock the door for them and text me at work. I already installed an Alexa controlled deadbolt)

    As a matter of fact, hiw about sombody does All the work writing me up a nice bit of code? Winner gets much deserved street cred, a happy stranger with little to no shame in begging, who cant deal with manuals...or life really but that is for another forum altogether (I'm also VERY lonely and binge watch Housewives Of (any local supermarket really dorseny matter. But thats for not just a differnt forum but a court mandated one.)

    *And yes, I am *Totally* allowed to tinker with electronics again, except at Vegas and this one resort in Hawaii ....and my gym. ...Errrrr or schools. Airports probably are a no-no as well but i'd have to check with my probarion officer soooooo any takers?


    3 years ago

    Good Work...Thanks :)


    5 years ago

    I am working on an updated version of this project because of the kind recommendations from miguipda1. The new project will utilize the Wemos D1 Mini, Home Assistant, a solar charger for windows, and the Wemos D1 Mini DHT22 sensor shield. I hope you like it, and again so much thanks to miguipda1.