no message
This commit is contained in:
@@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
Das Modul steuert verschiedene Ladestationstypen.
|
Das Modul steuert verschiedene Ladestationstypen.
|
||||||
|
|
||||||
|
Das Konfigurationsformular zeigt die Verbindungsdaten abhängig vom gewählten
|
||||||
|
Ladestationstyp an. Allgemeine Regel- und Zeitparameter bleiben immer sichtbar.
|
||||||
|
|
||||||
## Easee
|
## Easee
|
||||||
|
|
||||||
Die Ladestationstypen 5 und 6 verwenden das oben als Schnittstelle ausgewählte
|
Die Ladestationstypen 5 und 6 verwenden das oben als Schnittstelle ausgewählte
|
||||||
|
|||||||
+27
-18
@@ -3,7 +3,8 @@
|
|||||||
{
|
{
|
||||||
"type": "Select",
|
"type": "Select",
|
||||||
"name": "Ladestation",
|
"name": "Ladestation",
|
||||||
"caption": "Ladestation",
|
"caption": "Ladestationstyp",
|
||||||
|
"onChange": "IPS_RequestAction($id, \"UpdateStationForm\", $Ladestation);",
|
||||||
"options": [
|
"options": [
|
||||||
{
|
{
|
||||||
"caption": "Go-E Wallbox (Alte Version)",
|
"caption": "Go-E Wallbox (Alte Version)",
|
||||||
@@ -34,13 +35,13 @@
|
|||||||
{
|
{
|
||||||
"type": "NumberSpinner",
|
"type": "NumberSpinner",
|
||||||
"name": "IdleCounterMax",
|
"name": "IdleCounterMax",
|
||||||
"caption": "Zyklen zwischen zwei Leistungsänderungen (multipliziert mit Intervall)",
|
"caption": "Wartezyklen nach einer Leistungsänderung",
|
||||||
"suffix": ""
|
"suffix": "Zyklen"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "NumberSpinner",
|
"type": "NumberSpinner",
|
||||||
"name": "Interval",
|
"name": "Interval",
|
||||||
"caption": "Intervall Neuberechnung der Werte",
|
"caption": "Berechnungsintervall",
|
||||||
"suffix": "Sekunden"
|
"suffix": "Sekunden"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -52,55 +53,63 @@
|
|||||||
{
|
{
|
||||||
"type": "NumberSpinner",
|
"type": "NumberSpinner",
|
||||||
"name": "Zeit_Zwischen_Zustandswechseln",
|
"name": "Zeit_Zwischen_Zustandswechseln",
|
||||||
"caption": "(Veraltet, auf 0 lassen) Mindestlaufzeit des Verbrauchers bei Lastschaltung",
|
"caption": "Mindestzeit zwischen Leistungsänderungen",
|
||||||
"suffix": ""
|
"suffix": "Minuten"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "NumberSpinner",
|
"type": "NumberSpinner",
|
||||||
"name": "Ein_Zeit",
|
"name": "Ein_Zeit",
|
||||||
"caption": "Mindestlaufzeit Ladestation wenn Ein",
|
"caption": "Mindestlaufzeit nach dem Einschalten",
|
||||||
"suffix": ""
|
"suffix": "Minuten"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "NumberSpinner",
|
"type": "NumberSpinner",
|
||||||
"name": "Aus_Zeit",
|
"name": "Aus_Zeit",
|
||||||
"caption": "Mindestlaufzeit Ladestation wenn Aus",
|
"caption": "Mindeststillstandszeit nach dem Ausschalten",
|
||||||
"suffix": ""
|
"suffix": "Minuten"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "ValidationTextBox",
|
"type": "ValidationTextBox",
|
||||||
"name": "IP_Adresse",
|
"name": "IP_Adresse",
|
||||||
"caption": "IP-Adresse Ladestation"
|
"caption": "IP-Adresse",
|
||||||
|
"visible": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "ValidationTextBox",
|
"type": "ValidationTextBox",
|
||||||
"name": "ID",
|
"name": "ID",
|
||||||
"caption": "Geräte-ID Smart-Me / eCarUp / Easee"
|
"caption": "Geräte-ID",
|
||||||
|
"visible": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "ValidationTextBox",
|
"type": "ValidationTextBox",
|
||||||
"name": "Seriennummer",
|
"name": "Seriennummer",
|
||||||
"caption": "Seriennummer Smart-Me / eCarUp / Easee"
|
"caption": "Seriennummer",
|
||||||
|
"visible": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "ValidationTextBox",
|
"type": "ValidationTextBox",
|
||||||
"name": "Username",
|
"name": "Username",
|
||||||
"caption": "Benutzername Smart-Me / Benutzerkennung Solarladen"
|
"caption": "Benutzername",
|
||||||
|
"visible": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "PasswordTextBox",
|
"type": "PasswordTextBox",
|
||||||
"name": "Password",
|
"name": "Password",
|
||||||
"caption": "Passwort Smart-Me"
|
"caption": "Passwort",
|
||||||
|
"visible": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SelectVariable",
|
"type": "SelectVariable",
|
||||||
"name": "Token_ECarUp",
|
"name": "Token_ECarUp",
|
||||||
"caption": "Variable API-Token für eCarUp",
|
"caption": "Variable mit eCarUp API-Token",
|
||||||
"suffix": ""
|
"suffix": "",
|
||||||
|
"visible": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "Label",
|
"type": "Label",
|
||||||
"caption": "Das Easee SignalR Gateway wird oben über Schnittstelle konfigurieren/ändern ausgewählt. Die Typen 5 und 6 verwenden diese Schnittstelle."
|
"name": "EaseeGatewayHint",
|
||||||
|
"caption": "Das Easee SignalR Gateway wird oben über Schnittstelle konfigurieren/ändern ausgewählt.",
|
||||||
|
"visible": false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -152,6 +152,132 @@ class Ladestation_v2 extends IPSModule
|
|||||||
return json_encode($data);
|
return json_encode($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function GetConfigurationForm()
|
||||||
|
{
|
||||||
|
$form = json_decode(file_get_contents(__DIR__ . "/form.json"), true);
|
||||||
|
$fieldConfiguration = $this->GetStationFormConfiguration(
|
||||||
|
$this->ReadPropertyInteger("Ladestation")
|
||||||
|
);
|
||||||
|
|
||||||
|
foreach ($form["elements"] as &$element) {
|
||||||
|
$name = (string)($element["name"] ?? "");
|
||||||
|
if (!isset($fieldConfiguration[$name])) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($fieldConfiguration[$name] as $parameter => $value) {
|
||||||
|
$element[$parameter] = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
unset($element);
|
||||||
|
|
||||||
|
return json_encode($form);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function GetStationFormConfiguration(int $stationType): array
|
||||||
|
{
|
||||||
|
$configuration = [
|
||||||
|
"IP_Adresse" => [
|
||||||
|
"visible" => false,
|
||||||
|
"caption" => "IP-Adresse",
|
||||||
|
],
|
||||||
|
"ID" => [
|
||||||
|
"visible" => false,
|
||||||
|
"caption" => "Geräte-ID",
|
||||||
|
],
|
||||||
|
"Seriennummer" => [
|
||||||
|
"visible" => false,
|
||||||
|
"caption" => "Seriennummer",
|
||||||
|
],
|
||||||
|
"Username" => [
|
||||||
|
"visible" => false,
|
||||||
|
"caption" => "Benutzername",
|
||||||
|
],
|
||||||
|
"Password" => [
|
||||||
|
"visible" => false,
|
||||||
|
"caption" => "Passwort",
|
||||||
|
],
|
||||||
|
"Token_ECarUp" => [
|
||||||
|
"visible" => false,
|
||||||
|
"caption" => "Variable mit eCarUp API-Token",
|
||||||
|
],
|
||||||
|
"EaseeGatewayHint" => [
|
||||||
|
"visible" => false,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
switch ($stationType) {
|
||||||
|
case 1:
|
||||||
|
$configuration["IP_Adresse"] = [
|
||||||
|
"visible" => true,
|
||||||
|
"caption" => "IP-Adresse der Go-E Wallbox",
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
$configuration["IP_Adresse"] = [
|
||||||
|
"visible" => true,
|
||||||
|
"caption" => "IP-Adresse der Go-E Gemini / Gemini Flex",
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
$configuration["ID"] = [
|
||||||
|
"visible" => true,
|
||||||
|
"caption" => "Smart-Me Geräte-ID",
|
||||||
|
];
|
||||||
|
$configuration["Seriennummer"] = [
|
||||||
|
"visible" => true,
|
||||||
|
"caption" => "Smart-Me Seriennummer",
|
||||||
|
];
|
||||||
|
$configuration["Username"] = [
|
||||||
|
"visible" => true,
|
||||||
|
"caption" => "Smart-Me Benutzername",
|
||||||
|
];
|
||||||
|
$configuration["Password"] = [
|
||||||
|
"visible" => true,
|
||||||
|
"caption" => "Smart-Me Passwort",
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 5:
|
||||||
|
$configuration["ID"] = [
|
||||||
|
"visible" => true,
|
||||||
|
"caption" => "eCarUp Stations-/Connector-ID",
|
||||||
|
];
|
||||||
|
$configuration["Seriennummer"] = [
|
||||||
|
"visible" => true,
|
||||||
|
"caption" => "Easee Seriennummer",
|
||||||
|
];
|
||||||
|
$configuration["Username"] = [
|
||||||
|
"visible" => true,
|
||||||
|
"caption" => "eCarUp Benutzerkennung für Solarladen",
|
||||||
|
];
|
||||||
|
$configuration["Token_ECarUp"]["visible"] = true;
|
||||||
|
$configuration["EaseeGatewayHint"]["visible"] = true;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 6:
|
||||||
|
$configuration["Seriennummer"] = [
|
||||||
|
"visible" => true,
|
||||||
|
"caption" => "Easee Seriennummer",
|
||||||
|
];
|
||||||
|
$configuration["EaseeGatewayHint"]["visible"] = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $configuration;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function UpdateStationForm(int $stationType)
|
||||||
|
{
|
||||||
|
foreach ($this->GetStationFormConfiguration($stationType) as $field => $parameters) {
|
||||||
|
foreach ($parameters as $parameter => $value) {
|
||||||
|
$this->UpdateFormField($field, $parameter, $value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function ApplyChanges()
|
public function ApplyChanges()
|
||||||
{
|
{
|
||||||
parent::ApplyChanges();
|
parent::ApplyChanges();
|
||||||
@@ -199,6 +325,10 @@ class Ladestation_v2 extends IPSModule
|
|||||||
{
|
{
|
||||||
switch ($Ident) {
|
switch ($Ident) {
|
||||||
|
|
||||||
|
case "UpdateStationForm":
|
||||||
|
$this->UpdateStationForm((int)$Value);
|
||||||
|
break;
|
||||||
|
|
||||||
case "SetAktuelle_Leistung":
|
case "SetAktuelle_Leistung":
|
||||||
$this->SetValue("Power", (int)$Value);
|
$this->SetValue("Power", (int)$Value);
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user