This article gives examples to introduce how to interact with device image using the MQTT.fx simulator.
Select Publish and enter the published topic.
In this example, the published topic name is: $sys/238322/mqtts-test-device/image/update
Below is an example of the payload:
{
"state": {
"reported": {
"color": "red"
}
}
}
Click Publish to upload data points to the platform, as shown below:
After completion, you can receive an update notification from the platform via Subscribe. If the message is received by .../accepted topic, it means that the message has been successfully processed by the platform, as shown below:
After update, you can view the updated image json by hitting the Refresh button, as shown below:
When there is a difference between the desired content and the reported content, the platform will send the message to the device by topic .../delta.
On the console page, the desired property is edited and updated to "color":"green", as shown below:
Click OK to save the edited image content. Due to the difference between desired and reported, delta will be automatically generated in the properties, as shown below:
When saving is completed, the simulator will receive a message from topic $sys/238322/mqtts-test-device/image/update/delta, which is used to inform the device that the reported current status is different from the desired application status, as shown below: