01638 474849

View & Test MQTT Messages in the Amazon AWS IoT MQTT Client

8th June 2018

If you are using the Amazon AWS IoT platform for your IoT devices then the MQTT Client test can help you get more insight into possible issues you may be having. The AWS IoT MQTT client can help you better understand or find “unknowns” by viewing messages that are being sent by your device.

This tool is specially useful if your IoT device is mobile and constantly on the move as getting MQTT logs may be difficult or not even possible.

 

To access the MQTT messages:

  • Login and navigate to the AWS IoT console, click the Test” link in the left navigation panel.
  • You will then need to subscribe to a topic on which your thing/device publishes on, examples of this can be found below.

 

Here are examples of topics you can subscribe (you will need to include the clientId of each device) to to show thing/device messages when it connects, disconnects, subscribes and un-subscribes:

  • $aws/events/presence/connected/clientId
  • $aws/events/presence/disconnected/clientId
  • $aws/events/subscriptions/subscribed/clientId
  • $aws/events/subscriptions/unsubscribed/clientId

 

For a more detailed look into the what the thing is publishing to the shadow (you will need to include the thing name) you can you the following subscription topics:

  • $aws/things/thingName/shadow/update

 

Alternatively you can use wildcards to check against the queries:

  • + is for directories
  • # is for ending lines.

 

Example:

$aws/events/presence/connected/clientId 

AND $aws/events/presence/disconnected/clientId

IS… $aws/events/presence/+/clientId

 

Or this will show all the things not just one you query:

$aws/events/presence/+/#

 

  • #amazon
  • #aws
  • #awsconsole
  • #iot
  • #mqtt
  • #mqtt client
  • #subscribe
  • #thingname
  • #things
View & Test MQTT Messages in the Amazon AWS IoT MQTT Client