Begin setup for receiving state changes

This commit is contained in:
Skylar Grant 2024-08-15 11:20:24 -04:00
parent f09f4dcf24
commit ab89e2e256

View File

@ -65,6 +65,11 @@ export class Communicator {
}); });
}); });
// Handle when the Broker sends us a message
client.on('message', (topic, message) => {
console.log(`Message received on topic ${topic}: ${message.toString()}`);
});
} }
// Publish a message to the MQTT Broker // Publish a message to the MQTT Broker