no message
This commit is contained in:
@@ -72,24 +72,27 @@ class VGT_Sub extends IPSModule
|
||||
if (!$this->HasActiveParent()) return;
|
||||
|
||||
$this->SendDataToParent(json_encode([
|
||||
"DataID" => "{A1B5C433-4F17-462D-AD71-383F5BBE4F5A}",
|
||||
"Type" => "SUBSCRIBE",
|
||||
"Topic" => $topic
|
||||
"DataID" => "{F7A0DD2E-7684-95C0-64C2-D2A9DC47577B}",
|
||||
"Buffer" => [
|
||||
"Topic" => $topic,
|
||||
"QualityOfService" => 0
|
||||
]
|
||||
]));
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------
|
||||
* MQTT Publish
|
||||
* ---------------------------------------------------------*/
|
||||
private function Publish(string $topic, string $payload)
|
||||
{
|
||||
if (!$this->HasActiveParent()) return;
|
||||
|
||||
$this->SendDataToParent(json_encode([
|
||||
"DataID" => "{A1B5C433-4F17-462D-AD71-383F5BBE4F5A}",
|
||||
"Type" => "PUBLISH",
|
||||
"Topic" => $topic,
|
||||
"Payload" => $payload
|
||||
"DataID" => "{F7A0DD2E-7684-95C0-64C2-D2A9DC47577B}",
|
||||
"Buffer" => [
|
||||
"Command" => "PUBLISH",
|
||||
"Topic" => $topic,
|
||||
"Payload" => $payload,
|
||||
"Retain" => false,
|
||||
"QualityOfService" => 0
|
||||
]
|
||||
]));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user