Open TONYCHOU81905 opened 11 months ago
I'm also experiencing this .... for two years... but now debugging more properly..
it looks like sometimes callback is not invoked but then it is on subsequent messages... so basically messages are lost...
but it also happens that from some point on no messages arrive anymore... days, weeks or months to happen and then reboot of ESP device is needed.
PS: also check this https://github.com/knolleary/pubsubclient/issues/922 (Callback function stop working after some time on ESP8266 at least.)
Hi everyone,
I faced a strange problem. my callback function fail sometimes within a day and sometimes a week or a month. I checked Wi-Fi, and it worked fine. In my loop, I checked the Wi-Fi status and the mqtt connection status, but when this happens, the debug view shows nothing, which means it doesn't notice that the mqtt is not connected. So I have no idea how to solve this problem.
if anyone faced this problem before, please give me a hand. Thank you in advance!
------loop function------ `void loop() {
if (init_statce == 1) { checkButton(); if (millis() - time2setwifi > 2000) { Serial.println("WAIT_TO_SET_FreeHeap : " + String(ESP.getFreeHeap())); checkButton(); time2setwifi = millis(); } delay(500); } else {
} } ` -----connect AWS function-----