no message
This commit is contained in:
+13
-10
@@ -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
|
||||||
|
]
|
||||||
]));
|
]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user