Smart Door Lock application using nodeMCU – esp8266 Reviewed by Momizat on . This is article is part of controlling Home Appliances using android app. In this  tutorial, we will go step by step of creating android app and controlling(loc This is article is part of controlling Home Appliances using android app. In this  tutorial, we will go step by step of creating android app and controlling(loc Rating:
You Are Here: Home » IOT » Smart Door Lock application using nodeMCU – esp8266

Smart Door Lock application using nodeMCU – esp8266






This is article is part of controlling Home Appliances using android app. In this  tutorial, we will go step by step of creating android app and controlling(lock/unlock) door over wifi using nodeMCU(esp8266-12e).


 

[InsertAddForPost]
In Our previous  tutorials we built an android app to control GPIO of nodeMCU using button press or voice command, but in this tutorial instead of button we will scan  QR code to open the door.

Hardware Needed:

1. Node MCU V1.0 or ESP8166-12E
2. OLED
3. Mobile(Android)
4. USB Data Cable

 

Section 1: Android Application

step 1: We have created the android application using MIT App Inventor.

to scan QR code, you need use QR /Bar Code Scanner component from left column of the app inventor. and create GUI like bellow, of course you can customize GUI according to your need.

web01

 

step 2: Prepare QR code and secret String. You can use lots of online tool site to generate your secrete QR code. I have used http://goqr.me/ to generate QR code.

  • 2.1  Below is the QR code for the text string “www.facebook.com/eeeg.ch”, to unlock the Door.

QRcode

  • 2.2 In this application we used text content “noway” to Lock the door and below the QR code for the same.

noway

 

  • 2.3 We can build Random numbder from https://www.random.org/strings/ .and we used string from website generate “OgTJ2wQTwLoVUSRARWML”. Use this string sending to nodeMCU for Unlock the door.
  • 2.4 We used string “noway” sending to nodeMCU for Lock the door.

[InsertAddForPost]
Arduino Sketch for NodeMCU:

// Match the request

 

  • 2.5 set LED when nodeMCU recive code from mobile.

Download The Full  Code for ESP8266/nodeMCU Here.

 

Section 2:

Android Application Code:

step 3: Build block @http://ai2.appinventor.mit.edu/

  • 3.1  when button click for send data to nodeMCU, using web component.

web02

  • 3.2 when Web Got text from nodeMCU.web03

 

Section 3: Circuit

Ciruit Digram For our Project is like below . We have used one LED instaed of actual Door lock just for demonstrate purpose. You can buy solnoid door look online and use it instead of LED.

Circuit

 

This below video will guide you through the objective of this tutorial.

 

You Can download the app from this links to installing to mobile, by clicking here.

Have a good time follow your mind.

About The Author

I am Technical Instructor at faculty Of Engineering and Technology Panyapiwat Institute of Mangement in Thailand. I had graduated in B.Eng(Electrical engineering). I love to work in new technology and write articles to teach others.

Number of Entries : 5
  • Wanchai. M.

    It’s Interesting Application.
    May interfere Owners of Application help teach me for The new knowledge.
    Keep me in mind.
    Thank you.

    • Jukrapun Chitpong

      Thank you for interested my article.
      You can practical follow my this article and new artical comming soon.
      However you can tell me if you’re not understand this application.

  • Rakesh arora

    भाई अगर हो सके तो प्लीज मुझे बता दो कि esp WiFi modual 8266 Ki gpo pin 0 & gpo pin 2 से मुझे led ऑल ऑफ करनी है तो कैसे होगी प्लीज बताएं धन्यवाद

  • Aldo

    hi friend!!
    thanks a lot for you.
    Aldo

Scroll to top