Home Automation using Node MCU ESP8266 and Blynk 2.0

Hi All,

I am new in this field and this is the first time I’m working with ESP8266 module, so that why there are so many problem I’ve faced during this project making.

So currently I’m working in a home automation project using ESP8266 and Blynk 2.0 app. I have configured both Blynk web dashboard and mobile app. Both are in sync also. But I’m not able to control my relay using Blynk app. Though my code is configured with the auth code, ssid and password. Got response also in Arduino Serial port that Wi-Fi is connected. But still my relay is not responding. I think I make some silly mistake but I can’t find and figure out these. Please find the below attachment for my code and circuit diagram and please help and guide me to resolve this issue.

Arduino Code :

[Unformatted partial code removed by moderator]

Serial Monitor Output :

SDK:2.2.2-dev(38a443e)/Core:3.0.2=30002000/lwIP:STABLE-2_1_2_RELEASE/glue:1.2-48-g7421258/BearSSL:6105635
[73] Connecting to B***********
fpm close 1
mode : sta(::25:35::)
add if0
scandone
state: 0 → 2 (b0)
state: 2 → 3 (0)
state: 3 → 5 (10)
add 0
aid 1
cnt

connected with B***********, channel 1
dhcp client start…
ip:192.16*..,mask:25*...,gw:192...*
[6367] Connected to WiFi
[6367] IP: 192...*
[6367]
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ / '/
/
//_, /////_
/
__/ v1.0.1 on ESP8266

[6444] Connecting to blynk.cloud:80
[6606] Ready (ping: 59ms).
pm open,type:2 0

Circuit Diagram :
I use 4 channel 5v relay Relay. In Relay board IN1,IN2,IN3,IN4 pin are connected accordingly with D1,D2,D5 and D6 and powered my relay through my Arduino UNO 5v output.

And finally blynk template Data stream and Dashboard :

If anything is needed please let me know and Please help me to resolve the issue.

Thanks in advance. :slight_smile:

1 Like

@Atanu please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:
```

We also need your FULL sketch, not just the first few lines.

You should also format your serial monitor output with triple backticks.

Pete.