mobizt / Firebase-ESP32

[DEPRECATED]🔥 Firebase RTDB Arduino Library for ESP32. The complete, fast, secured and reliable Firebase Arduino client library that supports CRUD (create, read, update, delete) and Stream operations.
MIT License
415 stars 118 forks source link

Firebase only works a while #64

Closed alvaroaguero55 closed 4 years ago

alvaroaguero55 commented 4 years ago

I'm using the library on ESP32 WROOM32 DevKit, and It works but only a few seconds/minutes and after that stop getting/pushing data to the Firebase Database and stop sending Serial.print("Loop running "); seems to freeze during firebase call.

The code is:

`

include

include "FirebaseESP32.h"

define FIREBASE_HOST "-----------.firebaseio.com"

define FIREBASE_AUTH "----------------------------------------"

define WIFI_SSID "-------------------"

define WIFI_PASSWORD "----------------"

FirebaseData firebaseData;

String sID = WiFi.macAddress();

String sboton1 = sID + "/sboton1";

void setup() { Serial.begin(115200);

WiFi.begin(WIFI_SSID, WIFI_PASSWORD); Serial.print("Connecting to Wi-Fi"); while (WiFi.status() != WL_CONNECTED) { Serial.print("."); delay(300); }

Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH); Firebase.reconnectWiFi(true);

}

void loop() {

Serial.print("Loop running ");

if (Firebase.getString(firebaseData, sboton1)) { Serial.println("Obteniendo el valor de sboton1: "); Serial.println(firebaseData.stringData()); if (firebaseData.stringData() == "on") { Firebase.setString(firebaseData, sboton1, "off");
} }

delay(1000);

}

Firebase issue 1

`

mobizt commented 4 years ago

No. it's not a bug.

You need to check firebaseData.errorReason() to see what happens.

The library was stable as it passes the test for months and years and updates frequently

alvaroaguero55 commented 4 years ago

I updated to the latest version 1.0.4 and is working great for now, thanks!!