FirebaseExtended / firebase-arduino

Arduino samples for Firebase.
Apache License 2.0
943 stars 494 forks source link

Reconnect to firebase not working while in loop #472

Open saiof95 opened 4 years ago

saiof95 commented 4 years ago

In setup() firebase gets connected but after it gets disconnected reconnect function doesnt work.

Arafa-microsys commented 4 years ago

try to add Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH) in failed like that:

if(Firebase.failed())
{
   Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);
}

it will reconnect if the internet lost until the internet back again.

saiof95 commented 4 years ago

Yes tried that one but it never connects and results in failed... I noticed that firebase begin works only in setup section

cayamic commented 4 years ago

I've been having the same problem! Firebase setup seems to work. Serial monitor accuses sending variables once (which doesn't happen in fact) then the connection to Firebase fails.

TrickSumo commented 3 years ago

@saiof95 @cayamic

Try this library by @mobizt to solve this connection issue:- https://github.com/mobizt/Firebase-ESP8266/

For more info, checkout this tutorial:- https://youtu.be/nLzC0-VaqDs

Thanks

saiof95 commented 3 years ago

Thank you... checked, seems good...will surely try it out...

TrickSumo commented 3 years ago

@saiof95 Welcome 😊

cayamic commented 3 years ago

Thank you so much!!!! It's finally working!

I guess the problem was that the Secret Keys are deprecated and the Fingerprint keeps changing all the time. Firebase is suggesting users to set up Firebase Admin SDK. I still don't have any idea how to do that.

Thanks again TrickSumo!

On Fri, Jul 17, 2020 at 8:06 AM TrickSumo notifications@github.com wrote:

@saiof95 https://github.com/saiof95 Welcome 😊

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/FirebaseExtended/firebase-arduino/issues/472#issuecomment-660045118, or unsubscribe https://github.com/notifications/unsubscribe-auth/APKVEVFVRARALZXQT4PAXSTR4AWBPANCNFSM4KL6JDRA .

TrickSumo commented 3 years ago

You're Welcome @cayamic 😊