From 27a0bee822532a27bdd6da3a4e985ad63b96eb88 Mon Sep 17 00:00:00 2001 From: jhartworks Date: Mon, 9 Dec 2024 09:04:27 +0100 Subject: [PATCH] V1.4 --- LoraMlr003/module.php | 16 +++++++++++++++- library.json | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/LoraMlr003/module.php b/LoraMlr003/module.php index 919599d..73384f6 100644 --- a/LoraMlr003/module.php +++ b/LoraMlr003/module.php @@ -52,7 +52,10 @@ class LoraMlr003 extends IPSModule { $this->RegisterTimer("WriteUpdate", 0, 'MLR3_WriteSetpointvalues('.$this->InstanceID.');'); $this->RegisterVariableString("hexOutput","HEX-Output"); $this->RegisterVariableString("jsonOutput","JSON-Output"); - + $this->RegisterVariableFloat("setpointModbus","Setpoint from Modbus"); + $this->RegisterVariableFloat("valvePosition","Actual Valve Position"); + $this->RegisterVariableFloat("storageVoltage","Storagevoltage"); + } // Überschreibt die intere IPS_ApplyChanges($id) Funktion @@ -164,6 +167,9 @@ class LoraMlr003 extends IPSModule { $temp = $this->CheckGetArrayValue($data,"Current_Valve_Position"); if ($temp != "failure") { + $idFromvalvePosition = $this->GetIDForIdent("valvePosition"); + SetValueFloat($idFromvalvePosition,$temp); + $adressmodCurrent_Valve_Position = $this->ReadPropertyInteger("modCurrent_Valve_Position"); $this->ModbusPublish($devEui."Current_Valve_Position", $modGwId, $devName." Current_Valve_Position", $adressmodCurrent_Valve_Position, $temp, $modFcReadActValues, $modFcWriteActValues,5); $temp = "failure"; @@ -303,6 +309,10 @@ class LoraMlr003 extends IPSModule { $temp = $this->CheckGetArrayValue($data,"Storage_Voltage"); if ($temp != "failure") { $adressmodStorage_Voltage = $this->ReadPropertyInteger("modStorage_Voltage"); + + $idFromstorageVoltage = $this->GetIDForIdent("storageVoltage"); + SetValueFloat($idFromstorageVoltage,$temp); + //echo "Storage_Voltage ".$temp; $this->ModbusPublish($devEui."Storage_Voltage", $modGwId, $devName." Storage_Voltage", $adressmodStorage_Voltage, $temp, $modFcReadActValues, $modFcWriteActValues,7); $temp = "failure"; @@ -374,6 +384,10 @@ class LoraMlr003 extends IPSModule { //echo $modUsermode; $adressmodSetpoint = $this->ReadPropertyInteger("modSetpoint"); $modSetpoint = $this->ModbusPublish($devEui."Setpoint", $modGwId, $devName." Setpoint", $adressmodSetpoint, $temp, $modFcReadSetpoints, 0,5); + + $idFromsetpointModbus = $this->GetIDForIdent("setpointModbus"); + SetValueFloat($idFromsetpointModbus,$modSetpoint); + //echo $modSetpoint; $adressmodRoomtemp = $this->ReadPropertyInteger("modRoomtemp"); $modRoomtemp = $this->ModbusPublish($devEui."Roomtemp", $modGwId, $devName." Roomtemp", $adressmodRoomtemp, $temp, $modFcReadSetpoints, 0,5); diff --git a/library.json b/library.json index ab8321c..f349877 100644 --- a/library.json +++ b/library.json @@ -7,7 +7,7 @@ "version": "6.0", "date": 1491343200 }, - "version": "1.3", + "version": "1.4", "build": 1, "date": 0 } \ No newline at end of file