1 個回答
- 最新
- 最多得票
- 最多評論
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
相關內容
- 已提問 6 個月前
- AWS 官方已更新 1 年前
- AWS 官方已更新 3 年前
- AWS 官方已更新 2 年前
- AWS 官方已更新 1 年前
Thank you . And can you help me with what is a good practice to store the metadata ?