A device shadow is the projection of a device in the cloud, which also contains the device firmware information. The relationship between a device shadow and OTA is as follows:
- When a device is activated, the device reports the firmware information to the cloud. Then, the cloud creates a shadow for the device.
- When detecting firmware updates, the cloud compares the firmware version of the device shadow with the available version to determine whether an update is required.
- When pushing the update to the device, the cloud delivers the new firmware to the device by using multiple message exchanges. For more information, see the OTA protocol.
- After the device is updated, it reports the latest firmware information to the cloud, and the cloud updates the device shadow.