I am using an ESP8266 to get some data off an openDTU (as JSON file) to act as a status monitor.
While getting the data from the openDTU the ESP8266’s software watchdog “bites” every few minutes.
I tried using
ESP.wdtEnable(5000);
in setup() to make the watchdog very forgiving and added several ESP.wtdFeed() commands in the critical area of the code:
ESP.wdtFeed();
http.begin(client, getLink6);
ESP.wdtFeed();
httpCode = http.GET();
getWarOkay = false;
ESP.wdtFeed();
if ( httpCode > 0 ) {
payload = http.getString();
getWarOkay = true;
payloadAll = payloadAll + "<br><br>httpCode: " + String(httpCode) + "<br>###" + payload + "### END-PAYLOAD4 ###";
}
else { anzFehler++; textFehler = textFehler + "Block1"; }
ESP.wdtFeed();
http.end();
Still it will trigger a reboot – maybe a little less often than earlier
Serial monitor output is: rst cause:2, boot mode:(3,6)
I guess I will not be able to speed up the response time of the openDTU easily – Any suggestions how to deal with the issue?