no message
This commit is contained in:
@@ -346,12 +346,13 @@ public function ReceiveData($JSONString)
|
||||
return;
|
||||
}
|
||||
|
||||
$topic = $data['Topic'] ?? '';
|
||||
$topic = $data['Topic'] ?? '';
|
||||
$payload = $data['Payload'] ?? '';
|
||||
|
||||
$suffix = $this->ReadPropertyString('TopicSuffix');
|
||||
|
||||
if ($topic === 'feedback-request/' . $suffix) {
|
||||
|
||||
$json = $this->BuildReadResponse();
|
||||
|
||||
$this->PublishMQTT(
|
||||
@@ -363,6 +364,7 @@ public function ReceiveData($JSONString)
|
||||
}
|
||||
|
||||
if ($topic === 'remote-control-request/' . $suffix) {
|
||||
|
||||
$json = $this->HandleRemoteControlJSON($payload);
|
||||
|
||||
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)
|
||||
{
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user