Skip to content

Publish Shadow Messages

Trimble IoT internally provides access to AWS IoT-reserved MQTT topics for different Shadow operations.

Device workflow for shadow messages:

  1. 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)

  2. Applications can update or delete the shadow using the respective API calls.

  3. 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}/get to get the current shadow state.

  4. A device can update or delete the reported properties using the topics **{ShadowPrefix}/update** or {ShadowPrefix}/delete.

  5. 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