From fe717dad7fcf5be8fea171df1d1a1caa2d29da63 Mon Sep 17 00:00:00 2001 From: Blaz Kristan Date: Sun, 22 Oct 2023 17:54:00 +0200 Subject: [PATCH] Possible fix for: - #3382 - #3312 --- wled00/led.cpp | 3 ++- wled00/wled_server.cpp | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/wled00/led.cpp b/wled00/led.cpp index 33fdef11..f3fe2d0b 100644 --- a/wled00/led.cpp +++ b/wled00/led.cpp @@ -165,6 +165,8 @@ void updateInterfaces(uint8_t callMode) sendDataWs(); lastInterfaceUpdate = millis(); + interfaceUpdateCallMode = 0; //disable + if (callMode == CALL_MODE_WS_SEND) return; #ifndef WLED_DISABLE_ALEXA @@ -174,7 +176,6 @@ void updateInterfaces(uint8_t callMode) } #endif doPublishMqtt = true; - interfaceUpdateCallMode = 0; //disable } diff --git a/wled00/wled_server.cpp b/wled00/wled_server.cpp index abf2e530..8b534081 100644 --- a/wled00/wled_server.cpp +++ b/wled00/wled_server.cpp @@ -211,6 +211,8 @@ void initServer() if (verboseResponse) { if (!isConfig) { + lastInterfaceUpdate = millis(); // prevent WS update until cooldown + interfaceUpdateCallMode = CALL_MODE_WS_SEND; // schedule WS update serveJson(request); return; //if JSON contains "v" } else { doSerializeConfig = true; //serializeConfig(); //Save new settings to FS