Debug Nachrichten für URL und json hinzugefügt

This commit is contained in:
belevo\mh
2024-10-16 09:09:44 +02:00
parent e704592c03
commit 2749b9e5fb
2 changed files with 5 additions and 3 deletions

View File

@@ -83,6 +83,8 @@ class Belevo_Server_Kommunikation extends IPSModule
if (!empty($anlagenummer) && !empty($json)) { if (!empty($anlagenummer) && !empty($json)) {
// Kombiniere die URL mit der Anlagenummer // Kombiniere die URL mit der Anlagenummer
$fullURL = $baseURL . $anlagenummer; $fullURL = $baseURL . $anlagenummer;
IPS_LogMessage("Belevo_Server_Kommunikation", "URL: $fullURL");
IPS_LogMessage("Belevo_Server_Kommunikation", "JSON: $json");
$this->SendJsonToInfluxDB($fullURL, $json); $this->SendJsonToInfluxDB($fullURL, $json);
} else { } else {
IPS_LogMessage("Belevo_Server_Kommunikation", "Keine Aufzeichnung im Influx: Anlagenummer oder JSON-Daten fehlen->GetAction()"); 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); $context = stream_context_create($options);
/*
$result = file_get_contents($url, false, $context); $result = file_get_contents($url, false, $context);
if ($result === FALSE) { if ($result === FALSE) {
@@ -163,7 +165,7 @@ return $json;
IPS_LogMessage("Belevo_Server_Kommunikation", "Fehler beim senden an Influx->SendJsonToInfluxDB()"); IPS_LogMessage("Belevo_Server_Kommunikation", "Fehler beim senden an Influx->SendJsonToInfluxDB()");
} else { } else {
IPS_LogMessage("Belevo_Server_Kommunikation", "Daten erfolgreich an Influx gesendet->SendJsonToInfluxDB()"); IPS_LogMessage("Belevo_Server_Kommunikation", "Daten erfolgreich an Influx gesendet->SendJsonToInfluxDB()");
}*/ }
} }

View File

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