Leistungslimits können nun für 1 und 3 phasig separat eingestellt werden.
This commit is contained in:
@@ -23,6 +23,9 @@ public function Create() {
|
||||
// Properties registrieren
|
||||
$this->RegisterPropertyInteger("MinLeistung", 3600);
|
||||
$this->RegisterPropertyInteger("MaxLeistung", 11000);
|
||||
|
||||
$this->RegisterPropertyInteger("MinLeistung_1ph", 1400);
|
||||
$this->RegisterPropertyInteger("MaxLeistung_1ph", 7800);
|
||||
$this->RegisterPropertyString("IP_Adresse", "0.0.0.0");
|
||||
|
||||
$this->RegisterVariableBoolean("Ladebereit", "Ladebereit", "~Switch", 11);
|
||||
@@ -101,14 +104,15 @@ public function SetCurrentPower(int $power) {
|
||||
|
||||
if(GetValue($this->GetIDForIdent("Lademodus"))==0){
|
||||
|
||||
SetValue($this->GetIDForIdent("Ladestrom"), $this->ReadPropertyInteger("MaxLeistung") / 240);
|
||||
SetValue($this->GetIDForIdent("Ladestrom"), $this->ReadPropertyInteger("MaxLeistung_1ph") / 240);
|
||||
$this->sendPowerToStation($this->ReadPropertyInteger("MaxLeistung_1ph"));
|
||||
|
||||
}elseif(GetValue($this->GetIDForIdent("Lademodus"))==1){
|
||||
|
||||
SetValue($this->GetIDForIdent("Ladestrom"), $this->ReadPropertyInteger("MaxLeistung") / 400 / sqrt(3));
|
||||
$this->sendPowerToStation($this->ReadPropertyInteger("MaxLeistung"));
|
||||
|
||||
}
|
||||
$this->sendPowerToStation($this->ReadPropertyInteger("MaxLeistung"));
|
||||
|
||||
} else {
|
||||
// Ansonsten setze Ladeleistung auf die aktuelle Leistungsvorgabe (CurrentPower)
|
||||
@@ -134,9 +138,18 @@ public function GetCurrentData(bool $Peak) {
|
||||
// Aktuelle Properties abrufen
|
||||
$ladebereit = GetValue($this->GetIDForIdent("Ladebereit"));
|
||||
$solarladen = GetValue($this->GetIDForIdent("Solarladen"));
|
||||
$minLeistung = $this->ReadPropertyInteger("MinLeistung");
|
||||
$maxLeistung = $this->ReadPropertyInteger("MaxLeistung");
|
||||
|
||||
|
||||
if(GetValue($this->GetIDForIdent("Lademodus"))==0){
|
||||
|
||||
$minLeistung = $this->ReadPropertyInteger("MinLeistung_1ph");
|
||||
$maxLeistung = $this->ReadPropertyInteger("MaxLeistung_1ph");
|
||||
|
||||
}elseif(GetValue($this->GetIDForIdent("Lademodus"))==1){
|
||||
|
||||
$minLeistung = $this->ReadPropertyInteger("MinLeistung");
|
||||
$maxLeistung = $this->ReadPropertyInteger("MaxLeistung");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user