Open JaysArtworks opened 6 years ago
Same for me, it fails to read and write. Although Firebase.begin gives success. I am using DB Secret.
I'll try this solution later.
@prj-x I've I tried to change the Firebase fingerprint, but nothing...it is working for you? I'm a bit worried, beacuse i have to finish a project for school...
I have tried changing the Firebase fingerprint as well as updating the library itself but no use ? Firebase begins connection without any error but Unable to read data from firebase and streaming also fails, Does Anyone know the solution ?
@prj-x @JaysArtworks @adamrabbani
I Changing the firebase fingerprint, nothing. I'm try get new firebase library complete, but don't work. Help-us!!
@prj-x @JaysArtworks @adamrabbani
@heriveltogabriel @santoshn547 @JaysArtworks
try use old libary for a while.. This link --> https://github.com/RaemondBW/firebase-arduino
but this library doesn't work for stream function just simple function like "get" and "set" is work.
download and edit to newest fingerprint.. (FirebaseHttpClient.h) 6F D0 9A 52 C0 E9 E4 CD A0 D3 02 A4 B7 A1 92 38 2D CA 2F 26
@adamrabbani
Using the old library in esp8266 it is reseting.
it shows the following exception : Exception (28): epc1=0x4020e636 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000
and it continuously resets . I can say that my sketch is error free, Its because of using old library . Does anyone know the solution ? Stuck in a project thats in due.
@santoshn547 can i see the code ?
@adamrabbani
`#include
//needed for library
FirebaseArduino FirebaseStream; FirebaseArduino MyFirebase; String chipId = "123"; WiFiManager wifiManager;
int leds[4] = {D1, D2, D3, D4}; volatile int states[4] = {LOW, LOW, LOW, LOW};
volatile unsigned long bounceTime=0; // variable to hold ms count to debounce a pressed switch String path = chipId + "/status"; String devicePath ;
byte buttons[] = {D5, D6, D7, D8};
void setup() { // put your setup code here, to run once: Serial.begin(115200);
setupLeds();
setupButtons();
attachInterrupt(digitalPinToInterrupt(D5),hello,CHANGE);
attachInterrupt(digitalPinToInterrupt(D6),changeState,CHANGE);
setupLeds();
setupButtons();
wifiManager.autoConnect("AutoConnectAP");
Serial.println("connected...yeey :)");
bool ret = Ping.ping("www.google.com");
if (ret == true){
MyFirebase.begin(firebaseURl,authCode);
FirebaseStream.begin(firebaseURl,authCode);
FirebaseStream.stream(chipId + "/status");
};
}
void loop() {
detachInterrupt(D5); detachInterrupt(D6);
if (FirebaseStream.failed()) { FirebaseStream.stream(chipId + "/status"); Serial.println("streaming error"); Serial.println(Firebase.error()); }
if (FirebaseStream.available()) { FirebaseObject event = FirebaseStream.readEvent(); String eventType = event.getString("type"); Serial.print("event: "); getData(); Serial.println(eventType); if (eventType == "put") { Serial.print("data: "); getData(); } }
byte btn = pressed();
String devicePath;
switch (btn) { case 0: Serial.println("button one pressed"); devicePath = chipId + "/status/001"; doOnOffLed(btn, devicePath); break; case 1: Serial.println("button two pressed"); devicePath = chipId + "/status/002"; doOnOffLed(btn, devicePath); break; case 2: Serial.println("button three pressed"); // devicePath = chipId + "/status/003"; // doOnOffLed(btn, devicePath); break; }
}
void getData() {
FirebaseObject object = MyFirebase.get(path); bool led1 = object.getBool("001"); bool led2 = object.getBool("002");
digitalWrite(leds[0], led1); digitalWrite(leds[1], led2);
Serial.println(led1); Serial.println(led2);
int D1state = led1; states[leds[0]] = D1state;
int D2state = led2; states[leds[1]] = D2state; }
void hello(){
if(millis() > bounceTime)
{
btn1Changed = true;
int state = !states[0];
states[0] = state;
Serial.println(state);
digitalWrite(D1, state);
bounceTime = millis() + BOUNCE_DURATION; // set whatever bounce time in ms is appropriate
}
}
void changeState(){
if(millis() > bounceTime)
{
btn2Changed = true;
int state = !states[0];
states[0] = state;
Serial.println(state);
digitalWrite(D2, state);
bounceTime = millis() + BOUNCE_DURATION; // set whatever bounce time in ms is appropriate
}
}`
The above Sketch was working fine before 5 days.
Hi everyone here is the solution that is working for me.
@santoshn547 sorry the old library doesn't work for stream function but basic function like "get" and "set" is work.
@adamrabbani
Using the below code only returns 0 while the data in firebase is 1.
I am not getting data from firebase it is blank when converted to String.
My Url and Authcode is right.
MyFirebase.begin(firebaseURl,authCode);
FirebaseObject object = MyFirebase.get(path);
bool led1 = object.getBool("001");
bool led2 = object.getBool("002");
Is my code right for the old library ?
@kabir1995 What code are you using to begin connection as well as to get bool from firebase ?
@kabir1995 Thank you very much man! Now the code is working, I did all the steps which you said above, and i deleted the #include
@JaysArtworks What code are you using for reading data from firebase ?
n=Firebase.getString("FAN_STATUS").toInt();
Serial.println(n);
// handle error
if (n==1) {
Serial.println("Fan ON");
digitalWrite(Fan,HIGH);
return;
delay(100);
}
else{
Serial.println("Fan OFF");
digitalWrite(Fan,LOW);
}
@santoshn547 These are the lines of code which i'm using to get the value from Firebase, when the value is 1 the fan turns on and when is 0 it turns off.
@JaysArtworks How do you begin connection to firebase ? How do you give path of where your string is located in firebase ?
@santoshn547 you can see in this example=> https://github.com/firebase/firebase-arduino/blob/master/examples/FirebaseRoom_ESP8266/FirebaseRoom_ESP8266.ino
@kabir1995 Thank you so much friend. Your solution worked and saved my project.
HELLO PERSONAL I HAD A PROJECT WITH ESP8266, WHERE IT WORK PERFECTLY, BUT AFTER THAT CHANGE EVERYTHING WAS ONLY, I COULD CONNECT THE INVENTOR APP WITH THE DATABASE, BUT THE ESP8266 HE SHOWS CONNECTED THE WAFI, BUT IT DOES NOT CONNECT TO THE DATA BANK FROM FIREBASE
@adamrabbani I do not understand why my copila is not what is being the mistake? here in mine of the board error
@Wagnerviana apply @kabir1995 solution written above. I am also facing similar problem and finally kar it's solution work.
Can you confirm that was fixed with #368 ?
@karan13421 let me ask you ? Are you using ESP 8266? THE ARDUINO
@karan13421 THEN KNOW, THAT MY PROJECT, I HAD ALREADY HAD IT UP TO THIS FIREBASE CHANGE, BUT AGR PR APPLY, IN MY RESIDENTIAL AUTOMATION, WHERE I OPEN MY GATE WINDOW, AIR DEFINITIONED TELEVISION, I AM NOT GONNA APPLY. TRY IT TO A HERE CODE OF @adamrabbani BUT TA DAMAGE PLATE ERROR, MY ANCIENT CODE WILL CONNECT TO THE WIFI BUT DOES NOT SEND AND NOR RECEIVE THE FIREBASE INTENDI. SOMEONE WHO CAN HELP ME?
BOMM I CAN CONTAIN EVERYTHING OK,
NO DATA BANK MAKES READINGS BUT I NEED TO TRANSPORT MY DESIGN OF IOT AND AUTOMATION RESINDENTIAL, THAT WAS FUNCTIONING, FOR THAT NEW DEMANDS THAT CREATED, In order for this to work my code within this new version
@Wagnerviana CAN YOU SHARE THE CODE ?
@kabir1995
MUITO OBRIGADO
MUITO OBRIGADO MESMO
SALVOU MEU TRABALHO DE CONCLUSÃO DE CURSO
MUITO OBRIGADO
FUNCIONOU SUA DICA
@prj-x @JaysArtworks @adamrabbani @kabir1995
I have a problem with nodemcu and firebase ......when nodemcu start working it connects to wifi then connects to the firebase then i send int and every thing is working fine ...... but if nodemcu lost it connection to wifi and then reconnect again successfully then it can't connect to firebase again untill i use ESP.restart();
Thanks @kabir1995 . In my case it worked.
@kabir1995 Works like a charm. Thank you.
@AbdelrahmanElazhary im having the same issue, were you able to solve it?
I tried the old library but with the new fingerprint, but still no use... I am going crazy now, what's wrong with my setting???
@leozhoushu perhaps you can try with this updated library. Worked for me. https://drive.google.com/drive/folders/1JtDqKWEGgUi0mp0No9LPBBD_KLZK4BYI?usp=sharing
@leozhoushu these steps worked for me: https://github.com/Chriton/Firebase-Arduino/tree/master/Arduino%20Project#troubleshooting
In my case, 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)
same problem when i read data this works fine but then stops connections with firebas, someone can help us? please.
same problem when i read data this works fine but then stops connections with firebas, someone can help us? please.
Did you find the problem?
Tôi củng thế. Bị dừng stream khi hoạt động được 2 giờ. Và không biết kết nối lại như thế nào
I've tryed many times, but only work when I changed on Arduino IDE > TOOLS > DEBUG LEVEL > SSL + HTTP_CLIENT
Firebase fingerprint change again E2:34:53:7A:1E:D9:7D:B8:C5:02:36:0D:B2:77:9E:5E:0F:32:71:17
https://github.com/FirebaseExtended/firebase-arduino/issues/373#issuecomment-468881058
@felossimon
for me, new fingerprint is not working. but the previous fingerprint ("6F D0 9A 52 C0 E9 E4 CD A0 D3 02 A4 B7 A1 92 38 2D CA 2F 26") still working.
@kabir1995, maybe it start to change by country, yesterday my 6 esp8266 fail to connect to firebase until I change for the new fingerprint. I live in Mexico.
@felossimon maybe. anyway thank you for your information. In the future, if we face problem we can use the new fingerprint.
i used new fingerprint but my nodemcu work for 30 minute, then it's not working, sorry for my bad English
@NguyenHuyHiep check this post: https://github.com/FirebaseExtended/firebase-arduino/issues/388#issuecomment-457472175
Hello, I've fixed the problem permanently following Mr mikrodunya guide....great!!!! In my case I dont care to skip fingerprint verification...so skipping this step in the WiFiClientSecureAxTLS.cpp everything starts working fine again...Nice because my distributed esp8266 HW won't be affected by firebase fingerprint changes. I've just include:
bool WiFiClientSecure::verify(const char fp, const char domain_name) { return true; <---- include this line to skip verification
Again thaks to mikrodunya great job!!! regards
@NguyenHuyHiep check this post: #388 (comment) thankyou so much, it's work for me !
@Nicybru i dont know where did you find his guide but here is the link https://github.com/mikrodunya/Firebase-Arduino-Skip-fingerprint-Verification @mikrodunya thank you.
Please can anyone add this "fingerprint" like a variable so we can define in setup?
Firebase.beginer(FIREBASE_HOST, FIREBASE_AUTH, "E2 34 53 7A 1E D9 7D B8 C5 02 36 0D B2 77 9E 5E 0F 32 71 17");
help me, i can connect to firebase 2019
I've a problem connecting the ESP8266 board to Firebase (sketch is correct), but the board connects to the wi-fi, I've already updated the Arduino Json Library and i reinstalled the Firebase library, but nothing (2 months ago I had no problems with the connection).