Leistung hinzugefügt
This commit is contained in:
+4
-4
@@ -37,14 +37,14 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SelectVariable",
|
"type": "SelectVariable",
|
||||||
"name": "Ladestrom",
|
"name": "Entladeleistung",
|
||||||
"caption": "Ladestrom",
|
"caption": "Entladeleistung",
|
||||||
"test": true
|
"test": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SelectVariable",
|
"type": "SelectVariable",
|
||||||
"name": "Entladestrom",
|
"name": "Ladeleistung",
|
||||||
"caption": "Entladestrom",
|
"caption": "Ladeleistung",
|
||||||
"test": true
|
"test": true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+13
-4
@@ -12,12 +12,13 @@ class Batterie extends IPSModule
|
|||||||
$this->RegisterPropertyInteger("AufdasNachladen",0);
|
$this->RegisterPropertyInteger("AufdasNachladen",0);
|
||||||
$this->RegisterPropertyInteger("MinimumEntladen",0);
|
$this->RegisterPropertyInteger("MinimumEntladen",0);
|
||||||
$this->RegisterPropertyInteger("Batterieladezustand",0);
|
$this->RegisterPropertyInteger("Batterieladezustand",0);
|
||||||
//$this->RegisterPropertyFloat("Ladestrom",0);
|
|
||||||
//$this->RegisterPropertyFloat("Entladestrom",0);
|
|
||||||
|
|
||||||
// Variabeln für Kommunkation mit Manager
|
// Variabeln für Kommunkation mit Manager
|
||||||
$this->RegisterVariableFloat("Ladestrom", "Ladestrom", "", 0);
|
$this->RegisterVariableFloat("Ladestrom", "Ladestrom", "", 0);
|
||||||
$this->RegisterVariableFloat("Entladestrom", "Entladestrom", "", 0);
|
$this->RegisterVariableFloat("Entladestrom", "Entladestrom", "", 0);
|
||||||
|
$this->RegisterVariableFloat("Ladeleistung", "Ladeleistung", "", 0);
|
||||||
|
$this->RegisterVariableFloat("Entladeleistung", "Entladeleistung", "", 0);
|
||||||
$this->RegisterVariableInteger("Aktuelle_Leistung", "Aktuelle_Leistung", "", 0);
|
$this->RegisterVariableInteger("Aktuelle_Leistung", "Aktuelle_Leistung", "", 0);
|
||||||
$this->RegisterVariableString("PowerSteps", "PowerSteps");
|
$this->RegisterVariableString("PowerSteps", "PowerSteps");
|
||||||
$this->RegisterVariableBoolean("Idle", "Idle", "", 0);
|
$this->RegisterVariableBoolean("Idle", "Idle", "", 0);
|
||||||
@@ -91,8 +92,16 @@ public function RequestAction($Ident, $Value)
|
|||||||
|
|
||||||
public function SetAktuelle_Leistung(int $power)
|
public function SetAktuelle_Leistung(int $power)
|
||||||
{
|
{
|
||||||
$batterieladezustand = $this->ReadPropertyInteger("Batterieladezustand"); // Als Property gelesen
|
|
||||||
$maxleistung = $this->ReadPropertyInteger("MaxBatterieleistung"); // Als Property gelesen
|
$ladeleistung = $this->ReadPropertyFloat("Ladeleistung");
|
||||||
|
$entladeleistung = $this->ReadPropertyFloat("Entladeleistung"); // Korrigierter Name
|
||||||
|
|
||||||
|
if ($power >= 0) {
|
||||||
|
$this->SetValue("Ladeleistung", $power);
|
||||||
|
} else {
|
||||||
|
$this->SetValue("Entladeleistung", abs($power));
|
||||||
|
}
|
||||||
|
|
||||||
$spannung = $this->ReadPropertyInteger("Batteriespannung"); // Spannung ebenfalls als Property
|
$spannung = $this->ReadPropertyInteger("Batteriespannung"); // Spannung ebenfalls als Property
|
||||||
//$ladestrom = GetValue($this->GetIDForIdent("Ladestrom"));
|
//$ladestrom = GetValue($this->GetIDForIdent("Ladestrom"));
|
||||||
//$entladestrom = GetValue($this->GetIDForIdent("Entladestrom"));
|
//$entladestrom = GetValue($this->GetIDForIdent("Entladestrom"));
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
"compatibility": {
|
"compatibility": {
|
||||||
"version": "7.1"
|
"version": "7.1"
|
||||||
},
|
},
|
||||||
"version": "1.046",
|
"version": "1.047",
|
||||||
"build": 0,
|
"build": 0,
|
||||||
"date": 0
|
"date": 0
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user