Reconnect ESP8266 to Blynk Server

Hello ,
I’m very new in Blynk, i have project for my school, i got my Arduino Uno and ESP8266 01 and DHT22 temperature sensor, everything is running well except when the internet connection is loss and Blynk goes offline and when the internet connection goes back but Blynk stay offline, the only thing can make it online again is by reset the arduino , or power off and on again the arduino or to open the serial monitor. Is there anyways to make Blynk goes back to online automaticaly? i have been searching this topic but it doesn’t solve my problem. any help will be greatly appreciated. sorry for my broken English.

#include "DHT.h"
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>

char auth[] = "EYHnZN41eSCvoZdSyK8CnUciHKUeoAGP"; 
char ssid[] = "xxxxxxx";
char pass[] = "xxxxxxx";
BlynkTimer timer;

//komunikasi ardu dengan ESP01
#include <SoftwareSerial.h>
SoftwareSerial EspSerial(9, 10); // RX, TX
#define ESP8266_BAUD 9600 //untuk komunikasi ardu dgn ESP jgn diganti
ESP8266 wifi(&EspSerial);

#define DHTPIN 2
#define DHTTYPE DHT22
float t, h;

void myTimerEvent()
 t = dht.readTemperature();
 h = dht.readHumidity();

 if (isnan(h) || isnan(t))
   Serial.println(F("Sensor DHT ERROR/Blm Terpasang!"));
   goto awal;

 //serial monitor
 Serial.print("Suhu : ");
 Serial.print(" *C | Humd : ");
 Serial.println(" %");
 Blynk.virtualWrite(V1, t); //kirim suhu ke blynk di virtual1
 Blynk.virtualWrite(V2, h); //kirim humd ke blynk di virtual2

 if (t > 28) 
   //isi email yg mau dirik niotifikasi"", "Notifikasi DHT22 - Suhu melebihi 28C!");
   Blynk.notify("Notifikasi DHT22 - Suhu melebihi 28C!");

void setup()
 Serial.begin(115200); //untuk serial monitor di Arduino IDE


 Blynk.begin(auth, wifi, ssid, pass);
 timer.setInterval(2000L, myTimerEvent);


void loop()

Have a look at this thread…

When you’re looking for solutions, ensure that you’re looking at ones that use the ESP-01 as a Wi-Fi shield rather than as a stand-alone device.

The BlynkSimpleShieldEsp8266 library has a very limited set of functionality compared the the libraries written for the ESP8266 in standalone mode. One of the reasons why I believe that the Arduino/ESP combo is a poor hardware choice.


@dadkinsbali Do you realize that you could do this without the UNO? The 8266-01 has 2-3 accessible GPIOs so for 1 DHT it works fine. The only drawback is you have to make a power supply.