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
posta 5 mesi fa156 visualizzazioni
1 Risposta
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
con risposta 5 mesi fa
profile picture
ESPERTO
verificato un mese fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande