From 67d94629886ff37ef72d4f3baac0795e3cb01543 Mon Sep 17 00:00:00 2001 From: uajqq <46248396+uajqq@users.noreply.github.com> Date: Tue, 14 Jan 2025 12:08:11 -0500 Subject: [PATCH] Fix for MQTT server error -- catches error & logs --- skins/Belchertown/js/belchertown.js.tmpl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/skins/Belchertown/js/belchertown.js.tmpl b/skins/Belchertown/js/belchertown.js.tmpl index a9a41879..1121a096 100644 --- a/skins/Belchertown/js/belchertown.js.tmpl +++ b/skins/Belchertown/js/belchertown.js.tmpl @@ -1727,7 +1727,12 @@ var mqtt_payload = ""; // New message from mqtt, process it function onMessageArrived(message) { belchertown_debug("MQTT: " + message.payloadString); - update_current_wx(message.payloadString); + try { + update_current_wx(message.payloadString); + } catch(e) { + console.log(e) + return + } mqtt_payload = jQuery.parseJSON(message.payloadString); }