exclude metadata from the topic when using the standard MQTT topics for shadow operations

0

$aws/things/thingname/shadow/name/myshadow/get This get shadow returns the complete payload along with the metadata. Which is useless for me and its also increases the size of the payload. How can I exclude metadata from the payload?

{ "metadata": { "desired": { "welcome": { "timestamp": 1699338422 }, "OS": { "timestamp": 1699989143 }, "LS": { "timestamp": 1699338423 }, "CV": { "timestamp": 1699989143 }, "MQ": { "timestamp": 1699989143 } }, "reported": { "welcome": { "timestamp": 1700744111 }, "LS": { "timestamp": 1700580432 }, "OS": { "timestamp": 1699988362 } } } }

Taha
preguntada hace 5 meses156 visualizaciones
1 Respuesta
0

Hello,

Inorder to reduce the size of shadow messages sent to your device, define a rule that selects only the fields your device needs then republishes the message on an MQTT topic to which your device is listening. Please refer the below documentation which mentions the same:

[+]. https://docs.aws.amazon.com/iot/latest/developerguide/iot-device-shadows.html#device-shadow-trim-messages

Thanks

AWS
respondido hace 5 meses
profile picture
EXPERTO
revisado hace un mes

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas