firebase-arduino icon indicating copy to clipboard operation
firebase-arduino copied to clipboard

streaming error firebase

Open nheoo opened this issue 6 years ago • 3 comments
trafficstars

Two days I did everything to connect to the firebase but I couldn't connect. below is my code. Looking for help plz:

#include <ESP8266WiFi.h> #include <FirebaseArduino.h>

#define LedPin 16

#define FIREBASE_HOST "nodemculed-32c6b.firebaseio.com" #define FIREBASE_AUTH "E7R2aboxbpvddXEDY9MBPLxyU2b4ZfNWtOpqXoLs" #define WIFI_SSID "conmabachbach" #define WIFI_PASSWORD "dung3gdi"

void setup() { pinMode(LedPin, OUTPUT); 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(FIREBASE_HOST, FIREBASE_AUTH); Firebase.stream("/Myhome"); } void loop() { if (Firebase.failed()) { Serial.println("streaming error"); Serial.println(Firebase.error()); }

if (Firebase.available()) { FirebaseObject event = Firebase.readEvent(); String eventType = event.getString("type"); Serial.print("event: "); Serial.println(eventType); if (eventType == "put") { String path = event.getString("path"); String data = event.getString("data"); Serial.println(String("data: ") + data); if (path.equals("/light/value")) { if (data.equals("off")) { digitalWrite(LedPin, HIGH); } else { digitalWrite(LedPin, LOW); } } } } }

nheoo avatar Apr 21 '19 09:04 nheoo

Try connecting without the Auth Token. Make sure you are using DB secret key and not the API key

xritzx avatar Aug 04 '19 17:08 xritzx

Which is error? @nheoo

willyamcts avatar Jan 07 '20 17:01 willyamcts

also getting same "streaming error"

Serial.println(Firebase.error()) returns blank message

kimpoy010 avatar Jul 12 '21 23:07 kimpoy010