Skip to content

A beginner-friendly IoT home automation system using NodeMCU ESP8266 and Blynk Cloud. Control up to 4 appliances remotely via smartphone using virtual pins and Wi-Fi.

Notifications You must be signed in to change notification settings

apurboislam/IoT-Home-Automation

Repository files navigation

🔌 Smart IoT Home Automation with Blynk & NodeMCU ESP8266

License: MIT Platform Made with Arduino Blynk Cloud

GitHub Stars GitHub Issues GitHub Pull Requests Repo Insights

Build your own smart home automation system using a NodeMCU ESP8266 and the Blynk IoT platform. This project lets you control home appliances like fans or lights using your smartphone — from anywhere.


📚 Table of Contents


✨ Features

✅ Control up to 4 devices via smartphone
✅ Remembers relay state after reboot (via cloud sync)
✅ Uses Blynk cloud & app (free)
✅ Modular and OTA-ready firmware structure
✅ Easy for beginners to set up and understand


🧰 Required Components

Component Quantity Description
NodeMCU ESP8266 1 Wi-Fi enabled microcontroller
4-Channel Relay Module 1 For controlling appliances
Jumper Wires As needed For connecting modules
Power Supply (5V, 2A) 1 To power the NodeMCU and relay board
AC Appliances 1–4 Fan, Light, etc.

🔌 Circuit Diagram & Connections

Relay Pin Connect To (NodeMCU)
VCC VIN (5V)
GND G
IN1 D1
IN2 D2
IN3 D3
IN4 D4

💡 Optional: Add an LED to D0 and 3.3V to indicate Wi-Fi connection status.


☁️ Setting Up Blynk Cloud

  1. Go to https://blynk.cloud

  2. Log in or sign up

  3. Create a new template and configure:

    • Virtual pins: V0 = State Memory, V1–V4 = Control pins
  4. Copy these details into your Arduino sketch:

#define BLYNK_TEMPLATE_ID "Your_Template_ID"
#define BLYNK_TEMPLATE_NAME "Your_Template_Name"
#define BLYNK_FIRMWARE_VERSION "1.0.0"

🧪 Installing Arduino IDE & Uploading Code

✅ Install Arduino IDE:

Download Arduino IDE

✅ Add ESP8266 Board Support:

  1. Go to File → Preferences

  2. Add this to “Additional Board Manager URLs”:

    http://arduino.esp8266.com/stable/package_esp8266com_index.json
    
  3. Go to Tools → Board → Boards Manager

  4. Search for esp8266 and install it

✅ Upload Code:

  • Open the .ino file from this repo
  • Replace your Template ID, Wi-Fi SSID, and password
  • Select Board: NodeMCU 1.0 (ESP-12E Module)
  • Hit Upload

📲 Connecting Device to Blynk App

  1. Install Blynk IoT AppGoogle PlayApp Store

  2. Log in and tap + to add a device

  3. Select “Discover Nearby”

  4. Choose your NodeMCU device

  5. Enter Wi-Fi credentials

  6. Configure the device dashboard:

    • Add buttons for V1–V4
    • Add switch for V0 to enable state memory

❓ Troubleshooting

Problem Solution
Device not detected Ensure NodeMCU is in pairing mode and powered on
Relay not triggering Check wiring and pin mapping
Frequent reboots Use a stable 5V 2A power supply
Upload errors Verify USB cable, COM port, and correct board selected
Blynk app not responding Double-check virtual pin assignment and template sync

🧑‍💻 Contributing

We welcome contributions of any kind:


📄 License

This project is licensed under the MIT License. See the LICENSE file for details.


👤 Author

Developed by Apurbo Islam For more cool projects: On GitHub

🚀 Let’s build the future of connected homes, one relay at a time!


About

A beginner-friendly IoT home automation system using NodeMCU ESP8266 and Blynk Cloud. Control up to 4 appliances remotely via smartphone using virtual pins and Wi-Fi.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published