From 73e15f875ad069737445fcbd721c0f4b4a6a843a Mon Sep 17 00:00:00 2001 From: "belevo\\daniel" Date: Wed, 17 Jul 2024 15:17:05 +0200 Subject: [PATCH] =?UTF-8?q?Leistungslimits=20k=C3=B6nnen=20nun=20f=C3=BCr?= =?UTF-8?q?=201=20und=203=20phasig=20separat=20eingestellt=20werden.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ladestation_Universal/form.json | 21 ++++++++++++++++----- Ladestation_Universal/module.php | 21 +++++++++++++++++---- library.json | 2 +- 3 files changed, 34 insertions(+), 10 deletions(-) diff --git a/Ladestation_Universal/form.json b/Ladestation_Universal/form.json index e9e1f56..269236a 100644 --- a/Ladestation_Universal/form.json +++ b/Ladestation_Universal/form.json @@ -11,17 +11,28 @@ "name": "MinLeistung", "caption": "Mindestleistung Ladestation" }, + { + "type": "NumberSpinner", + "name": "MaxLeistung", + "caption": "Maximlalleistung Ladestation" + }, + { + "type": "NumberSpinner", + "name": "MinLeistung_1ph", + "caption": "Mindestleistung Ladestation 1-Phasig" + }, + { + "type": "NumberSpinner", + "name": "MaxLeistung_1ph", + "caption": "Maximlalleistung Ladestation 1-Phasig" + }, { "type": "NumberSpinner", "name": "IdleCounterMax", "caption": "Zyklen zwischen zwei Leisutungsänderungen", "suffix": "" }, - { - "type": "NumberSpinner", - "name": "MaxLeistung", - "caption": "Maximlalleistung Ladestation" - }, + { "type": "Label", "caption": "Aktuell wird nur Go-E ladestation zu testzwecken unterstützt!" diff --git a/Ladestation_Universal/module.php b/Ladestation_Universal/module.php index 2e5c17a..5d169cc 100644 --- a/Ladestation_Universal/module.php +++ b/Ladestation_Universal/module.php @@ -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"); + } diff --git a/library.json b/library.json index 0f95bfd..9143adf 100644 --- a/library.json +++ b/library.json @@ -6,7 +6,7 @@ "compatibility": { "version": "7.1" }, - "version": "0.5", + "version": "0.6", "build": 0, "date": 0 } \ No newline at end of file