From a6dea2b32fcd4a5eec31c3d88542d665b5363fd3 Mon Sep 17 00:00:00 2001 From: jhartworks Date: Wed, 22 Apr 2026 10:31:30 +0200 Subject: [PATCH] Add validation checks for ParseSetpointCacheCategoryID in MqttSync method to ensure proper category and variable existence --- Monitoring Client/module.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Monitoring Client/module.php b/Monitoring Client/module.php index d21f93b..e1eb438 100644 --- a/Monitoring Client/module.php +++ b/Monitoring Client/module.php @@ -126,6 +126,18 @@ class MonitoringClient extends IPSModule { $cacheCat = $this->ReadPropertyInteger("ParseSetpointCacheCategoryID"); + if ($cacheCat == 0){ + return false; + } + + if (IPS_CategoryExists($cacheCat) == false){ + return false; + } + + if (IPS_VariableExists($source) == false){ + return false; + } + // ensure server instance exists if(!IPS_InstanceExists($server_id)) { return false;