firebase-arduino
firebase-arduino copied to clipboard
NodeMcu not getting connected to Firebase and Firebase.error() doesn't return anything
Here is my code : I can surely say that my Hostkey and Authentication Key are correct. DEBUG Level : SSL/HTTP_CLIENT/HTTP_SERVER Arduino version 1.8.5 ESP8266 version the latest Arduino JSON version 5.2.3 I think but not the beta version It's working perfectly since two months ago but now it's giving me struggle. Please help me to fix it.
// FirebaseDemo_ESP8266 is a sample that demo the different functions // of the FirebaseArduino API.
#include <ESP8266WiFi.h> #include <FirebaseArduino.h>
// Set these to run example. #define FIREBASE_HOST "HOSTKEY" #define FIREBASE_AUTH "AUTH" #define wifi_ssid "E" #define wifi_pass "abcdefghijklmn"
void setup() {
Serial.begin(115200);
WiFi.begin(wifi_ssid,wifi_pass);
Serial.print("Connecting...");
while (WiFi.status() != WL_CONNECTED) {
Serial.print(".");
delay(500);
}
Serial.println("Connected");
Serial.println(WiFi.localIP());
Firebase.begin(FIREBASE_HOST,FIREBASE_AUTH);
Firebase.setInt("LEDStatus",0);
pinMode(LED_BUILTIN, OUTPUT);
}
int n = 0;
void loop() { if(Firebase.getInt("LEDStatus")){ digitalWrite(LED_BUILTIN, HIGH); } else{ digitalWrite(LED_BUILTIN,LOW); }
if (Firebase.failed()){ Serial.println("Setting Number Failed..."); Serial.println(Firebase.error()); } delay(1000); }
My output is here : Connecting................................... Connected 192.168.4.191 Setting Number Failed...
Setting Number Failed...
Setting Number Failed...
Setting Number Failed...
Thanks In Advance.....
Am I need to install any nodejs or something else for connectivity?
Can I get the current fingerprint of firebase
I have the same trouble. Firebase.error() method returns nothing!
Also currently struggling with this issues. Any suggestions for fixes or work arounds?
@MatheshSuresh @Gizmodo @CarlvinT try this https://github.com/Chriton/Firebase-Arduino/tree/master/Arduino%20Project -> read the Troubleshooting section or https://github.com/FirebaseExtended/firebase-arduino/issues/380
@MatheshSuresh @Gizmodo @CarlvinT try this https://github.com/Chriton/Firebase-Arduino/tree/master/Arduino%20Project -> read the Troubleshooting section or #380
No, It's not about loosing connection. We want to see error description:
Firebase.setFloat("Temperature_1", temp1); if (Firebase.failed()) { Serial.println(Firebase.error()); }
But serial monitor just print blank line. Firebase.error() method returns nothing!
Even if yout try to change FirebaseArduino.cpp method error(), for example from this
const String& FirebaseArduino::error() { return error_.message().c_str(); }
to this
const String& FirebaseArduino::error() { return "DEMO_ERROR"; }
you still will not see message DEMO_ERROR in serial monitor.
@MatheshSuresh @Gizmodo @CarlvinT try this https://github.com/Chriton/Firebase-Arduino/tree/master/Arduino%20Project -> read the Troubleshooting section or #380
This solution is currently working, Ty.
looked at the fingerprint and it matches the one generated on https://www.grc.com/fingerprints.htm, but I still get 'setting /number failed:' and firebase.error() returns nothing when running the demo program. anyone know why?
I am also facing the same error.