From ff483e8c6af31ff4f3049d39626ddfa05c2ad572 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20H=C3=A4fliger?= Date: Thu, 19 Dec 2024 10:59:18 +0100 Subject: [PATCH] url war unbekannt --- Ladestation_Universal/module.php | 28 +++++++++++++++++++--------- library.json | 2 +- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/Ladestation_Universal/module.php b/Ladestation_Universal/module.php index c78a505..da6dafe 100644 --- a/Ladestation_Universal/module.php +++ b/Ladestation_Universal/module.php @@ -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 diff --git a/library.json b/library.json index 5832438..3acffa2 100644 --- a/library.json +++ b/library.json @@ -6,7 +6,7 @@ "compatibility": { "version": "7.1" }, - "version": "0.203", + "version": "0.204", "build": 0, "date": 0 } \ No newline at end of file