no message

This commit is contained in:
dh
2025-11-27 14:29:24 +01:00
parent efb3493d50
commit b5f50e0e24
+13 -10
View File
@@ -72,24 +72,27 @@ class VGT_Sub extends IPSModule
if (!$this->HasActiveParent()) return; if (!$this->HasActiveParent()) return;
$this->SendDataToParent(json_encode([ $this->SendDataToParent(json_encode([
"DataID" => "{A1B5C433-4F17-462D-AD71-383F5BBE4F5A}", "DataID" => "{F7A0DD2E-7684-95C0-64C2-D2A9DC47577B}",
"Type" => "SUBSCRIBE", "Buffer" => [
"Topic" => $topic "Topic" => $topic,
"QualityOfService" => 0
]
])); ]));
} }
/* ---------------------------------------------------------
* MQTT Publish
* ---------------------------------------------------------*/
private function Publish(string $topic, string $payload) private function Publish(string $topic, string $payload)
{ {
if (!$this->HasActiveParent()) return; if (!$this->HasActiveParent()) return;
$this->SendDataToParent(json_encode([ $this->SendDataToParent(json_encode([
"DataID" => "{A1B5C433-4F17-462D-AD71-383F5BBE4F5A}", "DataID" => "{F7A0DD2E-7684-95C0-64C2-D2A9DC47577B}",
"Type" => "PUBLISH", "Buffer" => [
"Topic" => $topic, "Command" => "PUBLISH",
"Payload" => $payload "Topic" => $topic,
"Payload" => $payload,
"Retain" => false,
"QualityOfService" => 0
]
])); ]));
} }