weiterer teil zu testzwecken zugefühgt

This commit is contained in:
2024-11-08 15:51:56 +01:00
parent 0ed4cb6eeb
commit a5d5b7b7a7
2 changed files with 54 additions and 1 deletions

View File

@@ -5,10 +5,63 @@ class WP_Steurung extends IPSModule {
public function Create() {
parent::Create();
// Prioritäten
$this->RegisterVariableInteger("LockPrio", "LockPrio");
$this->RegisterVariableInteger("UserPrio", "UserPrio");
// Energiehandling
$this->RegisterVariableBoolean("Idle", "Idle", "", true);
$this->RegisterVariableInteger("CurrentPower", "CurrentPower", "", 0);
$this->RegisterVariableFloat("UsedEnergy", "UsedEnergy", "", 0);
$this->RegisterVariableString("PowerSteps", "PowerSteps"); // PowerSteps-Variable registrieren
// Trägheit
$this->RegisterPropertyInteger("IdleCounterMax", 4);
$this->RegisterVariableInteger("IdleCounter", "IdleCounter", "", 0);
$this->SetValue("IdleCounter", 0);
$this->RegisterVariableInteger("Mindestlaufzeit", "IdleCounter", "", 0);
$this->RegisterVariableInteger("Zustand_WP", "Zustand_WP", "", 0);
$this->RegisterVariableInteger("WP_Laufzeit_Zahler", "WP_Laufzeit_Zahler", "", 20*12);
$this->RegisterVariableBoolean("LetzterPeakwert", "LetzterPeakwert", "", false);
$this->RegisterPropertyInteger("WP_Leistung", 6000);
$this->RegisterPropertyInteger("Wolkenschwellwert", 60);
$this->RegisterPropertyInteger("Wolkenwert", 0);
$this->RegisterPropertyInteger("Aussentemperatur", 0);
$this->RegisterPropertyInteger("Referenzzeit", 0);
$this->RegisterPropertyInteger("Sperrkontakt", 0);
$this->RegisterPropertyInteger("Kontakt_Erhoeung", 0);
//Initialisieren
$this->SetValue("Idle", true);
}
public function ApplyChanges() {
parent::ApplyChanges();
}
// Aktionen verarbeiten
public function RequestAction($Ident, $Value) {
switch ($Ident) {
case "SetCurrentPower":
$this->SetCurrentPower($Value);
break;
case "GetCurrentData":
return $this->GetCurrentData($Value);
break;
case "ResetPowerSteps":
$this->ResetPowerSteps($Value);
break;
default:
throw new Exception("Invalid Ident");
}
}
}
?>

View File

@@ -6,7 +6,7 @@
"compatibility": {
"version": "7.1"
},
"version": "0.101",
"version": "0.102",
"build": 0,
"date": 0
}