ESP8266IOT Projects

Door Open Alert Notification Message using ESP8266 and IFTTT

Door Open Alert with ESP8266 & IFTTT:

Door Open Alert Notification Message using ESP8266 and IFTTT- In today’s article, I will show you how to make your own Door sensor that alerts your phone without using a GSM module. Previously, I built an IoT based Door security system IoT Door Sensor Reed Switch based Security System using Nodemcu ESP8266”. This project is based on the same electronics. The only difference is, this time I am using IFTTT instead of the Blynk application.

In this tutorial, I will show you how to send a notification message or alert message to your phone without using the GSM module. For this project, we need an ESP8266 Nodemcu module, a Reed switch that will be used for monitoring the door; with the help of a magnetic Reed switch we can easily monitor the door status if it is closed or opened, and then using the ESP8266 WiFi module we can send a notification message to any mobile with the help of IFTTT Applet.


The project installation is pretty simple, as you know the Magnetic Reed Switch consists of two parts; the permanent magnet and the Reed switch. The permanent magnet is fixed on the Door near the edge while the Reed switch is fixed on the Door frame near the permanent magnet. The distance between the magnet and the Reed switch should be enough so that the contacts inside the reed switch can open and close when the door is opened or closed, this is really important. When the door is opened, the contacts inside the Reed switch will disconnect and this will trigger the controller input pin and a result Door Open Alert message will be sent on the desired cell phone number. When the door is opened the Reed switch gives a High signal and when the door is closed the Reed switch gives a Low signal to the controller i.e. ESP8266.This project is very useful for security purposes. You can also improve this project by placing more sensors such as motion sensors e.g PIR Sensor, Microwave sensor which can detect humans behind the walls. But for now, we are only interfacing Reed switch with the ESP8266; so that you can easily understand the basic algorithm for designing this project using the IFTTT.



Interfacing Reed Switch with ESP8266:

Door Open Alert

You can see the circuit diagram is very simple and these are the minimal connections which you will need to test this project. Right now there is no external power supply. If you plan on adding an external power supply then read my other article “IoT Door Reed Switch”. As you know reed switch has two contacts, so one contact is connected with the Gnd pin of the ESP8266 and the other contact of the reed switch is connected with the D1 pin of the ESP8266 Nodemcu Module.



Designing IFTTT Application for Door Notification:

 First open the IFTTT home page if you do not have an account then first create a free account on the IFTTT and sign in to the account in order to make the IFTTT applet. As I already have an IFTTT account; so, I will click on the create button.

Door Open Alert

When we will click on the create button a new window will open in which we will have two options; in the first option we will create the if statement and in the second we will perform the action. It works like, if this “some action” then that “some activity to perform”. Don’t get confused, you will learn everything.

Door Open Alert


Then click on if this and click on the add button and in choose a service search for the web hook.

Door Open Alert

When we click on the webhooks another window will open in which we will select receive a web request.

Door Open Alert

Then we will give a name to the event door and click on the create trigger button. When this event is triggered it will send notification to the IFTTT applet.

Door Open Alert


Now the request is triggered so when this event is triggered what we will do, we will click on the then that

Door Open Alert

When we will click on the then that we will search for notifications in choose a service tab then click on the notification.

Door Open Alert

Now after the selection of the notifications a window will open in which we will select send a notification from the IFTTT App.

Door Open Alert

Then we will write the notification in which we will send the door status notification through the IFTTT applet when the door will be opened and closed. We will write the message the door has beened open and then click on the add ingredient and select the occurred at option.

Door Open Alert

Then click on the web hook in order to get the key we will click on the documentation.

Door Open Alert

Now by clicking on the documentation we will get the key and also we can test our application. First of all, we will write the event name which is door and then enter the values in the value1 and value2 and then click on the test button a notification will be received in our mobile.

Door Open Alert

In order to receive the notification in the mobile we will need to install an IFTTT application in the mobile by simply downloading it from the Play store and login with the same account which we have used in the designing of IFTTT applet. This is really important make sure you use the same email account.



Door Open Alert ESP8266 Code: 

 

 

Engr Fahad

My name is Shahzada Fahad and I am an Electrical Engineer. I have been doing Job in UAE as a site engineer in an Electrical Construction Company. Currently, I am running my own YouTube channel "Electronic Clinic", and managing this Website. My Hobbies are * Watching Movies * Music * Martial Arts * Photography * Travelling * Make Sketches and so on...

2 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button