Validating the delivered sensor data
After compiling and uploading the updated code to ESP32, you can check the execution result in the local terminal window.
In the following screenshot, the publishing message shown includes the serialized JSON format payload as defined in the main code.
Figure 14.3 – Validate the result in the local terminal window
Now you can login to the AWS Management Console and select AWS IoT as shown in the following screenshot. Under Test, click MQTT test client.
Figure 14.4 – Locate the “MQTT test client” option in AWS IoT Core
Under Subscribe to a topic, find the Topic filter field and type in +/pub
. The +
wildcard character matches exactly one item in the topic hierarchy. For example, a subscription to Sensor/+/room1
will receive messages published to Sensor/temp/room1
, Sensor/moisture/room1
, and so on.
In the code of ESP32, we defined the topic by deviceID/pub...