You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 17, 2025. It is now read-only.
I am new in Arduino coding and trying to learn how to control Node MCU 1.0 ESP12E using Firebase DB data.
I am not able to get the "put" event type, from Firebase.readEvent(), using Deprecated DB Secret.
I am able to get the "Streaming Success" message.
Please let me know if I have to change anything, in below code.
// Set these to run example.
#define WIFI_SSID "SSID"
#define WIFI_PASSWORD "Password"
void setup() {
Serial.begin(115200);
// connect to wifi.
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
Serial.print("connecting");
while (WiFi.status() != WL_CONNECTED) {
Serial.print(".");
delay(500);
}
Serial.println();
Serial.print("connected: ");
Serial.println(WiFi.localIP());
Firebase.begin("xxxxxxxx.firebaseio.com", "xxxxxxxxxx");
Firebase.stream("/automation");
if (Firebase.success()) {
Serial.println("Streaming success"); //I am able to get the Success
}
}
void loop() {
if (Firebase.failed()) {
Serial.println("streaming error");
Serial.println(Firebase.error());
}
Serial.print("event: ");
Serial.println(eventType); // this return "type" instead of "put"
if (eventType == "put") { //If I write "type" instead" "put" then path is "/" and No data was returned.
Serial.print("data: ");
Serial.println(event.getString("data"));
String path = event.getString("path");
Serial.println(path);
String data = event.getString("data");
}