no message

This commit is contained in:
mh
2026-05-08 09:03:20 +02:00
parent 5ecd1ea494
commit f58925ea7a
2 changed files with 57 additions and 45 deletions
+39 -41
View File
@@ -5,21 +5,21 @@
"caption": "Konfiguration der nötigen Schaltkontakte und Nennleistungen" "caption": "Konfiguration der nötigen Schaltkontakte und Nennleistungen"
}, },
{ {
"type":"Select", "type": "Select",
"name":"Heizungstemperatur_glätten", "name": "Heizungstemperatur_glätten",
"caption":"Heizungstemperatur glätten", "caption": "Heizungstemperatur glätten",
"options":[ "options": [
{ {
"caption":"Ja", "caption": "Ja",
"value":true "value": true
}, },
{ {
"caption":"Nein", "caption": "Nein",
"value":false "value": false
} }
] ]
}, },
{ {
"type": "NumberSpinner", "type": "NumberSpinner",
"name": "ZeitKonstante", "name": "ZeitKonstante",
"caption": "Zeit Konstante", "caption": "Zeit Konstante",
@@ -40,42 +40,40 @@
{ {
"type": "ValidationTextBox", "type": "ValidationTextBox",
"name": "Hysterese", "name": "Hysterese",
"caption": "Hysterese", "caption": "Hysterese z.B. 0.1"
"value": "0.1",
"suffix": "°C"
}, },
{ {
"type":"List", "type": "List",
"name":"LeistungsStufen", "name": "LeistungsStufen",
"caption":"Anzahl Stufen mit den dazugehörigen Leistungen", "caption": "Anzahl Stufen mit den dazugehörigen Leistungen",
"add":true, "add": true,
"delete":true, "delete": true,
"columns":[ "columns": [
{ {
"caption":"Stufe(n)", "caption": "Stufe(n)",
"name":"Stufe", "name": "Stufe",
"width":"200px", "width": "200px",
"add":"Stufe", "add": "Stufe",
"edit":{ "edit": {
"type":"NumberSpinner" "type": "NumberSpinner"
} }
}, },
{ {
"caption":"Leistung in W", "caption": "Leistung in W",
"name":"Leistung", "name": "Leistung",
"width":"300px", "width": "300px",
"add":0, "add": 0,
"edit":{ "edit": {
"type":"NumberSpinner" "type": "NumberSpinner"
} }
}, },
{ {
"caption":"Schaltkontakt", "caption": "Schaltkontakt",
"name":"Schaltkontakt_Stufe", "name": "Schaltkontakt_Stufe",
"width":"400px", "width": "400px",
"add":0, "add": 0,
"edit":{ "edit": {
"type":"SelectVariable" "type": "SelectVariable"
} }
} }
] ]
+18 -4
View File
@@ -8,7 +8,6 @@ class Heizung_x_Stufig extends IPSModule
{ {
parent::Create(); parent::Create();
// Heizung spezifische Properties
$this->RegisterPropertyString("LeistungsStufen", json_encode([])); $this->RegisterPropertyString("LeistungsStufen", json_encode([]));
$this->RegisterPropertyInteger("ZeitKonstante", 120); $this->RegisterPropertyInteger("ZeitKonstante", 120);
$this->RegisterPropertyInteger("Heizungsfuehler_PT1", 0); $this->RegisterPropertyInteger("Heizungsfuehler_PT1", 0);
@@ -16,12 +15,13 @@ class Heizung_x_Stufig extends IPSModule
$this->RegisterPropertyInteger("Interval", 5); $this->RegisterPropertyInteger("Interval", 5);
$this->RegisterPropertyFloat("Hysterese", 0.1); $this->RegisterPropertyFloat("Hysterese", 0.1);
// Heizung spezifische Variablen
$this->RegisterVariableInteger("Mindesttemperatur", "Mindesttemperatur", "", 45); $this->RegisterVariableInteger("Mindesttemperatur", "Mindesttemperatur", "", 45);
$this->RegisterVariableInteger("Maximaltemperatur", "Maximaltemperatur", "", 60); $this->RegisterVariableInteger("Maximaltemperatur", "Maximaltemperatur", "", 60);
$this->RegisterVariableFloat("Heizungstemperatur", "Heizungstemperatur", "", 0); $this->RegisterVariableFloat("Heizungstemperatur", "Heizungstemperatur", "", 0);
// Variablen für Kommunikation mit Manager $this->RegisterVariableBoolean("Disable", "Disable", "~Switch", 0);
$this->EnableAction("Disable");
$this->RegisterVariableInteger("Sperre_Prio", "Sperre_Prio"); $this->RegisterVariableInteger("Sperre_Prio", "Sperre_Prio");
$this->RegisterVariableInteger("PV_Prio", "PV_Prio"); $this->RegisterVariableInteger("PV_Prio", "PV_Prio");
$this->RegisterVariableBoolean("Idle", "Idle", "", 0); $this->RegisterVariableBoolean("Idle", "Idle", "", 0);
@@ -32,7 +32,6 @@ class Heizung_x_Stufig extends IPSModule
$this->RegisterVariableBoolean("Is_Peak_Shaving", "Is_Peak_Shaving", "", true); $this->RegisterVariableBoolean("Is_Peak_Shaving", "Is_Peak_Shaving", "", true);
$this->RegisterVariableInteger("Leistung_Delta", "Leistung_Delta", "", 0); $this->RegisterVariableInteger("Leistung_Delta", "Leistung_Delta", "", 0);
// Hilfsvariablen für Idle-Zustand
$this->RegisterPropertyInteger("IdleCounterMax", 2); $this->RegisterPropertyInteger("IdleCounterMax", 2);
$this->RegisterVariableInteger("IdleCounter", "IdleCounter", "", 0); $this->RegisterVariableInteger("IdleCounter", "IdleCounter", "", 0);
$this->SetValue("IdleCounter", 0); $this->SetValue("IdleCounter", 0);
@@ -59,6 +58,15 @@ class Heizung_x_Stufig extends IPSModule
public function RequestAction($Ident, $Value) public function RequestAction($Ident, $Value)
{ {
switch ($Ident) { switch ($Ident) {
case "Disable":
$this->SetValue("Disable", (bool)$Value);
if ((bool)$Value) {
$this->SetValue("PowerSteps", json_encode([0]));
$this->SetAktuelle_Leistung(0);
}
break;
case "SetAktuelle_Leistung": case "SetAktuelle_Leistung":
$this->SetValue("Power", (int)$Value); $this->SetValue("Power", (int)$Value);
break; break;
@@ -145,6 +153,12 @@ class Heizung_x_Stufig extends IPSModule
{ {
$this->LadeUndSortiereLeistungen(); $this->LadeUndSortiereLeistungen();
if ($this->GetValue("Disable")) {
$this->SetValue("PowerSteps", json_encode([0]));
$this->SetAktuelle_Leistung(0);
return;
}
$heizungstemperaturGlaetten = $this->ReadPropertyBoolean("Heizungstemperatur_glätten"); $heizungstemperaturGlaetten = $this->ReadPropertyBoolean("Heizungstemperatur_glätten");
$heizungsFuehlerPT1ID = $this->ReadPropertyInteger("Heizungsfuehler_PT1"); $heizungsFuehlerPT1ID = $this->ReadPropertyInteger("Heizungsfuehler_PT1");