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

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

View File

@@ -6,7 +6,7 @@
"compatibility": {
"version": "7.1"
},
"version": "0.203",
"version": "0.204",
"build": 0,
"date": 0
}