Device was disconnected 2

Okay, It is working fine via the usb. The uptime is continous. The displays shows 360 and is still going on.

That means I am able to connect to the blynk server ? so the problem must be in the connection? i.e. how I have wired up the temperature sensor, relay board, esp8266 and the arduiono Uno? or it could be in the ESP8266 ? being faulty.

Yes, it means you are connected… so you can try other, more complicated scripts and sensors to test further stability… and if that all works, then the issue resides in your shield link to the Arduino, or it’s Wifi to the router… or power, or who knows what else :confused:

Confirm stability with other scripts first.

Also… what exactly is the model of the shield you use… any links or pictures?

I have tested this few other programs, looks fine.

Actually it was working fine before I connected it to a DHT 22 sensor. So I guess I’ll remove everything and connect it again one by one and see how it behaves.

I am not sure about the model of the wifi shield. its just the ESP8266-ESP-01

I think the ESP8266 has gone faulty and is not being able to hold a stable connection thats why it is behaving all weird. I’ll get a new one and will update this post.

Thanks a lot for your help. Really appreciate it.

I just had the same issue and solved it. What I was doing is checking if my device (ESP8266 12E) was connected to Blynk constantly using the code below. I think it takes about 5-8 seconds to check that. That’s was causing my device to appear “offline” even though it was online.

Below if the code I used and as soon as I removed it device was found by Blynk app. Tried multiple times, that seems to be the issue. Hope it helps someone.

void loop() {
 
  Blynk.run();
  if(Blynk.connect()== false){
  checkConnection();        //custom function I wrote to check wifi connection
  }
}

Again you don’t want to constantly check your Blynk connection status.

A post was split to a new topic: App says device was disconnected continuously