diff --git a/Belevo_Server_Kommunikation/module.php b/Belevo_Server_Kommunikation/module.php index 693f468..e8f2cd2 100644 --- a/Belevo_Server_Kommunikation/module.php +++ b/Belevo_Server_Kommunikation/module.php @@ -106,7 +106,7 @@ $netzbezug = GetValue($this->ReadPropertyInteger("Netzbezug")); // Werte in ein Array packen $data = [ - "measurement" => $this->ReadPropertyString("Anlagenummer"), + "measurement" => GetValue($this->ReadPropertyString("Anlagenummer")), "field" =>[ //"G_BT_5M_0" => $this->GetValue("G_BT_5M_0"), //"G_SK_5M_3" => $this->GetValue("G_SK_5M_3"), @@ -131,7 +131,7 @@ return $json; if (empty($token)) { IPS_LogMessage("Belevo_Server_Kommunikation", "InfluxDB-Token fehlt->SendJsonToInfluxDB"); return; - }*/ + }*/ /* $headers = [ "Content-Type: application/json", //"Authorization: Bearer $token" // Wenn der Token gebraucht wird, füge ihn hier hinzu @@ -144,6 +144,16 @@ return $json; 'content' => $json, // Hier wird das JSON im Body gesendet ], ]; + */ + $options = [ + 'http' => [ + 'header' => "Content-Type: application/json\r\n". + "daten: $json". + "id: test\r\n", + 'method' => 'POST', + + ], + ]; $context = stream_context_create($options); $result = file_get_contents($url, false, $context); diff --git a/library.json b/library.json index 858bcee..5ac3ca5 100644 --- a/library.json +++ b/library.json @@ -6,7 +6,7 @@ "compatibility": { "version": "7.1" }, - "version": "0.39", + "version": "0.40", "build": 0, "date": 0 } \ No newline at end of file