1 Answer
- Newest
- Most votes
- Most comments
1
Hi, to store data related to the device that changes over time you can use Thing Shadows. To report state you will publish your data on $aws/thing/<thing_name>/shadow/update
in the following format
{
"state": {
"reported": {
"battery": 0.40
}
}
}
To read the data you can either use the Thing Shadow REST API GetThingShadow
[1] or subscribe to $aws/thing/<thing_name>/shadow/get/+
and publish a message on $aws/thing/<thing_name>/shadow/get
. [2]
[1] https://docs.aws.amazon.com/iot/latest/apireference/API_iotdata_GetThingShadow.html [2] https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html
Relevant content
- asked a year ago
- Accepted Answerasked 2 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
Thank you . And can you help me with what is a good practice to store the metadata ?