no message
This commit is contained in:
@@ -436,23 +436,6 @@ class MQTTBatterySDL extends IPSModule
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
private function PublishMQTT(string $topic, string $payload)
|
|
||||||
{
|
|
||||||
$this->SafeSend([
|
|
||||||
'DataID' => '{043EA491-0325-4ADD-8FC2-A30C8EEB4D3F}',
|
|
||||||
'PacketType' => 3,
|
|
||||||
'QualityOfService' => 0,
|
|
||||||
'Retain' => false,
|
|
||||||
'Topic' => $topic,
|
|
||||||
'Payload' => $payload
|
|
||||||
]);
|
|
||||||
|
|
||||||
$this->SendDebug('PublishMQTT', $topic . ' → ' . $payload, 0);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
|
|
||||||
private function PublishViaHelper(string $topic, string $payload)
|
private function PublishViaHelper(string $topic, string $payload)
|
||||||
{
|
{
|
||||||
$id = $this->ReadPropertyInteger('PublishInstanceID');
|
$id = $this->ReadPropertyInteger('PublishInstanceID');
|
||||||
@@ -499,44 +482,6 @@ public function DoDelayedPublish()
|
|||||||
'Payload' => $payload
|
'Payload' => $payload
|
||||||
]));
|
]));
|
||||||
}
|
}
|
||||||
/* Von DH auskommentiert am 2.6.
|
|
||||||
public function DoDelayedPublish()
|
|
||||||
{
|
|
||||||
$this->SetTimerInterval('PublishDelay', 0);
|
|
||||||
|
|
||||||
$topic = $this->GetBuffer('PublishTopic');
|
|
||||||
$payload = $this->GetBuffer('PublishPayload');
|
|
||||||
|
|
||||||
$this->SetBuffer('PublishTopic', '');
|
|
||||||
$this->SetBuffer('PublishPayload', '');
|
|
||||||
|
|
||||||
if ($topic == '' || $payload == '') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->PublishViaHelper($topic, $payload);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
private function SafeSend(array $packet)
|
|
||||||
{
|
|
||||||
$parent = @IPS_GetInstance($this->InstanceID)['ConnectionID'] ?? 0;
|
|
||||||
|
|
||||||
if ($parent === 0 || !IPS_InstanceExists($parent)) {
|
|
||||||
$this->SendDebug('SafeSend', 'Kein Parent vorhanden', 0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IPS_GetInstance($parent)['InstanceStatus'] !== 102) {
|
|
||||||
$this->SendDebug('SafeSend', 'Parent nicht aktiv', 0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
@$this->SendDataToParent(json_encode($packet));
|
|
||||||
}
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
private function IsValidVariable(int $id)
|
private function IsValidVariable(int $id)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user