Publish Shadow Messages
Trimble IoT internally provides access to AWS IoT-reserved MQTT topics for different Shadow operations.
Device workflow for shadow messages:
-
Subscribe to the shadow response topics.
({ShadowPrefix}/update/accepted, {ShadowPrefix}/update/rejected, {ShadowPrefix}/update/delta, update/documents, {ShadowPrefix}/get/accepted, {ShadowPrefix}/get/rejected, {ShadowPrefix}/delete/accepted, and {ShadowPrefix}/delete/rejected) -
Applications can update or delete the shadow using the respective API calls.
-
The device will receive notifications in the shadow response topics.
({ShadowPrefix}/update/accepted, {ShadowPrefix}/update/rejected, {ShadowPrefix}/update/delta, update/documents, {ShadowPrefix}/delete/accepted, and {ShadowPrefix}/delete/rejected)When a device is offline, the device can use the topic
{ShadowPrefix}/getto get the current shadow state. -
A device can update or delete the reported properties using the topics
**{ShadowPrefix}/update**or{ShadowPrefix}/delete. -
Applications can monitor the reported properties set by devices using the Get Shadow API.
{ShadowPrefix}refers to named ($aws/thing/{clientId}/shadow)/name/{shadowName}) or classic shadow ($aws/thing/{clientId}/shadow).
!!!Note {ShadowPrefix} refers to either
* `$aws/thing/{clientId}/shadow/name/{shadowName}` in case of named shadow
OR
* `$aws/thing/{clientId}/shadow` in case of classic shadow