From 68c10a43343110c4e8efc3e7edc5e3a7e5086179 Mon Sep 17 00:00:00 2001 From: Max Prokhorov Date: Sat, 9 Feb 2019 15:42:44 +0300 Subject: [PATCH] Allow saving heartbeat settings from web --- code/espurna/mqtt.ino | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/espurna/mqtt.ino b/code/espurna/mqtt.ino index 4c8f3e56..c44c36b0 100644 --- a/code/espurna/mqtt.ino +++ b/code/espurna/mqtt.ino @@ -316,7 +316,9 @@ unsigned long _mqttNextMessageId() { #if WEB_SUPPORT bool _mqttWebSocketOnReceive(const char * key, JsonVariant& value) { - return (strncmp(key, "mqtt", 3) == 0); + if (strncmp(key, "mqtt", 3) == 0) return true; + if (strncmp(key, "hb", 2) == 0) return true; + return false; } void _mqttWebSocketOnSend(JsonObject& root) {