Project

General

Profile

MQTT

From YOUR Ubuntu virtual machine, you can run a command line program to be notified whenever your MQTT SERVER virtual machine gets MQTT updates. The following command will give you ALL updates from ANY topic:

mosquitto_sub -h <server URL> -t /#

Note that the "#" is the wildcard. Since the above command starts at the top of the hierarchy, it will give all topics. If your project naming convention is "/room/device" then using this will give you all the devices for the room JEC3332:

mosquitto_sub -h <server URL> -t /JEC3332/#

Note that a similar program can be written for Windows/Mac.

Connecting to the Broker

Each device/program that connects to the broker MUST have a unique ID! It has been observed that duplicating an ID can cause those two devices/programs to continually disconnect and reconnect.