Anpassugne an erkennung der autos

This commit is contained in:
2025-04-15 09:30:44 +02:00
parent 397983447e
commit 6872a5f793

View File

@@ -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"]);