add more logs
parent
1f069904bc
commit
e1877d6761
|
@ -66,7 +66,6 @@ $mqtt->onMessage(function ($message) use (
|
||||||
&$isRunning,
|
&$isRunning,
|
||||||
$mqttTopic
|
$mqttTopic
|
||||||
) {
|
) {
|
||||||
logit("got message");
|
|
||||||
if ($mqttTopic . "/restart" === $message->topic) {
|
if ($mqttTopic . "/restart" === $message->topic) {
|
||||||
$isRunning = false;
|
$isRunning = false;
|
||||||
return;
|
return;
|
||||||
|
@ -86,6 +85,14 @@ $mqtt->onMessage(function ($message) use (
|
||||||
$payload["timestamp"] = time();
|
$payload["timestamp"] = time();
|
||||||
$data[] = $payload;
|
$data[] = $payload;
|
||||||
$news = true;
|
$news = true;
|
||||||
|
logit(
|
||||||
|
"got message for " .
|
||||||
|
$payload["name"] .
|
||||||
|
": " .
|
||||||
|
implode(", ", $payload["labels"]) .
|
||||||
|
" with value " .
|
||||||
|
$payload["value"]
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
logit("Subscribing to $mqttTopic with QoS $qos ");
|
logit("Subscribing to $mqttTopic with QoS $qos ");
|
||||||
|
|
Loading…
Reference in New Issue