version 2.0.1

This commit is contained in:
Johannes Holzwarth | SE-Inno GmbH
2024-04-19 08:26:14 +02:00
parent 235bc5cf21
commit f9a371cbc9
2 changed files with 12 additions and 4 deletions
+11 -3
View File
@@ -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);
}