add more logs

master
Dirk Heilig 2024-09-23 11:51:14 +02:00
parent baafedbf88
commit 77c10057fa
1 changed files with 2 additions and 11 deletions

View File

@ -86,17 +86,8 @@ $mqtt->onMessage(function ($message) use (
$data[] = $payload; $data[] = $payload;
$news = true; $news = true;
$v = []; $v = [];
foreach ($$payload["labels"] as $key => $value) {
$v[] = $key . "=" . $value; logit("got message");
}
logit(
"got message for " .
$payload["name"] .
": " .
implode(", ", $payload["labels"]) .
" with value " .
implode(", ", $v)
);
}); });
logit("Subscribing to $mqttTopic with QoS $qos "); logit("Subscribing to $mqttTopic with QoS $qos ");