diff --git a/Pufferspeicher/form.json b/Pufferspeicher/form.json index 19e0f93..7ecbf45 100644 --- a/Pufferspeicher/form.json +++ b/Pufferspeicher/form.json @@ -85,15 +85,61 @@ }, { "type": "SelectVariable", - "name": "Heizkontakt_Puffer", - "caption": "Heizkontakt Puffer", + "name": "Heizkontakt1_Puffer", + "caption": "Heizkontakt Puffer 1.Stufe", "test": true }, + { + "type": "SelectVariable", + "name": "Heizkontakt2_Puffer", + "caption": "Heizkontakt Puffer 2.Stufe", + "test": true + }, { "type": "SelectVariable", "name": "Aussentemp", "caption": "Aussentemperatur", "suffix": "°C" + }, + { + "elements": [ + { + "type": "Select", + "name": "Stufen", + "caption": "Anzahl Stufen", + "options": [ + { "caption": "1-stufig", "value": 1 }, + { "caption": "2-stufig", "value": 2 }, + { "caption": "3-stufig", "value": 3 }, + { "caption": "4-stufig", "value": 4 } + ] + }, + + { + "type": "NumberSpinner", + "name": "Stufe1", + "caption": "Wert Stufe 1", + "visible": "{Stufen} >= 1" + }, + { + "type": "NumberSpinner", + "name": "Stufe2", + "caption": "Wert Stufe 2", + "visible": "{Stufen} >= 2" + }, + { + "type": "NumberSpinner", + "name": "Stufe3", + "caption": "Wert Stufe 3", + "visible": "{Stufen} >= 3" + }, + { + "type": "NumberSpinner", + "name": "Stufe4", + "caption": "Wert Stufe 4", + "visible": "{Stufen} >= 4" + } + ] } ] } \ No newline at end of file diff --git a/Pufferspeicher/module.php b/Pufferspeicher/module.php index dc34bb1..7eb140d 100644 --- a/Pufferspeicher/module.php +++ b/Pufferspeicher/module.php @@ -12,8 +12,8 @@ class Pufferspeicher extends IPSModule $this->RegisterPropertyInteger("PufferTeilLeistung", 3000); $this->RegisterPropertyInteger("ZeitKonstante", 120); $this->RegisterPropertyInteger("Pufferfuehler_PT1", 0); - $this->RegisterPropertyInteger("Heizkontakt_Puffer", 0); - $this->RegisterPropertyInteger("Heizkontakt_Puffer_Teillast", 0); + $this->RegisterPropertyInteger("Heizkontakt2_Puffer", 0); + $this->RegisterPropertyInteger("Heizkontakt1_Puffer", 0); $this->RegisterPropertyInteger("Aussentemp", 20); $this->RegisterPropertyInteger("MinVT_Temp", 20); $this->RegisterPropertyInteger("MaxVT_Temp", 80); @@ -88,16 +88,16 @@ class Pufferspeicher extends IPSModule { // 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); + SetValue($this->ReadPropertyInteger("Heizkontakt2_Puffer"), true); + SetValue($this->ReadPropertyInteger("Heizkontakt1_Puffer"), false); } elseif ( $power == $this->ReadPropertyInteger("PufferTeilLeistung") ) { - SetValue($this->ReadPropertyInteger("Heizkontakt_Puffer"), false); - SetValue($this->ReadPropertyInteger("Heizkontakt_Puffer_Teillast"), true); + SetValue($this->ReadPropertyInteger("Heizkontakt2_Puffer"), false); + SetValue($this->ReadPropertyInteger("Heizkontakt1_Puffer"), true); } else { - SetValue($this->ReadPropertyInteger("Heizkontakt_Puffer"), false); - SetValue($this->ReadPropertyInteger("Heizkontakt_Puffer_Teillast"), false); + SetValue($this->ReadPropertyInteger("Heizkontakt2_Puffer"), false); + SetValue($this->ReadPropertyInteger("Heizkontakt1_Puffer"), false); } // Prüfe auf Änderung der Power im Vergleich zur letzten Einstellung