So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By BjornJ
#72976 Good idea, I will try this. Thanks.

gdsports wrote:After mqttClient.disconnect(), wait for both the mqttClient and the tcpClient to report not connected. Then do an additional 50 ms delay before going to deep sleep. Works for me.

Code: Select all  if (!mqttClient.connected() && !tcpClient.connected()) {
    // Allow time for final FIN ACK
    delay(50);
    deepsleep_normal();
  }