From 08e55c604c7cdfd221297a193bb3f38acc07ce37 Mon Sep 17 00:00:00 2001 From: jhartworks Date: Wed, 22 Apr 2026 12:45:41 +0200 Subject: [PATCH] Enhance MqttSync call in MonitoringClient to improve setpoint synchronization and logging --- Monitoring Client/module.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Monitoring Client/module.php b/Monitoring Client/module.php index e1eb438..1844949 100644 --- a/Monitoring Client/module.php +++ b/Monitoring Client/module.php @@ -273,13 +273,15 @@ class MonitoringClient extends IPSModule { $changedtime = $varInfo["VariableChanged"]; $varname = IPS_GetName($childid); $topic = $catId["top"]. $parname."_".$varname; + $syncname = $parname."_".$varname; $payload = round(getvalue($childid), 2); $time = time(); $isSetpoint = isset($catId["setpoint"]) ? $catId["setpoint"] : false; if ($isSetpoint == true){ - $this->MqttSync($mqttId, $topic, $payload, false, $parname."_".$varname, $childid); + $this->MqttSync($mqttId, $topic, $payload, false, $syncname, $childid); + IPS_LogMessage("Monitoring Client", "Sync Setpoint: " . $topic . " mit Payload: " . $payload. " und Source: " . $childid . " und Ident: " . $syncname); }else{ if($changedtime > $time - $updatetime){ $this->MqttPublish($mqttId, $topic, $payload, false);