[SOLVED] Check that Blynk app is running (for email notifications)

G’day,
Am using the email option to tell me when certain conditions are met in the ESP. But of course can only get the email if blynk app is running.
Is there a simple way of determining if my blynk app is up and running.
Tks

I don’t believe that it true… you should be able to send email notifications as long as the hardware is communicating with the server, regardless of app status… but you do need to specify the email address in the sketch command.

Blynk.email(“your_email@mail.com”, “Subject”, “My message here.”);

It is reportedly coming soon.

Do you actually mean the project is running? Using the little play icon in the top corner of the app?

If so… then es you are correct, the hardware will not send an email if the project is paused in the app. The little play icon tells the server to act on hardware commands.

2 Likes

G’day,
Tks for the replies, seems that BLYNK_APP_CONNECTED is the solution.
Will wait a few days for this new option.

I am actually a little surprised at this… I guess I hadn’t tested it well enough awhile back :blush:

And a bit concerning. I can understand notifications on the phone and such… But email is generated by the server not the app, so why the limitation? @Dmitriy is there a technical reason or has it just not been implemented yet for functionality when app is offline?

Email would make a great alert notification to multiple people in system critical situations like flood sensors etc… but if it hinges on the app being active, then that is a significant flaw.

G’day,
Is it possible to write to a Value Display Setting, then a few seconds later read the Value Display Setting to confirm that the app is up and running.

Since all virtual pin data like that goes through the server… I would guess not… but I have been proven incorrect before :wink:

No. This is initial design. You make app. Run it. And it works. Stopped project - not ready project.

1 Like

Thanks Dmitriy, I get it now… a bit like a security dongle, without all the pieces in play you only get partial functionality makes sense. :+1:

G’day,
Been a few months now, and was wondering if there is any documentation on how to use BLYNK_APP_CONNECTED.
Tks

Hello.

Not much actually, however we have an example - https://github.com/blynkkk/blynk-library/blob/master/examples/More/AppConnectedEvents/AppConnectedEvents.ino

G’day Dmitriy,
Did the new library etc and got the App connected/disconnected working OK.
But it does not solve my email problem.

The App connected/disconnected only triggers when there is a change of app state.
So after a ESP8266 reset cannot determine the app status, unless a manual action at the phone it performed.

Hence will never know if the app is disconnected causing non-sending of emails.