diff --git a/GitOTA.cpp b/GitOTA.cpp index 1bb4f7c..822440a 100644 --- a/GitOTA.cpp +++ b/GitOTA.cpp @@ -231,7 +231,7 @@ bool GitRepo::toJSON(JsonObject &obj) { void GitUpdater::loop() { if(this->status == GIT_STATUS_READY) { - if(this->lastCheck + 14400000 < millis()) { // 4 hours + if(this->lastCheck + 14400000 < millis() && !rebootDelay.reboot) { // 4 hours this->checkForUpdate(); } } diff --git a/MQTT.cpp b/MQTT.cpp index 72ae7b8..65eb63d 100644 --- a/MQTT.cpp +++ b/MQTT.cpp @@ -5,6 +5,7 @@ #include "ConfigSettings.h" #include "Somfy.h" #include "Network.h" +#include "Utils.h" WiFiClient tcpClient; PubSubClient mqttClient(tcpClient); @@ -15,6 +16,7 @@ static char g_content[MQTT_MAX_RESPONSE]; extern ConfigSettings settings; extern SomfyShadeController somfy; extern Network net; +extern rebootDelay_t rebootDelay; bool MQTTClass::begin() { @@ -32,7 +34,7 @@ void MQTTClass::reset() { this->connect(); } bool MQTTClass::loop() { - if(settings.MQTT.enabled && !this->suspended && !mqttClient.connected()) + if(settings.MQTT.enabled && !rebootDelay.reboot && !this->suspended && !mqttClient.connected()) this->connect(); if(settings.MQTT.enabled) mqttClient.loop(); return true; diff --git a/SomfyController.ino.esp32.bin b/SomfyController.ino.esp32.bin index 87ab44d..b287284 100644 Binary files a/SomfyController.ino.esp32.bin and b/SomfyController.ino.esp32.bin differ diff --git a/SomfyController.ino.esp32s3.bin b/SomfyController.ino.esp32s3.bin index d87a790..454e929 100644 Binary files a/SomfyController.ino.esp32s3.bin and b/SomfyController.ino.esp32s3.bin differ