From d47960120db0b503e97ec5c448c1e59a4ca3bcd1 Mon Sep 17 00:00:00 2001 From: "belevo\\mh" Date: Fri, 26 Sep 2025 08:38:40 +0200 Subject: [PATCH] no message --- {Puffer => Pufferspeicher}/README.md | 0 {Puffer => Pufferspeicher}/form.json | 16 ++++++--- {Puffer => Pufferspeicher}/module.json | 0 {Puffer => Pufferspeicher}/module.php | 49 +++++++++++++------------- 4 files changed, 36 insertions(+), 29 deletions(-) rename {Puffer => Pufferspeicher}/README.md (100%) rename {Puffer => Pufferspeicher}/form.json (85%) rename {Puffer => Pufferspeicher}/module.json (100%) rename {Puffer => Pufferspeicher}/module.php (84%) diff --git a/Puffer/README.md b/Pufferspeicher/README.md similarity index 100% rename from Puffer/README.md rename to Pufferspeicher/README.md diff --git a/Puffer/form.json b/Pufferspeicher/form.json similarity index 85% rename from Puffer/form.json rename to Pufferspeicher/form.json index 5fba372..19e0f93 100644 --- a/Puffer/form.json +++ b/Pufferspeicher/form.json @@ -6,8 +6,8 @@ }, { "type":"Select", - "name":"Boilertemperatur_glätten", - "caption":"Boilertemperatur glätten", + "name":"Puffertemperatur_glätten", + "caption":"Puffertemperatur glätten", "options":[ { "caption":"Ja", @@ -40,7 +40,13 @@ { "type": "NumberSpinner", "name": "PufferLeistung", - "caption": "Puffer Leistung", + "caption": "Puffer Volllast", + "suffix": "Watt" + }, + { + "type": "NumberSpinner", + "name": "PufferTeilLeistung", + "caption": "Puffer Teillast", "suffix": "Watt" }, { @@ -73,8 +79,8 @@ }, { "type": "SelectVariable", - "name": "Boilerfuehler_PT1", - "caption": "Variable für Boilerfühler PT1", + "name": "Pufferfuehler_PT1", + "caption": "Variable für Pufferfühler PT1", "test": true }, { diff --git a/Puffer/module.json b/Pufferspeicher/module.json similarity index 100% rename from Puffer/module.json rename to Pufferspeicher/module.json diff --git a/Puffer/module.php b/Pufferspeicher/module.php similarity index 84% rename from Puffer/module.php rename to Pufferspeicher/module.php index b28072a..fb6d031 100644 --- a/Puffer/module.php +++ b/Pufferspeicher/module.php @@ -1,6 +1,6 @@ RegisterPropertyInteger("PufferLeistung", 6000); + $this->RegisterPropertyInteger("PufferTeilLeistung", 3000); $this->RegisterPropertyInteger("ZeitKonstante", 120); - $this->RegisterPropertyInteger("Boilerfuehler_PT1", 0); + $this->RegisterPropertyInteger("Pufferfuehler_PT1", 0); $this->RegisterPropertyInteger("Heizkontakt_Puffer", 0); + $this->RegisterPropertyInteger("Heizkontakt_Puffer_Teillast", 0); $this->RegisterPropertyInteger("Aussentemp", 20); $this->RegisterPropertyInteger("MinVT_Temp", 20); $this->RegisterPropertyInteger("MaxVT_Temp", 80); $this->RegisterPropertyInteger("MaxAT_Temp", 20); $this->RegisterPropertyInteger("MinAT_Temp", 0); - $this->RegisterPropertyBoolean("Boilertemperatur_glätten", false); + $this->RegisterPropertyBoolean("Puffertemperatur_glätten", false); $this->RegisterPropertyString("Zeitplan", ""); $this->RegisterPropertyInteger("Interval", 5); // Recheninterval // Puffer spezifische Variablen $this->RegisterVariableInteger("Steigung","Steigung","",0); $this->RegisterVariableInteger("Maximaltemperatur"," Berechnete Maximaltemperatur VT","",60); - $this->RegisterVariableInteger("Boilertemperatur", "Boilertemperatur", "", 40); + $this->RegisterVariableInteger("Puffertemperatur", "Puffertemperatur", "", 40); $this->RegisterVariableInteger("Aussentemperatur", "Aussentemperatur", "", 15); $this->RegisterVariableBoolean("Hysterese", "Hysterese","",false); @@ -81,25 +83,24 @@ class Puffer extends IPSModule } } - // Methode zum Setzen des aktuellen Stromverbrauchs + // Methode zum Setzen des aktuellen Stromverbrauchs public function SetAktuelle_Leistung(int $power) { // Schalte Kontakt Teillast und Vollast entsprechend der Power-Einstellung if ($power == $this->ReadPropertyInteger("PufferLeistung")) { SetValue($this->ReadPropertyInteger("Heizkontakt_Puffer"), true); + SetValue($this->ReadPropertyInteger("Heizkontakt_Puffer_Teillast"), false); + } elseif ( + $power == $this->ReadPropertyInteger("PufferTeilLeistung") + ) { + SetValue($this->ReadPropertyInteger("Heizkontakt_Puffer"), false); + SetValue($this->ReadPropertyInteger("Heizkontakt_Puffer_Teillast"), true); } else { SetValue($this->ReadPropertyInteger("Heizkontakt_Puffer"), false); + SetValue($this->ReadPropertyInteger("Heizkontakt_Puffer_Teillast"), false); } - - // Prüfe auf Änderung der Power im Vergleich zur letzten Einstellung - $lastPower = GetValue($this->GetIDForIdent("Aktuelle_Leistung")); - if ($power != $lastPower) { - $this->SetValue("Idle", false); - $this->SetValue( - "IdleCounter", - $this->ReadPropertyInteger("IdleCounterMax") - ); - } + } + // Setze die neue Aktuelle_Leistung $this->SetValue("Aktuelle_Leistung", $power); @@ -113,11 +114,11 @@ class Puffer extends IPSModule { - $boilertemperatur_glätten = $this->ReadPropertyBoolean("Boilertemperatur_glätten"); + $boilertemperatur_glätten = $this->ReadPropertyBoolean("Puffertemperatur_glätten"); if ($boilertemperatur_glätten) { // Wenn Glättung aktiviert ist, führe das Glätten durch - $boilerFuehlerPT1ID = $this->ReadPropertyInteger("Boilerfuehler_PT1"); + $boilerFuehlerPT1ID = $this->ReadPropertyInteger("Pufferfuehler_PT1"); if (IPS_VariableExists($boilerFuehlerPT1ID)) { $boilerPT1 = GetValue($boilerFuehlerPT1ID); @@ -137,10 +138,10 @@ class Puffer extends IPSModule $delta_t = 5; // Zeitdifferenz zwischen den Messungen (30 Sekunden) $alpha = $delta_t / ($time_constant + $delta_t); $newBoilerTemp = $boilerTemp + $alpha * ($boilerPT1 - $boilerTemp); - $this->SetValue("Boilertemperatur", $newBoilerTemp); + $this->SetValue("Puffertemperatur", $newBoilerTemp); } else { // Wenn Glättung nicht aktiviert ist, setze die Boilertemperatur direkt auf den Wert des Boilerfühlers - $boilerFuehlerPT1ID = $this->ReadPropertyInteger("Boilerfuehler_PT1"); + $boilerFuehlerPT1ID = $this->ReadPropertyInteger("Pufferfuehler_PT1"); if (IPS_VariableExists($boilerFuehlerPT1ID)) { $boilerPT1 = GetValue($boilerFuehlerPT1ID); @@ -148,7 +149,7 @@ class Puffer extends IPSModule $boilerPT1 = 0.0; // Standardwert } // Setze Boilertemperatur direkt auf den Wert des Boilerfühlers - $this->SetValue("Boilertemperatur", $boilerPT1); + $this->SetValue("Puffertemperatur", $boilerPT1); } @@ -173,10 +174,10 @@ class Puffer extends IPSModule } $this->SetValue("Maximaltemperatur", $VT ); - $boilerTemp = $this->GetValue("Boilertemperatur"); + $boilerTemp = $this->GetValue("Puffertemperatur"); $pufferLeistung = $this->ReadPropertyInteger("PufferLeistung"); - - $hyst = $this->GetValue("Hysterese"); + $pufferTeilLeistung = $this->ReadPropertyInteger("PufferTeilLeistung"); + $hyst = $this->GetValue("Hysterese"); if($VT < $boilerTemp){ @@ -190,7 +191,7 @@ class Puffer extends IPSModule $this->SetValue( "PowerSteps", json_encode([0]) ); } else { if ($boilerTemp < $VT && $hyst== true) { - $this->SetValue("PowerSteps", json_encode([$pufferLeistung])); + $this->SetValue("PowerSteps", json_encode([0,$pufferTeilLeistung ,$pufferLeistung])); } elseif ($boilerTemp > $VT - 5 && $hyst== false) { $this->SetValue("PowerSteps", json_encode([0])); } else {