From cd1f1ca6deed5b7395d89f5fb0e9a92dccc71618 Mon Sep 17 00:00:00 2001 From: "belevo\\mh" Date: Mon, 4 Nov 2024 10:36:05 +0100 Subject: [PATCH] verbessert --- Belevo_Server_Kommunikation/module.php | 27 +++++++++++++------------- library.json | 2 +- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/Belevo_Server_Kommunikation/module.php b/Belevo_Server_Kommunikation/module.php index b6a5fb4..1ca7c02 100644 --- a/Belevo_Server_Kommunikation/module.php +++ b/Belevo_Server_Kommunikation/module.php @@ -116,6 +116,9 @@ $data = [ //"G_SK_5M_3" => $this->GetValue("G_SK_5M_3"), //"G_SK_5M_4" => $this->GetValue("G_SK_5M_4"), "E_PNB_5M_0" => $netzbezug + ], + "Tags" => [ + "id" => "test" ] ]; @@ -154,25 +157,23 @@ return $json; */ -/* - $options = [ - 'http' => [ - 'header' => "Content-Type: application/json\r\n". - "daten: " . $json . "\r\n". - "id: test\r\n", - 'method' => 'POST', - - ], - ]; -*/ - $options = [ + + $options = [ + 'http' => [ + 'header' => "Content-Type: application/json\r\n", + 'method' => 'POST', + 'content' => $json + ], +]; + + /* $options = [ 'http' => [ 'header' => "daten: " . $json . "\r\n". "id: test\r\n", 'method' => 'POST', ], - ]; + ];*/ IPS_LogMessage("Belevo_Server_Kommunikation", "Options: " . print_r($options, true)); $context = stream_context_create($options); diff --git a/library.json b/library.json index ad5c85e..efd0cb6 100644 --- a/library.json +++ b/library.json @@ -6,7 +6,7 @@ "compatibility": { "version": "7.1" }, - "version": "0.53", + "version": "0.54", "build": 0, "date": 0 } \ No newline at end of file