womögliche Influx Server behoben
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"compatibility": {
|
||||
"version": "7.1"
|
||||
},
|
||||
"version": "0.39",
|
||||
"version": "0.40",
|
||||
"build": 0,
|
||||
"date": 0
|
||||
}
|
||||
Reference in New Issue
Block a user