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 connected #79

Closed am-canes closed 4 years ago

am-canes commented 4 years ago

Is there any way to know if firebase is connected? I would like to send set and get just if firebase is connected. And is there any way to know the result of firebase.begin? Like an error if firebase host or authentication are incorrect.

Thanks.

mobizt commented 4 years ago

The function Firebase.begin is just save the authentication credentials.

All examples provided showed the error debugging in every Firebase calls.

https://github.com/mobizt/Firebase-ESP32/tree/master/examples

am-canes commented 4 years ago

Ok, thanks @mobizt. So I just need to call .begin when I start the code, it will have the credentials saved even if the wifi is disconnected and connected again later?

mobizt commented 4 years ago

As you seen, the function Firebase.begin takes the Firebase authentication credential, no WiFi begin operation involved unless you set the reconnect function which will call reconnect function of WiFiClient core library periodically.

am-canes commented 4 years ago

Yes, I understood it. I am handling with wifi reconnect in another part of my code. Thanks