(Credit : Indian LifeHacker)

 

Hello,

In this tutorial,we are going to learn how to make smart home using  Nodemcu (ESP8266), which is able to control electronic Device (like fan, light etc.) through internet.

 


Hardware Required :

  1. NodeMCU (ESP8266)

  2. Relay (Any One)
  1. Jumper Wires (As per need)

Software Required :

  1. Blynk App

  2. Arduino IDE


Step : 1

  • Download the Blynk app on your smartphone and create an account
  • Create a new project, select  "NodeM​CU" from the list of hardware.
  • Add a widget to your control panel by clicking on the plus icon on the top
  • Email Auth Token for record, it will needed later in 4th Step.
  • Select the Button widget,and double tap on it to edit its settings.​

Step : 2 

Join the wires in Nodemcu  using diagram

Note: This Diagram is only for 1 channel, You can use more channel as per your requirement.

  • The 5v of the power  to the Vcc of the relay board.
  • The GND to the GND of the relay board
  • The D1 of the NodeMCU to the IN of the relay board

Step : 3

Arduino IDE Configuration (Adding ESP8266 Board Manager)

  • Go to (File  Preferences) In 'Additional Boards Manager' paste this link http://arduino.esp8266.com/stable/package_esp8266com_index.json
  • Go to "Tools  Board  Boards Manager", type "ESP8266" and install it.
  • Go again to "Tools  Board" and select "Generic ESP8266 Module".
  • Find Arduino Code and library from here https://goo.gl/sizPGA
  • Copy Library in "DocumentsArduinolibraries" and unzip it.
  • Open Code
  • Replace Wifi SSID and Password in coding with yours.
  • Replace Auth Token which we have mailed in 1st step
  • Upload Code to NodeMcu ESP8266

Now Your Device is Ready To Use.