diff --git a/Batterie/module.php b/Batterie/module.php index 9023d4b..f2aacb5 100644 --- a/Batterie/module.php +++ b/Batterie/module.php @@ -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")); diff --git a/library.json b/library.json index a4bfc14..525f142 100644 --- a/library.json +++ b/library.json @@ -6,7 +6,7 @@ "compatibility": { "version": "7.1" }, - "version": "1.071", + "version": "1.072", "build": 0, "date": 0 } \ No newline at end of file