RTDB time out #649
Unanswered
yassinhawari
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
in my fonction of updating the RTBD alwys only the first RTDB instruction work and then for the set it alwyas take sometimes and r=then say time out this my code
void updateFirebase(uint16_t fingerID) {
Serial.println("Updating Firebase...");
String path = "/smartOffice/workers/worker" + String(fingerID);
String time = printLocalTime();
Firebase.RTDB.getString(&fbdo, path + "/timeIn");
String timeIn = fbdo.to();
if (timeIn == "none") {
Serial.println("Worker has just arrived");
delay(2000);
if (Firebase.RTDB.pushString(&fbdo, path + "/timeIn", time)) {
Serial.println("Firebase timeIn updated successfully");
} else {
Serial.println(fbdo.errorReason());
Serial.println("Error updating Firebase timeIn");
}
} else {
Serial.println("Worker has just left");
delay(1000);
if (Firebase.RTDB.pushString(&fbdo, path + "/timeOut", time)) {
Serial.println("Firebase timeOut updated successfully");
} else {
Serial.println(fbdo.errorReason());
Serial.println("Error updating Firebase timeOut");
}
}
}
Beta Was this translation helpful? Give feedback.
All reactions