Anpassugne an erkennung der autos
This commit is contained in:
@@ -201,7 +201,7 @@ class Ladestation_v2 extends IPSModule
|
|||||||
public function Get_Car_Status(int $carType)
|
public function Get_Car_Status(int $carType)
|
||||||
{
|
{
|
||||||
$ch = curl_init();
|
$ch = curl_init();
|
||||||
|
$car_on_station = false;
|
||||||
switch ($carType) {
|
switch ($carType) {
|
||||||
case 1:
|
case 1:
|
||||||
curl_setopt($ch, CURLOPT_URL, "http://" . $this->ReadPropertyString("IP_Adresse") . "/mqtt?payload=");
|
curl_setopt($ch, CURLOPT_URL, "http://" . $this->ReadPropertyString("IP_Adresse") . "/mqtt?payload=");
|
||||||
@@ -217,6 +217,12 @@ class Ladestation_v2 extends IPSModule
|
|||||||
else{
|
else{
|
||||||
$this->SetValue("Car_detected", false);
|
$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("Ladeleistung_Effektiv", $data["nrg"][11]*10);
|
||||||
$this->SetValue("Fahrzeugstatus", $data["car"]);
|
$this->SetValue("Fahrzeugstatus", $data["car"]);
|
||||||
}
|
}
|
||||||
@@ -236,6 +242,12 @@ class Ladestation_v2 extends IPSModule
|
|||||||
else{
|
else{
|
||||||
$this->SetValue("Car_detected", false);
|
$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("Ladeleistung_Effektiv", $data["nrg"][11]);
|
||||||
$this->SetValue("Fahrzeugstatus", $data["car"]);
|
$this->SetValue("Fahrzeugstatus", $data["car"]);
|
||||||
}
|
}
|
||||||
@@ -257,6 +269,12 @@ class Ladestation_v2 extends IPSModule
|
|||||||
else{
|
else{
|
||||||
$this->SetValue("Car_detected", false);
|
$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("Ladeleistung_Effektiv", round($data["ActiveChargingPower"]*1000));
|
||||||
$this->SetValue("Fahrzeugstatus", $data["State"]);
|
$this->SetValue("Fahrzeugstatus", $data["State"]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user