-
Notifications
You must be signed in to change notification settings - Fork 492
Could I set key and listen a stream simultaneously? #193
Comments
Hi hawkhsieh,
Than you need to check the variable Hope it can help! |
I am having similar issues. Specifically, a crash if I try to write anything to a FirebaseArduino that I am streaming from. Are you using the "Firebase" class (from Firebase.h/cpp) instead of FirebaseArduino? If so, could you share how you set this up? Thanks. |
The issue still existing i had is we could not do use both stream and get or push, or put . put,post,get durring set streaming it will be get crash. (ESP8266)/ Seem Firebase had implements of esp8266httpclient but they still fixing this issue. |
I was able to stream using two different
It would be nice to have something simpler like described in #159 |
I think the issue this is referring to, as mentioned in a couple of other issues, is the inability to push/get while maintaining an open stream. Not having two simultaneous streams. For this case, I have tried having two FirebaseArduino instances and have yet to get it to work. |
@RaemondBW we did manage to get it work with two I'd be very interested to see if that snippet crash for people noticing that behavior, gather proper debugging and version information and try to reproduce the issue. |
@proppy Here is an example sketch that exhibits the issue:
And the resulting error:
the stream starts successfully. When I try to write, the issue comes up. |
I just tested the code at Comment #48 and it results in the same crash. |
@RaemondBW can you confirm which version of the arduino core you're using? |
@proppy I tested with arduino 1.6.12 and the latest release of FirebaseArduino |
@RaemondBW which version of the Arduino ESP core https://github.com/esp8266/Arduino? |
@proppy sorry, ESP Core version 2.3.0 |
merging with #48 |
I am trying to solve the problem using two different FirebaseArduino instance, like described in the comments. It works for some time, but after some minutes the stream keep working but the set doesn't work anymore. |
@am-canes, I am having exactly the same issue. In the evening I will try to use three separate firebase clients: one for stream, one for reading and one for writing. |
@MrSuhov Please, let me know the results of your tests. |
2 years ago my first comment researching use firebase with arduino. i think now this library is ok ? |
Unfortunately I am alwas running out of heap (Exception 29) using three clients - dead end. 10:20:56.260 -> [HTTP-Client] connect. already connected, try reuse! After these errors nither .getString nor .setInt dont work with Firebase client. 10:32:37.677 -> [HTTP-Client] connected to idhomepulse.firebaseio.com:443 Stream client (FirebaseStream) keep working as expected all that time. UPD. Sketch that reproduces the issue: FirebaseArduino FirebaseStream; void setup() { Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH); void loop() { if (FirebaseStream.available()) { void ConnectToPrefNetwork() { |
Since this change: What you are asking for is supported. Both streaming and setting keys. You don't need two instances, just use one. Make sure to use 2.4.1 Arduino core: |
Also note: using 2.4.1 Arduino core is absolutely essential because simultaneous HTTPS connections did not work properly before resulting in random reboots and random crashes due to bugs in HTTPS library not able to support more than one https context at the same time. |
@kotl thanks a lot! Yes, the core is 2.4.1. |
@kotl I was already using core 2.4.1. Now I am using just one FirebaseArduino instance but the problem is still happening. I am using set and stream in to different places. I set the firebase value when temperature sensor value read by AD converter changes. And I have the stream in the loop waiting for events too. |
The error that occurs when firebase fails is: [HTTP-Client] connect. already connected, try reuse! |
Give it a second try. The connection will be re-established. At least in my case it works. |
I combine the FirebaseDemo and FirebaseStream to set a key and watch a key simultaneously.
The key is set successfully.
But it doesnt show "event:" on UART about stream function.
revesion is 854bb0c
source code is below:
The text was updated successfully, but these errors were encountered: