no message
This commit is contained in:
@@ -352,6 +352,7 @@ public function ReceiveData($JSONString)
|
|||||||
$suffix = $this->ReadPropertyString('TopicSuffix');
|
$suffix = $this->ReadPropertyString('TopicSuffix');
|
||||||
|
|
||||||
if ($topic === 'feedback-request/' . $suffix) {
|
if ($topic === 'feedback-request/' . $suffix) {
|
||||||
|
|
||||||
$json = $this->BuildReadResponse();
|
$json = $this->BuildReadResponse();
|
||||||
|
|
||||||
$this->PublishMQTT(
|
$this->PublishMQTT(
|
||||||
@@ -363,6 +364,7 @@ public function ReceiveData($JSONString)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($topic === 'remote-control-request/' . $suffix) {
|
if ($topic === 'remote-control-request/' . $suffix) {
|
||||||
|
|
||||||
$json = $this->HandleRemoteControlJSON($payload);
|
$json = $this->HandleRemoteControlJSON($payload);
|
||||||
|
|
||||||
if ($json !== null) {
|
if ($json !== null) {
|
||||||
@@ -376,6 +378,26 @@ public function ReceiveData($JSONString)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private function PublishMQTT(string $topic, string $payload)
|
||||||
|
{
|
||||||
|
$this->SendDebug(
|
||||||
|
'PublishMQTT',
|
||||||
|
$topic . ' => ' . $payload,
|
||||||
|
0
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->SendDataToParent(json_encode([
|
||||||
|
'DataID' => '{7F7632D9-FA40-4F38-8DEA-C83CD4325A32}',
|
||||||
|
'PacketType' => 3,
|
||||||
|
'Payload' => $payload,
|
||||||
|
'QualityOfService' => 0,
|
||||||
|
'Retain' => false,
|
||||||
|
'Topic' => $topic
|
||||||
|
]));
|
||||||
|
}
|
||||||
|
|
||||||
private function IsValidVariable(int $id)
|
private function IsValidVariable(int $id)
|
||||||
{
|
{
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user