diff --git a/src/main.cpp b/src/main.cpp index eca5ea7..c47fe18 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -327,6 +327,8 @@ void suspend(uint32_t secondsToSleep) { //properly disconnect from the MQTT broker iot.mqtt.disconnect(); + Serial.printf("going to deep_sleep for %u seconds", secondsToSleep); + esp_sleep_enable_timer_wakeup(1000000LL * secondsToSleep); const uint64_t ext_wakeup_rotarybtn_mask = 1ULL << rotaryPinButton; // const uint64_t ext_wakeup_sensor_mask = 1ULL << sensorPin;