Closed pelizz closed 2 years ago
It's impossible.
Your code may do something incorrectly or not properly.
You should separate to use FirebaseData object for stream from other functions.
Please see the examples for how to use it properly. https://github.com/mobizt/Firebase-ESP8266/blob/master/examples/DataChangesListener/Callback/Callback.ino https://github.com/mobizt/Firebase-ESP8266/blob/master/examples/DataChangesListener/NoCallback/NoCallback.ino
You should post your code and database structure snapshot.
Even you use the same FirebaseData objeect sharing between stream and other functions. https://github.com/mobizt/Firebase-ESP8266/tree/master/examples/DataChangesListener/SingleDataObject
Everything works and ok.
The library was intensively tested for many years and does not have this kind of issue.
Your code may do something incorrectly or not properly.
You should separate to use FirebaseData object for stream from other functions.
Please see the examples for how to use it properly. https://github.com/mobizt/Firebase-ESP8266/blob/master/examples/DataChangesListener/Callback/Callback.ino https://github.com/mobizt/Firebase-ESP8266/blob/master/examples/DataChangesListener/NoCallback/NoCallback.ino
Sorry ...i used the same object for read and write. I will try with different objects. Thank you.
Sorry...i used the same Firebase object for readStream and for setJSON. I will try .
Thank you. Maurizio
Il lun 14 feb 2022, 01:32 Suwatchai K. @.***> ha scritto:
Your code may do something incorrectly or not properly.
You should separate to use FirebaseData object for stream from other functions.
Please see the examples for how to use it properly.
— Reply to this email directly, view it on GitHub https://github.com/mobizt/Firebase-ESP8266/issues/302#issuecomment-1038496466, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMA3GKVMTSJWDYG2CUY5YOLU3BER5ANCNFSM5OJVK6LA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you authored the thread.Message ID: @.***>
Using ESP8266 with platformio in a Tasmota user driver: 1) I beginStream on a certain path for example /room/config : Firebase.beginStream(firebaseData, "/room/config") 2) I use readStream in loop: if (!Firebase.readStream(firebaseData)) {...} if (firebaseData.streamAvailable()) {..} 3) StreamAvailable is trigged when i write on this path -> OK But Stream available is trigged ALSO when i write on another path; for example /boilerConfig for example using Firebase.setJSON(firebaseData, "/boilerConfig", json1) In this case FirebaseData.dataPath().c_str() is equal to "/" and the data payload is the full tree at path "/room/config"
Using https://github.com/mobizt/Firebase-ESP8266#v3.8.2