From e228975611d20403f8b53b4a96d9236a26387e78 Mon Sep 17 00:00:00 2001 From: "belevo\\mh" Date: Wed, 6 Nov 2024 14:32:34 +0100 Subject: [PATCH] synatx fehler --- Belevo_Server_Kommunikation/form.json | 2 +- Belevo_Server_Kommunikation/module.php | 8 ++++++-- library.json | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Belevo_Server_Kommunikation/form.json b/Belevo_Server_Kommunikation/form.json index 129bf2a..2bd00b2 100644 --- a/Belevo_Server_Kommunikation/form.json +++ b/Belevo_Server_Kommunikation/form.json @@ -22,7 +22,7 @@ }, { "type": "ValidationTextBox", - "name": "GeräteNummer", + "name": "Gerätenummer", "caption": "Gerätenummer" }, { diff --git a/Belevo_Server_Kommunikation/module.php b/Belevo_Server_Kommunikation/module.php index 1c06bbc..e37636f 100644 --- a/Belevo_Server_Kommunikation/module.php +++ b/Belevo_Server_Kommunikation/module.php @@ -17,7 +17,7 @@ class Belevo_Server_Kommunikation extends IPSModule $this->RegisterPropertyString("ZusatzVariablen", json_encode([]));// Bezeichnung der Liste $this->RegisterPropertyString("Variable","0"); // Datenpunkt kann im Syncom ausgewählt werden $this->RegisterPropertyString("Variablenname","0"); // Name für Influxaufzeichnung - $this->RegisterPropertyString("GeräteNummer","0"); + $this->RegisterPropertyString("Gerätenummer","0"); // Timer registrieren $this->RegisterTimer("Timer_Influx", 0, 'IPS_RequestAction(' . $this->InstanceID . ', "GetAction", "");'); @@ -146,9 +146,13 @@ public function MakeJson($json) private function SendJsonToInfluxDB($url, $jsonData) { + $pw = $this->ReadPropertyString("Gerätenummer"); + if (empty($pw)) { + IPS_LogMessage("Belevo_Server_Kommunikation", "Fehler: Gerätenummer ist leer."); + return; + } // cURL Initialisieren $curl = curl_init(); - $pw =$this->ReadPropertyString("GeräteNummer"); // Optionen für cURL-Request definieren curl_setopt_array($curl, [ CURLOPT_URL => $url, diff --git a/library.json b/library.json index e807de0..3ba1d91 100644 --- a/library.json +++ b/library.json @@ -6,7 +6,7 @@ "compatibility": { "version": "7.1" }, - "version": "0.87", + "version": "0.88", "build": 0, "date": 0 } \ No newline at end of file