The AWS Plugin "shadow_sample_console" example is working in the sense that any change that occurs to the Shadow when the device is running will be reported via UART print.
However, if there is a pending change when the device powers up, it will be ignored until an additional change is made. For example, in the following Shadow document, the "windowOpen" field was changed to true and AWS IoT added a "delta" record to indicate the changed field.
{
"desired": {
"welcome": "aws-iot",
"windowOpen": true,
"indication": false
},
"reported": {
"welcome": "aws-iot",
"temperature": 31.5,
"windowOpen": false,
"indication": false
},
"delta": {
"windowOpen": true
}
}
When the "shadow_sample_console" example starts, the pending delta is ignored. Another change to the Shadow will cause the demo to print out the accumulated deltas if the Thing is running.
For my application, the end-user is likely to reconfigure the device via the Shadow when the device is not connected. How can the sample code be updated to check for Shadow deltas at power-up?
Thank you,
Mark