MQTT Broker - Subscribing to a topic

v2.1 adds the ability for an external MQTT client to subscribe to a topic.  JEDI One topics include all data coming into JEDI One from any source (not just MQTT).  From within the MQTT client code or application, subscribe to a topic as follows:

For a specific data stream:

datacache/TargetID/#

Where datacache is the fixed, top level topic from JEDI One, and TargetID is the TargetID or IP address of the data stream of interest.

---------

Example:

Using MQTT Explorer, here is how to subscribe to the data stream, ESP32SensorUV1 on a JEDI system at IP address 192.168.1.51. Create the connection (for this example, this is an unencrypted, standard MQTT connection with a username and password as specified in the JEDI One MQTT Broker data collector setup).

mceclip0.png

Now click on ADVANCED:

Please note, MQTT Explorer by default subscribes to all topics using the wildcard, #.  Delete this entry.

Enter the desired topic as described above.  For this example, the topic is subscribing to a metric (TargetID = ESP32SensorUV1) that has multiple properties so # is used at the end of the topic string:

mceclip2.png

Click BACK, and then CONNECT.  Here are the results:

mceclip3.png

 

 

 

Was this article helpful?
0 out of 0 found this helpful