-
Notifications
You must be signed in to change notification settings - Fork 492
ESP8266 fails to reconnect to FIREBASE #388
Comments
same issue someone can help us? |
for now im just using the |
@ypegua, how does your esp knows that the connection was lost? With what line of code? |
You can do this: |
Unfortunately, in my case I got empty Firebase.error() in about 10 minutes, however I still can update values to the firebase. So in my case Firebase.error() does not mean the connection was lost. And I don't want to reboot my esp every 10 min. |
Me neither, its just a solution until I find the real problem. |
yep it work thx for ESP.reset(); solution but it takes time to reset 2 seconds. but it works, if you find the solution please share it , i do the same . |
of course! |
I have the same problem, the connections fails at random times. |
@ypegua Firebase.begin() only sets the strings inside of the Firebase object, so effectively does nothing, since the values are the same. It DOES NOT RECONNECT.
What's more when I used that in loop() it caused the streaming to fail, not sure yet why. |
Same problem here. Anyone found a solution better than resetting? |
I have the same error. Did anyone try to debug the library? |
I found the error in the library Firebase.cpp => void FirebaseCall::analyzeError
After
|
Hi @philipnguyen8588 |
Thank you very much @philipnguyen8588 , solve the problem. Esp8266 after a while disconnect from firebase. Now my project has 3 days working fine!. |
Firebase fingerprint change again |
Hello Folks, #include <WiFi.h> #define WIFI_SSID "yyyy" #define Relay1 25 //D #define Relay2 26 //D #define Relay3 27 //D #define Relay4 14 //D void setup() digitalWrite(Relay1,HIGH); WiFi.begin(WIFI_SSID,WIFI_PASSWORD);
Serial.println(); Serial.print("connected:"); Firebase.begin("xyz","zyx"); void firebasereconnect() void loop()
val1=Firebase.getString("S1").toInt(); //Reading the value of the varialble Status from the firebase if(val1==1) // If, the Status is 1, turn on the Relay1 val2=Firebase.getString("S2").toInt(); //Reading the value of the varialble Status from the firebase if(val2==1) // If, the Status is 1, turn on the Relay2 val3=Firebase.getString("S3").toInt(); //Reading the value of the varialble Status from the firebase if(val3==1) // If, the Status is 1, turn on the Relay3 val4=Firebase.getString("S4").toInt(); //Reading the value of the varialble Status from the firebase if(val4==1) // If, the Status is 1, turn on the Relay4 } |
Thank you @felossimon !!! |
To find current firebase fingerprint, go to your firebase page with ./json |
Hi there, Use this site to find fingerprint:- https://www.grc.com/fingerprints.htm Steps to update fingerprints:-
static const char kFirebaseFingerprint[] = Done :) Thanks |
Is anyone still having this issue? Even after updating to the most recent commit of the Firebase library and changing the Firebase.cpp file as per @philipnguyen8588 's suggestion, I'm still having a reconnection issue. My ESP8266 will stay connected to Firebase for anywhere between 6 - 24 hours, but then will always at some point have a Firebase connection drop and it won't reconnect. I have confirmed that WiFi is still connected on the ESP8266, it's just the Firebase connection that has the issue. Also, I can't use the ESP.Reset() function when there is a drop, because I use the D0 pin for a sensor on my PCB and sometimes it's low or high depending on the sensor (I think D0 needs to be high during a reset, right?) Any insight would be amazing |
hi, |
Hi there,
|
@philipnguyen8588 it is possible to fix the error of firebase reconnection (editing the FirebaseESP8266.cpp file) in Firebase version of Mobizt? https://github.com/mobizt/Firebase-ESP8266 |
Use Mobizt library. Forget this repo!!!!! |
I am getting an error |
Ironically I came here because I'm having this problem with the Pushing data and getting values is fine, including using |
I am using "Firebase_Arduino_Client_Library_for_ESP8266_and_ESP32" but i couldn't find this function in the .cpp file |
When i turn on the ESP8266 everything works fine for a while, until the connection with firebase for some reason stops, and im having problems reconnecting to firebase again. Can somebody give me an idea to solve this? without manually reseting the ESP8266 (witch kills the purpose of the ESP8266)
this is my code:
`#include <ESP8266WiFi.h>
#include<FirebaseArduino.h>
#define FIREBASE_HOST "XXXXXXX.firebaseio.com" //Your Firebase Project URL goes here without "http:" , "" and "/"
#define FIREBASE_AUTH "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" //Your Firebase Database Secret goes here
#define WIFI_SSID "wifi" //your WiFi SSID for which yout NodeMCU connects
#define WIFI_PASSWORD "XXXXX"//Password of your wifi network
String varCooler;
#define Cooler 14 //D5
int val2;
void setup()
{
Serial.begin(115200); // Select the same baud rate if you want to see the datas on Serial Monitor
pinMode(Cooler,OUTPUT);
digitalWrite(Cooler,HIGH);
WiFi.begin(WIFI_SSID,WIFI_PASSWORD);
Serial.print("connecting");
while (WiFi.status()!=WL_CONNECTED){
Serial.print(".");
delay(500);
}
Serial.println();
Serial.print("connected:");
Serial.println(WiFi.localIP());
Firebase.begin(FIREBASE_HOST,FIREBASE_AUTH);
varCooler = Firebase.getString("Cooler");
Firebase.setString("Cooler","1");
Firebase.setString("Cooler",varCooler);
}
void firebasereconnect()
{
Serial.println("Trying to reconnect");
Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);
}
void loop()
{
if (Firebase.failed())
{
Serial.print("setting number failed:");
Serial.println(Firebase.error());
firebasereconnect();
return;
}
val2=Firebase.getString("Cooler").toInt(); //Reading the value of the varialble Status from the firebase
if(val2==1) // If, the Status is 1, turn on the Relay2
{
digitalWrite(Cooler,HIGH);
Serial.println("Cooler OFF");
}
else if(val2==0) // If, the Status is 0, turn Off the Relay2
{
digitalWrite(Cooler,LOW);
Serial.println("Cooler ON");
}
}`
Cooler is just variable that is use for output
The text was updated successfully, but these errors were encountered: