feat: Add logging for received MQTT messages and remove mock data generation in useBedPressureData

This commit is contained in:
Siwat Sirichai 2025-06-21 19:03:14 +07:00
parent 9eb57f675b
commit 7e5ed7f26b
3 changed files with 3 additions and 166 deletions

View file

@ -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);