pollen hinzugefügt
This commit is contained in:
@@ -20,7 +20,7 @@ class Symcon_Publish_to_Shelly_MQTT extends IPSModule
|
|||||||
$this->RegisterPropertyString("method", "Switch.Set");
|
$this->RegisterPropertyString("method", "Switch.Set");
|
||||||
$this->RegisterPropertyInteger("switch_bool", 0); // ID der Bool-Variable
|
$this->RegisterPropertyInteger("switch_bool", 0); // ID der Bool-Variable
|
||||||
|
|
||||||
|
$this->RegisterTimer("Timer_Influx",5000,"IPS_RequestAction(" . $this->InstanceID . ', "GetAction", "");');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function ApplyChanges()
|
public function ApplyChanges()
|
||||||
@@ -28,7 +28,6 @@ class Symcon_Publish_to_Shelly_MQTT extends IPSModule
|
|||||||
parent::ApplyChanges();
|
parent::ApplyChanges();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function RequestAction($Ident, $Value)
|
public function RequestAction($Ident, $Value)
|
||||||
{
|
{
|
||||||
IPS_LogMessage("ShellySwitchSender", "RequestAction gestartet");
|
IPS_LogMessage("ShellySwitchSender", "RequestAction gestartet");
|
||||||
@@ -90,7 +89,7 @@ class Symcon_Publish_to_Shelly_MQTT extends IPSModule
|
|||||||
if ($mqtt->connect(true, NULL, $username, $password)) {
|
if ($mqtt->connect(true, NULL, $username, $password)) {
|
||||||
IPS_LogMessage("ShellySwitchSender", "Verbunden mit dem MQTT-Broker");
|
IPS_LogMessage("ShellySwitchSender", "Verbunden mit dem MQTT-Broker");
|
||||||
$mqtt->publish($topic, $payload, 0);
|
$mqtt->publish($topic, $payload, 0);
|
||||||
IPS_LogMessage("ShellySwitchSender", "Nachricht gesende");
|
IPS_LogMessage("ShellySwitchSender", "Nachricht gesendet");
|
||||||
$mqtt->close();
|
$mqtt->close();
|
||||||
} else {
|
} else {
|
||||||
IPS_LogMessage("ShellySwitchSender", "Verbindung fehlgeschlagen");
|
IPS_LogMessage("ShellySwitchSender", "Verbindung fehlgeschlagen");
|
||||||
|
|||||||
Reference in New Issue
Block a user