How do you use the local shadow service from a connected device in GG v2?

0

How do I interact with local shadows from a connected device? I see information about configuring the Shadow component to sync various IoT Things' shadows to a core device, and I can see that from a GG v2 component running on that same core I would be able to access the shadow, but I'm hoping that there's a way to have a connected device interact with its local shadow. Thanks!

Edited by: jjvic on Sep 22, 2021 11:21 AM

jjvic
질문됨 3년 전454회 조회
1개 답변
0

Hi,

Thank you very much for using Greengrass V2. The integration between client devices and shadow is being worked on right now. It will be available to use in a couple of months.

Until then, we advise the customers to create a new GG v2 component which will act as a bridge between the Client device and Shadow manager. This new component can convert the local MQTT message into the shadow operation using the GG v2 SDK. When deploying the new component, the customer should add some configuration in the MQTT bridge to translate the local MQTT messages to local PubSub messages (on which the new component is listening on). The customers should also add the specific configurations in MQTT bridge to translate the local PubSub messages to local MQTT messages.

eg MQTT Bridge configuration:

{
"mqttTopicMapping": {
"ClientDevice1Mapping": {
"topic": "$aws/things/MyThingName/shadow/update/accepted",
"source": "Pubsub",
"target": "LocalMqtt"
},
"ClientDevice2Mapping": {
"topic": "$aws/things/MyThingName/shadow/update/rejected",
"source": "Pubsub",
"target": "LocalMqtt"
}
}
}

Cheers,
Nikkhil

Edited by: nikkhilataws on Sep 29, 2021 10:36 AM

AWS
답변함 3년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠