From 2749b9e5fbf72fca31caa3cf3f44cdc3f7af647a Mon Sep 17 00:00:00 2001 From: "belevo\\mh" Date: Wed, 16 Oct 2024 09:09:44 +0200 Subject: [PATCH] =?UTF-8?q?Debug=20Nachrichten=20f=C3=BCr=20URL=20und=20js?= =?UTF-8?q?on=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Belevo_Server_Kommunikation/module.php | 6 ++++-- library.json | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Belevo_Server_Kommunikation/module.php b/Belevo_Server_Kommunikation/module.php index e68c1ab..5c5c48f 100644 --- a/Belevo_Server_Kommunikation/module.php +++ b/Belevo_Server_Kommunikation/module.php @@ -83,6 +83,8 @@ class Belevo_Server_Kommunikation extends IPSModule if (!empty($anlagenummer) && !empty($json)) { // Kombiniere die URL mit der Anlagenummer $fullURL = $baseURL . $anlagenummer; + IPS_LogMessage("Belevo_Server_Kommunikation", "URL: $fullURL"); + IPS_LogMessage("Belevo_Server_Kommunikation", "JSON: $json"); $this->SendJsonToInfluxDB($fullURL, $json); } else { IPS_LogMessage("Belevo_Server_Kommunikation", "Keine Aufzeichnung im Influx: Anlagenummer oder JSON-Daten fehlen->GetAction()"); @@ -155,7 +157,7 @@ return $json; ], ]; $context = stream_context_create($options); - /* + $result = file_get_contents($url, false, $context); if ($result === FALSE) { @@ -163,7 +165,7 @@ return $json; IPS_LogMessage("Belevo_Server_Kommunikation", "Fehler beim senden an Influx->SendJsonToInfluxDB()"); } else { IPS_LogMessage("Belevo_Server_Kommunikation", "Daten erfolgreich an Influx gesendet->SendJsonToInfluxDB()"); - }*/ + } } diff --git a/library.json b/library.json index aecc774..9be6957 100644 --- a/library.json +++ b/library.json @@ -6,7 +6,7 @@ "compatibility": { "version": "7.1" }, - "version": "0.42", + "version": "0.43", "build": 0, "date": 0 } \ No newline at end of file