From f9a371cbc905d36a8096968e85507b354e759c96 Mon Sep 17 00:00:00 2001 From: Johannes Holzwarth | SE-Inno GmbH Date: Fri, 19 Apr 2024 08:26:14 +0200 Subject: [PATCH] version 2.0.1 --- Monitoring Client/module.php | 14 +++++++++++--- library.json | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Monitoring Client/module.php b/Monitoring Client/module.php index 9532bdd..b0840c1 100644 --- a/Monitoring Client/module.php +++ b/Monitoring Client/module.php @@ -148,14 +148,22 @@ class MonitoringClient extends IPSModule { $parname = IPS_GetName($catChild); foreach ($childids as $childid){ - - $varInfo = IPS_GetVariable($childid); + if (IPS_VariableExists($childid) != 1){ + if(IPS_LinkExists($childid) == 1){ + $linkInfo = IPS_GetLink($childid); + $linkTarget = $linkInfo["TargetID"]; + $childid = $linkTarget; + } + }else{ + $varInfo = IPS_GetVariable($childid); + } + $changedtime = $varInfo["VariableChanged"]; $varname = IPS_GetName($childid); $topic = $catId["top"]. $parname."_".$varname; $time = time(); $payload = round(getvalue($childid), 2); - if($changedtime > time() - $updatetime){ + if($changedtime > $time - $updatetime){ SEMC_MqttPublish($this->InstanceID,$mqttId, $topic, $payload, false); } diff --git a/library.json b/library.json index d3a6b20..9d153c0 100644 --- a/library.json +++ b/library.json @@ -8,6 +8,6 @@ "date": 1491343200 }, "version": "2.0", - "build": 0, + "build": 1, "date": 0 } \ No newline at end of file