Begin setup for receiving state changes
This commit is contained in:
parent
f09f4dcf24
commit
ab89e2e256
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user