Hardware and App connection check

Hello everyone. I build a smart home with blynk, using esp8266-01 and GSM Shield.
My project works like this; if the esp8266 can connect the internet, it sends the things to the app. If the internet connection of the ESP8266 is disconnected, GSM Shield will be activated automatically and Arduino will start to send SMS. If the application is not activated or the play button in the app is not pressed, or the phone is not connected to the internet, I want the software to recognize it and enable GSM Shield. If at any moment the application is opened and the play button is pressed, I want ESP to be active and send the data to app. Do you know any code for this? Please help me. It’s so important for me.

Generally the App is considered more like an intermittent GUI - a monitor & manual control interface, not critical to the primary autonomous operation of the Hardware <–> Server connection.

Because of this, there is no current commands (as far as I know) that poll the App’s connection state, at least via the Hardware. I am sure Local Server has a way of monitoring the app connection, but I don’t think it is presently documented.

However for the primary server connection status, sketches are often coded to account for the server disconnection via various commands: http://docs.blynk.cc/#blynk-firmware-connection-management

Probably this may fit your needs :

BLYNK_APP_CONNECTED {
}

However it requires app support that will be released in few days.

1 Like