1 Risposta
- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
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
Contenuto pertinente
- AWS UFFICIALEAggiornata 2 anni fa
- AWS UFFICIALEAggiornata un anno fa
- AWS UFFICIALEAggiornata 3 anni fa
- AWS UFFICIALEAggiornata un anno fa
Thank you . And can you help me with what is a good practice to store the metadata ?