Status "Offline" but actually Online

Blynk app is reporting my device is “Offline”, but actually the device showing regular updates of live sensor data, same as when it’s “Online”. Very strange. ESP32 device with I think all the latest libraries, etc. Anybody seen this?

Hello @HChard.

Android or iOS app? Also what version?

Also what type of connection are you using? It would be nice if you could provide a sketch.

It is iOS app 3.7.6(0).
Sorry, i don’t have the sketch handy atm. It was built using Arduino, using BlynkSimpleESP32.h i believe. ESP32 to WiFi using ESP32 core. It auto-reconnects to WiFi if connection lost, or if Blynk connection lost. Issue seems to be with the Blynk app thinking for some reason my device is offline when it is obviously online.

Is your live sensor data being sent using Blynk.virtualWrite() or via the Blynk HTTP(S) API ?

Without seeing your sketch it’s difficult to know what the cause is.

Pete.

It is via .virtualWrite.
Sorry, don’t have sketch handy right now. Pretty straightforward i think, goes like this:

#include <BlynkSimpleEsp32.h>
...
BlynkTimer Btimer;
...
BLYNK_WRITE(V1)
{
  // Set incoming value from pin V1 to a variable
  int value = param.asInt();
  // Update state
  Blynk.virtualWrite(V1, value);
}
void myTimerEvent1()  
{
    Blynk.virtualWrite(V1, Voltage2);
}

void setup() {
 if (WiFi.status()==WL_CONNECTED) {
    Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass);
    Btimer.setInterval(30000L, myTimerEvent1);
 }
}

void loop() {
  if (Blynk.connected) {
    Blynk.run();
    Btimer.run();
   }
}

@HChard Please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:
```

Copy and paste these if you can’t find the correct symbol on your keyboard.

Pete.

OK, tried to do so for relevant excerpts.
Somehow don’t think it’s the sketch which has been working OK for months. Thinking it’s the app: Why update data display while telling me you’re offline? but who knows.

So to answer the question I asked earlier, you believe that the sketch uses Blynk.virtualWrite rather than the HTTP(S) API ?

Do you have any other devices that use the same Auth token?
Have you ever tried connecting this Blynk device via MQTT?
Have you ever used Node-Red to connect this device to Blynk?

What does your serial monitor show?

Pete.

pls look at code excerpt… using virtualWrite as I said previously.
I dont have sketch operating in front of me atm; so cant see serial monitor. I’m remote from the device and I’m simply looking at Blynk app on my iphone and seeing its status reported as “offline” while it’s updating the sensor readings in real time every 30 sec as programmed.

But you didn’t actually say that did you? You dumped some pseudocode into the conversation instead of simply answering my question.

And, you haven’t answered my other questions either, so I’ll take that as my cue to but-out of the topic and leave you to it.

Pete.

According to what’s on my screen, I had stated 2 hrs ago that it is using virtualWrite.
No other devices using same Auth token.
Never tried MQTT
Never used Node-Red.
The code excerpts are my recollection of all the Blynk-related coding in my sketch, which I do not have with me at the moment.
Thank you