diff --git a/Batterie/form.json b/Batterie/form.json index 4d7050d..5ca991f 100644 --- a/Batterie/form.json +++ b/Batterie/form.json @@ -29,12 +29,25 @@ "caption": "Minimum des Batterieladezustand", "suffix": "" }, + { + "type": "SelectVariable", + "name": "Batterieladezustand", + "caption": "Batterieladezustand", + "test": true + }, + { + "type": "SelectVariable", + "name": "Batterieladezustand", + "caption": "Batterieladezustand", + "test": true + }, { "type": "SelectVariable", "name": "Batterieladezustand", "caption": "Batterieladezustand", "test": true } + ] } diff --git a/Batterie/module.php b/Batterie/module.php index 668ac70..ef500b9 100644 --- a/Batterie/module.php +++ b/Batterie/module.php @@ -12,7 +12,8 @@ class Batterie extends IPSModule $this->RegisterPropertyInteger("AufdasNachladen",0); $this->RegisterPropertyInteger("MinimumEntladen",0); $this->RegisterPropertyInteger("Batterieladezustand",0); - + //$this->RegisterPropertyFloat("Ladestrom",0); + //$this->RegisterPropertyFloat("Entladestrom",0); // Variabeln für Kommunkation mit Manager $this->RegisterVariableFloat("Ladestrom", "Ladestrom", "", 0); @@ -93,10 +94,11 @@ public function RequestAction($Ident, $Value) $batterieladezustand = $this->ReadPropertyInteger("Batterieladezustand"); // Als Property gelesen $maxleistung = $this->ReadPropertyInteger("MaxBatterieleistung"); // Als Property gelesen $spannung = $this->ReadPropertyInteger("Batteriespannung"); // Spannung ebenfalls als Property - $ladestrom = GetValue($this->GetIDForIdent("Ladestrom")); - $entladestrom = GetValue($this->GetIDForIdent("Entladestrom")); - - IPS_LogMessage("Batterie", "power: " . $power); + //$ladestrom = GetValue($this->GetIDForIdent("Ladestrom")); + //$entladestrom = GetValue($this->GetIDForIdent("Entladestrom")); + $ladestrom = $this->ReadPropertyFloat("Ladestrom"); + $entladestrom = $this->ReadPropertyFloat("Entladestrom"); + if ($spannung <= 0) { IPS_LogMessage("Batterie", "Fehler: Batteriespannung ist 0 oder ungültig."); diff --git a/library.json b/library.json index ac28787..995f5c4 100644 --- a/library.json +++ b/library.json @@ -6,7 +6,7 @@ "compatibility": { "version": "7.1" }, - "version": "1.044", + "version": "1.045", "build": 0, "date": 0 } \ No newline at end of file