Replies: 3 comments
-
That library is deprecated and no more support. You should use the new library or stay with that old library version. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Which new one you mean ? |
Beta Was this translation helpful? Give feedback.
0 replies
-
You are already post in the new library repo. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello there,
I am using the firebase esp32 client library successfully for a long time now, but I got a problem in this last update and I guess I am doing something stupid. I was streaming with the library using an esp32 (version 2.0.13) in arduino IDE 2.0.2 with the firebase library until its version 4.3.19. Sadly, I had to update my board version and with that, I was obligated to update the firebase library too. Then something odd happened, the board is connected, it says it is streaming, but the callback function is never called. I'm stuck on that, please help.
Here is the piece of code (working perfectly in 4.3.19 version, but callback function never callled when updated for 4.4.17) :
#include <FirebaseESP32.h>
FirebaseData fbdo;
FirebaseData stream;
FirebaseJson json;
void FirebaseInit(){
//Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);
config.host = "....";
config.api_key = "....";
Firebase.begin(&config, &auth);
Firebase.reconnectWiFi(true);
Serial.println("debug0");
Firebase.setReadTimeout(stream, 1000*60);
Firebase.setwriteSizeLimit(stream, "tiny");
//stream.setResponseSize(1024);
fbdo.setResponseSize(1024);
Serial.println("debug1");
inicio();
Serial.println("debug2");
if(!Firebase.beginStream(stream, "/01019")){
Serial.println("Cant stream");
Serial.println("Reason = " + stream.errorReason());
}
else{
Serial.println("stream deu certo 1");
}
Serial.println("debug3");
Firebase.setStreamCallback(stream, streamCallback, streamTimeoutCallback);
}
void streamCallback(StreamData data){
Serial.println("Stream Data...");
Serial.println(data.streamPath());
Serial.println(data.dataPath());
Serial.println(data.dataType());
Serial.println(data.to());
if(ativo == true){
if(data.dataPath() == "/1"){
if(data.to() > 0){
Serial.println(" Abre 1");
portaUm = true;
}
}
if(data.dataPath() == "/2"){
if(data.to() > 0){
Serial.println("Abre 2");
portaDois = true;
}
}
if(data.dataPath() == "/3"){
if(data.to() > 0){
Serial.println("Abre 3");
portaTres = true;
}
}
if(data.dataPath() == "/4"){
if(data.to() > 0){
Serial.println("Abre 4");
portaQuatro = true;
}
}
if(data.dataPath() == "/T"){
if(data.to() > 0){
tempoAbertura = data.to();
}
}
}
if(data.dataPath() == "/A"){
if(data.to() > 0){
ativo = false;
}
else ativo = true;
}
if(data.dataPath() == "/TS1"){
if(data.to() > 0){
ts1 = true;
}
}
if(data.dataPath() == "/UP"){
if(data.to() > 0){
up = true;
}
}
}
void streamTimeoutCallback(bool timeout){
if(timeout){
Serial.println("Stream timeout ...");
}
Beta Was this translation helpful? Give feedback.
All reactions