diff --git a/Puffer/module.php b/Puffer/module.php index ae128ad..7ee659f 100644 --- a/Puffer/module.php +++ b/Puffer/module.php @@ -26,7 +26,7 @@ class Puffer extends IPSModule $this->RegisterVariableInteger("Maximaltemperatur"," Berechnete Maximaltemperatur VT","",60); $this->RegisterVariableInteger("Boilertemperatur", "Boilertemperatur", "", 40); $this->RegisterVariableInteger("Aussentemperatur", "Aussentemperatur", "", 15); - + $this->RegisterVariableBoolean("Hysterese", "","",false); // Variabeln für Kommunkation mit Manager @@ -176,13 +176,23 @@ class Puffer extends IPSModule $boilerTemp = $this->GetValue("Boilertemperatur"); $pufferLeistung = $this->ReadPropertyInteger("PufferLeistung"); - + $hyst = $this->GetValue("Hysterese"); + + if($VT < $boilerTemp){ + $this->SetValue("Hysterese", false ); + }elseif($VT-5 >= $boilerTemp){ + $this->SetValue("Hysterese", true); + } + + if ($Peak) { $this->SetValue( "PowerSteps", json_encode([0]) ); } else { - if ($boilerTemp < $VT) { + if ($boilerTemp < $VT && $hyst== true) { $this->SetValue("PowerSteps", json_encode([$pufferLeistung])); + } elseif ($boilerTemp > $VT - 5 && $hyst== false) { + $this->SetValue("PowerSteps", json_encode([0])); } else { $this->SetValue("PowerSteps", json_encode([0])); }