The AWS IoT Device Shadow service stores device states in objects called "shadows".
Shadows are capable of handling intermittently connected devices. When a device is not connected, updates to the shadow state in the cloud are stored until the device is next connected. Then, once connected, the changes are sent to the device for action.
Ioto makes it easy to use shadow state by automatically connecting to the AWS IoT Shadow service and by providing an easy get/set API on the device.
- Local copy of AWS IoT Device Shadow on device.
- Convenience device API to get / set shadow state properties.
- Controllable state synchronization with AWS IoT Shadows.
- Local persistence of shadow state.
The Ioto agent automatically initializes an AWS Shadow state connection and subscribes to the required MQTT topics for data synchronization.
When shadows updates are received from the cloud, the agent saves these in a local shadow state file called "shadow.json5". When the agent reboots, the local shadow state is read to be immediately available while the AWS cloud shadows are consulted for any updates.