In this IoT project, I have shown how to make IoT-based Smart Home Automation using Multiple NodeMCU ESP8266 network to control all the home appliances from the pushbuttons & Blynk App.

If the internet is not available, then you can control the home appliances from manual switches. During the article, I have shown all the steps to make this smart home system.

In the tutorial video, I have explained all the following steps in details.

  • Connect multiple NodeMCUs with the same Blynk account.
  • Control home appliances with WiFi (Blynk App)
  • Control home appliances with manual switches.
  • Monitor real-time feedback in the Blynk App.
  • Control home appliances manually without internet.

Required Components:

For each room, you just need a relay module, pushbuttons & NodeMCU to make this smart home project.

Required Components for the PCB:

1. Relays 5v (SPDT) (8 no)

2. BC547 Transistors (8 no)

3. PC817 Optocuplors (8 no)

4. 510-ohm 0.25-watt Resistor (8 no) (R1 - R8)

5. 1k 0.25-watt Resistors (10 no) (R9 - R18)

6. LED 5-mm (10 no)

7. 1N4007 Diodes (8 no) (D1 - D8)

8. Push Buttons (8 no)

9. Terminal Connectors

10. 5V DC supply

Required Software:

1. Arduino IDE

2. Blynk App

Circuit Diagram of the ESP8266 Blynk Project:

The circuit is very simple, I have used the GPIO pins D1, D2, D5 & D6 to control the 4 relays.

And the GPIO pins SD3, D3, D7 & RX connected with switches to control the 4 relays manually.

I have used the INPUT_PULLUP function in Arduino IDE instead of using the pull-up resistors.

I have used a 5V mobile charger to supply the smart relay module.

Multiple NodeMCU ESP8266 Network:

Now if you have multiple rooms, then you have to repeat the same circuit for each room.

There is no limitation on the number of NodeMCUs that can be connected.

All NodeMCU will connect to the Blynk server using the same Authenticate Token. So we can control each NodeMCU independently from Blynk App.

Control Relays With Internet Using Blynk:

If the NodeMCUs are connected with the WiFi, then you can control the home appliances from Blynk App.

You also use multiple smartphones to control the appliances with Blynk App. For that, you have to log in to the same Blynk account from all the smartphones. In this way, all smartphones will be sink to the Blynk server.

You can control, monitor the real-time status of the relays from anywhere in the world with the Blynk App.

Control Relays Using Push-buttons:

If the WiFi is not available, you can control the relays from the pushbuttons.

The NodeMCU will check for the WiFi after every 3 seconds. When the WiFi is available, the NodeMCU will automatically connect with the WiFi.

Configure the Blynk App for the Multiple NodeMCUs:

1. Install the Blynk App from the Google play store or App store. Then create an account.

2. Sign In and Tap on the New Project.

3. Give the name to the project, select NodeMCU, Connection type will be WiFi. Then tap on Create.

3. Blynk will send an authentication token to the registered email id. Tap on OK.

Add the Button Widgets in Blynk App to Control Relays:

Then add 8 button widgets from the Widget Box to control the 8 relays.

Create buttons with V1, V2, V3, V4, V5, V6, V7, V8 pins to control the relays.

Select the Mode as Switch for all the buttons.

**Here I have used an active low Relay module, so to turn ON the relay we have to send “0” and “1” to turn OFF the relay.

I have used virtual pins V1, V2, V3, V4 to control the first relay module (Room-1)

And V5, V6, V7, V8 to control the second relay module (Room-2)

I have explained all the details in the tutorial video.

Code for Blynk ESP8266 Home Automation:

In the Tutorial video, I have explained all the steps to program the NodeMCU ESP8266...

Read more »