url war unbekannt

This commit is contained in:
2024-12-19 10:59:18 +01:00
parent 848496cfb0
commit ff483e8c6a
2 changed files with 20 additions and 10 deletions
+19 -9
View File
@@ -338,21 +338,31 @@ class Ladestation_Universal extends IPSModule
// First request
if($this->ReadPropertyInteger("Ladestation")==2){
$url = $baseUrl . "frc=2";
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response1 = curl_exec($ch);
// Check for errors
if (curl_errno($ch)) {
curl_close($ch);
return "Error:" . curl_error($ch);
}
}elseif($this->ReadPropertyInteger("Ladestation")==1){
$url = $baseUrl . "alw=1";
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response1 = curl_exec($ch);
// Check for errors
if (curl_errno($ch)) {
curl_close($ch);
return "Error:" . curl_error($ch);
}
}elseif($this->ReadPropertyInteger("Ladestation")==3){
// Nichts zu tun für Smart-Me station
}
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response1 = curl_exec($ch);
// Check for errors
if (curl_errno($ch)) {
curl_close($ch);
return "Error:" . curl_error($ch);
}
// Second request