synatx fehler

This commit is contained in:
belevo\mh
2024-11-06 14:32:34 +01:00
parent a2ea308f01
commit e228975611
3 changed files with 8 additions and 4 deletions

View File

@@ -22,7 +22,7 @@
},
{
"type": "ValidationTextBox",
"name": "GeräteNummer",
"name": "Gerätenummer",
"caption": "Gerätenummer"
},
{

View File

@@ -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,