no message

This commit is contained in:
belevo\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"
},
{
"type":"Select",
"name":"Heizungstemperatur_glätten",
"caption":"Heizungstemperatur glätten",
"options":[
{
"caption":"Ja",
"value":true
},
{
"caption":"Nein",
"value":false
}
"type": "Select",
"name": "Heizungstemperatur_glätten",
"caption": "Heizungstemperatur glätten",
"options": [
{
"caption": "Ja",
"value": true
},
{
"caption": "Nein",
"value": false
}
]
},
{
},
{
"type": "NumberSpinner",
"name": "ZeitKonstante",
"caption": "Zeit Konstante",
@@ -40,42 +40,40 @@
{
"type": "ValidationTextBox",
"name": "Hysterese",
"caption": "Hysterese",
"value": "0.1",
"suffix": "°C"
"caption": "Hysterese z.B. 0.1"
},
{
"type":"List",
"name":"LeistungsStufen",
"caption":"Anzahl Stufen mit den dazugehörigen Leistungen",
"add":true,
"delete":true,
"columns":[
"type": "List",
"name": "LeistungsStufen",
"caption": "Anzahl Stufen mit den dazugehörigen Leistungen",
"add": true,
"delete": true,
"columns": [
{
"caption":"Stufe(n)",
"name":"Stufe",
"width":"200px",
"add":"Stufe",
"edit":{
"type":"NumberSpinner"
"caption": "Stufe(n)",
"name": "Stufe",
"width": "200px",
"add": "Stufe",
"edit": {
"type": "NumberSpinner"
}
},
{
"caption":"Leistung in W",
"name":"Leistung",
"width":"300px",
"add":0,
"edit":{
"type":"NumberSpinner"
"caption": "Leistung in W",
"name": "Leistung",
"width": "300px",
"add": 0,
"edit": {
"type": "NumberSpinner"
}
},
{
"caption":"Schaltkontakt",
"name":"Schaltkontakt_Stufe",
"width":"400px",
"add":0,
"edit":{
"type":"SelectVariable"
"caption": "Schaltkontakt",
"name": "Schaltkontakt_Stufe",
"width": "400px",
"add": 0,
"edit": {
"type": "SelectVariable"
}
}
]
+18 -4
View File
@@ -8,7 +8,6 @@ class Heizung_x_Stufig extends IPSModule
{
parent::Create();
// Heizung spezifische Properties
$this->RegisterPropertyString("LeistungsStufen", json_encode([]));
$this->RegisterPropertyInteger("ZeitKonstante", 120);
$this->RegisterPropertyInteger("Heizungsfuehler_PT1", 0);
@@ -16,12 +15,13 @@ class Heizung_x_Stufig extends IPSModule
$this->RegisterPropertyInteger("Interval", 5);
$this->RegisterPropertyFloat("Hysterese", 0.1);
// Heizung spezifische Variablen
$this->RegisterVariableInteger("Mindesttemperatur", "Mindesttemperatur", "", 45);
$this->RegisterVariableInteger("Maximaltemperatur", "Maximaltemperatur", "", 60);
$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("PV_Prio", "PV_Prio");
$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->RegisterVariableInteger("Leistung_Delta", "Leistung_Delta", "", 0);
// Hilfsvariablen für Idle-Zustand
$this->RegisterPropertyInteger("IdleCounterMax", 2);
$this->RegisterVariableInteger("IdleCounter", "IdleCounter", "", 0);
$this->SetValue("IdleCounter", 0);
@@ -59,6 +58,15 @@ class Heizung_x_Stufig extends IPSModule
public function RequestAction($Ident, $Value)
{
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":
$this->SetValue("Power", (int)$Value);
break;
@@ -145,6 +153,12 @@ class Heizung_x_Stufig extends IPSModule
{
$this->LadeUndSortiereLeistungen();
if ($this->GetValue("Disable")) {
$this->SetValue("PowerSteps", json_encode([0]));
$this->SetAktuelle_Leistung(0);
return;
}
$heizungstemperaturGlaetten = $this->ReadPropertyBoolean("Heizungstemperatur_glätten");
$heizungsFuehlerPT1ID = $this->ReadPropertyInteger("Heizungsfuehler_PT1");