From f40c097f4755e796ba6417ad22f85781cf60fa5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20H=C3=A4fliger?= Date: Wed, 13 Nov 2024 14:43:14 +0100 Subject: [PATCH] =?UTF-8?q?Schwellwert=20f=C3=BCr=20aufhebung=20der=20WP-S?= =?UTF-8?q?perre=20bei=20WW=20eingebaut?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WP_Steuerung/form.json | 19 +++++++++++++++++++ WP_Steuerung/module.php | 14 ++++++++++++-- library.json | 2 +- 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/WP_Steuerung/form.json b/WP_Steuerung/form.json index 38b6234..1fb4b0c 100644 --- a/WP_Steuerung/form.json +++ b/WP_Steuerung/form.json @@ -46,6 +46,25 @@ "name": "Kontakt_Erhoeung", "caption": "Zu schaltenden Kontakt für WP-Erhöhung", "test": true + }, + + { + "type": "CheckBox", + "name": "Schwellwert_Anwenden", + "caption": "Schwellwert zum Entsperren Aktiv", + "test": true + }, + { + "type": "NumberSpinner", + "name": "Schwellwert_Variable", + "caption": "Warmwassertemperatur auf welche der Schwellwert angewendet wird.", + "test": true + }, + { + "type": "SelectVariable", + "name": "WW_Temp", + "caption": "Variable mit der Aktuellen Warmwassertemperatur", + "test": true } ] diff --git a/WP_Steuerung/module.php b/WP_Steuerung/module.php index d5b9104..a0aea7f 100644 --- a/WP_Steuerung/module.php +++ b/WP_Steuerung/module.php @@ -23,12 +23,12 @@ class WP_Steuerung extends IPSModule { $this->RegisterVariableInteger("Mindestlaufzeit", "IdleCounter", "", 0); - $this->RegisterVariableInteger("Zustand_WP", "Zustand_WP", "", 0); + $this->RegisterVariableInteger("Zustand_WP", "Zustand_WP", "", 1); $this->RegisterVariableInteger("WP_Laufzeit_Zahler", "WP_Laufzeit_Zahler", "", 20*12); $this->RegisterVariableBoolean("LetzterPeakwert", "LetzterPeakwert", "", false); - + $this->RegisterPropertyInteger("WP_Leistung", 6000); @@ -38,6 +38,9 @@ class WP_Steuerung extends IPSModule { $this->RegisterPropertyInteger("Referenzzeit", 0); $this->RegisterPropertyInteger("Sperrkontakt", 0); $this->RegisterPropertyInteger("Kontakt_Erhoeung", 0); + $this->RegisterPropertyInteger("Schwellwert_Anwenden", false); + $this->RegisterPropertyInteger("Schwellwert_Variable", 0); + $this->RegisterPropertyInteger("WW_Temp", 1); //Initialisieren $this->SetValue("Idle", true); @@ -241,6 +244,9 @@ class WP_Steuerung extends IPSModule { } + + + // Methode zum Abrufen der aktuellen Daten public function GetCurrentData(bool $Peak) { @@ -255,6 +261,10 @@ class WP_Steuerung extends IPSModule { $this->SetValue("PowerSteps", json_encode([$this->GetValue("CurrentPower")])); + }elseif($this->ReadPropertyInteger("Schwellwert_Anwenden")==true && ($this->ReadPropertyInteger("WW_Temp")ReadPropertyInteger("Schwellwert_Variable"))) ){ + + + $this->SetValue("PowerSteps", json_encode([$this->ReadPropertyInteger("WP_Leistung")])); } else{ diff --git a/library.json b/library.json index fbe7b98..83625dd 100644 --- a/library.json +++ b/library.json @@ -6,7 +6,7 @@ "compatibility": { "version": "7.1" }, - "version": "0.129", + "version": "0.130", "build": 0, "date": 0 } \ No newline at end of file