Flushing the Terminal only when APP is online

Hi Blynkers,

i’m looking for a solution to flush the Terminal widged only when the app is online/open.
I have the issue that the Data i send to the Terminal only appears when the app is open and running.

There is an api function:
But i dont want to use that.

Any Ideas?


Hello. Check out


However it requires changes in app…

Serial.println(“App connected”);

seems not to work :frowning:

Do you use local server?

No. Your Server.

Perhaps I am misunderstanding your issue… but what good would having data sent to the terminal, when app is NOT open and running? I mean, you can’t see it.

The Terminal Widget appears to closely emulate any other basic terminal program (e.g. IDE serial monitor) in that fashion… it only displays and buffers real time data sent to it.

What is the purpose you are looking to achieve? Perhaps a different type of historical display is more appropriate?

I’m thinking you would want to get the most recent data from the hardware when the App is connected. I can see some practical cases for this and it’ll be good for performance on the hardware side. As you state, what use is it to send data if the app is not connected? Well, it’s not :smiley: It’s just puts unneeded load on the MCU.

Ok let me try to explain it:
I want to use the Terminal Widged as a log for a alarm System with an movement sensor.
Everytime a movement is triggered a line with the Time via RTC get Send to the Terminal Widged.
But because you dont See the sent Lines when the app isnt Opened i Manually flush the Terminal with a Button Afterwarts when i am in inside the app. And That is that what i want to Automate.

Anybody an idea?

You could try looking at serial buffer options… but Terminal may not the correct method to use for logging.