batteriemanagment

This commit is contained in:
belevo\mh
2025-02-24 16:10:15 +01:00
parent 29c856331e
commit 8251a94c93
2 changed files with 5 additions and 38 deletions

View File

@@ -13,11 +13,11 @@ class Batterie extends IPSModule
$this->RegisterPropertyInteger("MinimumEntladen",0);
$this->RegisterPropertyInteger("Batterieladezustand",0);
$this->RegisterPropertyInteger("Batteriemanagement", 1);
//$this->RegisterPropertyFloat("Entladeleistung",0);
//$this->RegisterPropertyFloat("Ladeleistung",0);
// Variabeln für Kommunkation mit Manager
$this->RegisterVariableFloat("Entladeleistung","Entladeleistung", "",0);
$this->RegisterVariableInteger("Batteriemanagement_Variabel","Batteriemanagement_Variabel", "",0);
$this->RegisterVariableFloat("Ladeleistung","Ladeleistung", "",0);
$this->RegisterVariableInteger("Aktuelle_Leistung", "Aktuelle_Leistung", "", 0);
$this->RegisterVariableString("PowerSteps", "PowerSteps");
@@ -46,7 +46,8 @@ class Batterie extends IPSModule
{
parent::ApplyChanges();
$batterieManagement = $this->ReadPropertyInteger("Batteriemanagement");
$this->SetValue("Batteriemanagement_Variabel", $batterieManagement);
}
private function GeneratePowerSteps()
@@ -98,14 +99,6 @@ public function RequestAction($Ident, $Value)
return;
}
/*
if ($power >= 0){
SetValue($this->ReadPropertyFloat("Ladeleistung"), $power);
SetValue($this->ReadPropertyFloat("Entladeleistung"),0);
}else{
SetValue($this->ReadPropertyFloat("Entladeleistung"), abs($power));
SetValue($this->ReadPropertyFloat("Ladeleistung"), 0);
}*/
if ($power >= 0) {
@@ -117,32 +110,6 @@ public function RequestAction($Ident, $Value)
}
/*
$entladeleistungID = $this->ReadPropertyFloat("Entladeleistung");
$ladeleistungID = $this->ReadPropertyFloat("Ladeleistung");
if ($entladeleistungID > 0) {
if ($power < 0) {
$this->SetValue("AktuelleEntladeleistung", abs($power));
$this->SetValue("AktuelleLadeleistung", 0);
} else {
$this->SetValue("AktuelleEntladeleistung", 0);
}
}
if ($ladeleistungID > 0) {
if ($power >= 0) {
$this->SetValue("AktuelleLadeleistung", $power);
$this->SetValue("AktuelleEntladeleistung", 0);
} else {
$this->SetValue("AktuelleLadeleistung", 0);
}
}*/
// Prüfe auf Änderung der Leistung im Vergleich zur letzten Einstellung
$lastPower = GetValue($this->GetIDForIdent("Aktuelle_Leistung"));

View File

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