Getting heartbeat timeouts, but not frequently


I haven’t seen you long time guys, weirdly, I had no issues to bother you with :slight_smile: I have no idea, how it too so long for some issue to come up :smiley:

Anyways, on ESP8266 as WeMos D1mini, with latest libraries and server build (selfhosted), I have started to get reboots, now that is weird, because on serial monitor, there is absolutely no trace that ESP had rebooted, or maybe I did oopsie by putting startup terminal widget prints into the BLYNK_CONNECTED()…? You’ll see:

void loop()

That’s all there is in the loop. Events that actually do something are mostly called via virtual pins, so on user demand - that is, very rarely.
The timer just runs simple function every few seconds, still nothing to cause this behavior.;
// This will print Blynk Software version to the Terminal Widget when
// your hardware gets connected to Blynk Server
terminal.println(F(" "));

terminal.println(F("Blynk v" BLYNK_VERSION ": Device connected"));
terminal.println(F("WeMos D1 mini controlling RC sockets"));
// Now this, prints on reconnect the reboot reason.
// I am not gonna elaborate much, but basically values 1 and 6 would mean power on and reboot by reset pin/reset button respectively.
// but occasionaly - about once a day, sometimes multiple times / day, sometimes 3 days nothing - I get this message to my terminal widget printed, but the reboot reason is 4. continue below the code...
terminal.println("Bootup / reboot reason: \n" + String(ESP.getResetReason()) + " (" + String((*ESP.getResetInfoPtr()).reason) + ")");

// Temporary disabled due to unexpected reboots.
//  Blynk.syncVirtual(V1, V2, V3, V4, V5, V6, V7);

//Just some code for an LED indicator. I believe this os the only part of the code where delay() is used. This has never visibly caused any issues.
analogWrite(D4, 0);
analogWrite(D2, 512);
analogWrite(D4, 1023);
digitalWrite(D3, 1);

That would indicate something like watchdog triggering, or some exception in the code, so I hooked up the ESP to an USB port, and monitored serial output, about 3 days nothing… then:

tail 0
chksum 0xb0
csum 0xb0
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v0.6.1 on ESP8266

OTA Initialized
IP address:
[2952] Connecting to
[2999] Ready (ping: 22ms).
[3152] Time sync: OK
[63917248] Time sync: OK
[81016954] Time sync: OK
[150316965] Time sync: OK
[167416647] Time sync: OK
[213331501] Heartbeat timeout
[213336483] Connecting to
[213341484] Connecting to
                      (Whole bunch of connecting... messages...)
[213536523] Connecting to
[213541524] Connecting to
[213544515] Ready (ping: 22ms).
[213544824] Time sync: OK

Something like this could be caused by some network outage for example, and I am not saying that definitely didn’t happen. But after it finally connected, I got reboot reason 4, which lead me believe there was some kind of reboot reset of the ESP but nothing in the serial output indicates reboot.

I am a bit lost, I don’t know if the reset reason can change during runtime, but I think it has no reason to change, I mean it’s a reboot reason and if no reboot occurred… uh… you got the point…

(I know it might not have anything to do with Blynk, but the thing is… this ESP does basically nothing except Blynk! )

So, um… help? :upside_down_face: anybody? :expressionless: