From 6872a5f793fedf1bcd466b659ef6a27075bbef54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20H=C3=A4fliger?= Date: Tue, 15 Apr 2025 09:30:44 +0200 Subject: [PATCH] Anpassugne an erkennung der autos --- Ladestation_v2/module.php | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/Ladestation_v2/module.php b/Ladestation_v2/module.php index faf7b34..f56d201 100644 --- a/Ladestation_v2/module.php +++ b/Ladestation_v2/module.php @@ -201,7 +201,7 @@ class Ladestation_v2 extends IPSModule public function Get_Car_Status(int $carType) { $ch = curl_init(); - + $car_on_station = false; switch ($carType) { case 1: curl_setopt($ch, CURLOPT_URL, "http://" . $this->ReadPropertyString("IP_Adresse") . "/mqtt?payload="); @@ -217,6 +217,12 @@ class Ladestation_v2 extends IPSModule else{ $this->SetValue("Car_detected", false); }*/ + if ($data["car"] != 1) { + $car_on_station = true; + } + else{ + $car_on_station = false; + } $this->SetValue("Ladeleistung_Effektiv", $data["nrg"][11]*10); $this->SetValue("Fahrzeugstatus", $data["car"]); } @@ -236,6 +242,12 @@ class Ladestation_v2 extends IPSModule else{ $this->SetValue("Car_detected", false); }*/ + if ($data["car"] != 1) { + $car_on_station = true; + } + else{ + $car_on_station = false; + } $this->SetValue("Ladeleistung_Effektiv", $data["nrg"][11]); $this->SetValue("Fahrzeugstatus", $data["car"]); } @@ -257,6 +269,12 @@ class Ladestation_v2 extends IPSModule else{ $this->SetValue("Car_detected", false); }*/ + if ($data["car"] != 1) { + $car_on_station = true; + } + else{ + $car_on_station = false; + } $this->SetValue("Ladeleistung_Effektiv", round($data["ActiveChargingPower"]*1000)); $this->SetValue("Fahrzeugstatus", $data["State"]);