ESP-MQTT-JSON-Digital-LEDs icon indicating copy to clipboard operation
ESP-MQTT-JSON-Digital-LEDs copied to clipboard

Animation Freezes upon internet/wifi disconnection

Open insane2subro opened this issue 6 years ago • 1 comments
trafficstars

My problem is when ever the wifi/internet disconnects the animation freezes only to resume after the wifi/internet is back.

In India where data disconnection is very frequent with all ISPs it is a big problem, is there any way out of this?

insane2subro avatar Jan 11 '19 12:01 insane2subro

@insane2subro You can add a conditional in the main loop function to try and reconnect to WiFi.

This is what i've done and it works fine.

  if (WiFi.status() != WL_CONNECTED) {
    delay(1);
    Serial.print("WIFI Disconnected. Attempting reconnection.");
    setup_wifi();
    return;
  }

bryanberger avatar Jan 18 '19 16:01 bryanberger