feat: Add logging for received MQTT messages and remove mock data generation in useBedPressureData
This commit is contained in:
parent
9eb57f675b
commit
7e5ed7f26b
3 changed files with 3 additions and 166 deletions
|
@ -132,6 +132,7 @@ class MQTT {
|
|||
|
||||
private onMessage(topic: string, message: Buffer): void {
|
||||
const msg = message.toString();
|
||||
console.log(`Received message on topic ${topic}:`, msg);
|
||||
this.subscriptions.forEach(sub => {
|
||||
if (this.matchTopic(sub.topic, topic)) {
|
||||
sub.callback(topic, msg);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue