Closed ArvinSpace closed 1 year ago
I think that you do not understand what "merge" and "reset" means in Greengrass configuration.
You previously configured Shadow manager to synchronize Arvin-One-Basic-11 and you did not remove this configuration. To remove it, you need to use "reset": ["/synchronize/shadowDocuments"]
to remove the previous configuration you added.
Read more here: https://docs.aws.amazon.com/greengrass/v2/developerguide/update-component-configurations.html#reset-configuration-update
I think that you do not understand what "merge" and "reset" means in Greengrass configuration.
You previously configured Shadow manager to synchronize Arvin-One-Basic-11 and you did not remove this configuration. To remove it, you need to use
"reset": ["/synchronize/shadowDocuments"]
to remove the previous configuration you added.Read more here: https://docs.aws.amazon.com/greengrass/v2/developerguide/update-component-configurations.html#reset-configuration-update
谢谢,aws.greengrass.ShadowManager 配置重置之后可以了 而且也没有监听到异常数据了,这个就有点奇怪了,不知道之前异常数据是怎么产生的
Describe the bug
$aws/things/Arvin-One-Basic-11/shadow/update/accepted { "state": { "desired": { "color": "blue" }, "reported": { "color": "blue" } }, "metadata": { "desired": { "color": { "timestamp": 1679401009 } }, "reported": { "color": { "timestamp": 1679401009 } } }, "version": 654, "timestamp": 1679401009 }
$aws/things/Arvin-One-Basic-11/shadow/update/delta { "version": 1443, "timestamp": 1679401307, "state": { "color": "red" }, "metadata": { "color": { "timestamp": 1679401307 } } }
$aws/things/Arvin-One-Basic-11/shadow/update/accepted { "version": 3348, "clientToken": "166832f2-ded6-413a-9c93-93ce6b3a4f3d", "timestamp": 1679401156, "state": { "reported": { "color": "red" } }, "metadata": { "reported": { "color": { "timestamp": 1679401156 } } } }
$aws/things/Arvin-One-Basic-11/shadow/update/delta { "version": 3347, "timestamp": 1679401156, "state": { "color": "red" }, "metadata": { "color": { "timestamp": 1679401156 } }, "clientToken": "166832f2-ded6-413a-9c93-93ce6b3a4f3d" }
{ "RecipeFormatVersion": "2020-01-25", "ComponentName": "com.example.clientdevices.MySmartLightManager", "ComponentVersion": "1.0.0", "ComponentDescription": "A component that interacts with smart light client devices.", "ComponentPublisher": "Amazon", "ComponentDependencies": { "aws.greengrass.Nucleus": { "VersionRequirement": "^2.9.4" }, "aws.greengrass.ShadowManager": { "VersionRequirement": "^2.3.1" }, "aws.greengrass.clientdevices.mqtt.Bridge": { "VersionRequirement": "^2.2.4" } }, "ComponentConfiguration": { "DefaultConfiguration": { "smartLightDeviceNames": [], "accessControl": { "aws.greengrass.ShadowManager": { "com.example.clientdevices.MySmartLightManager:shadow:1": { "policyDescription": "Allows access to client devices' unnamed shadows", "operations": [ "aws.greengrass#GetThingShadow", "aws.greengrass#UpdateThingShadow" ], "resources": [ "$aws/things/Arvin-One-Basic-*/shadow" ] } }, "aws.greengrass.ipc.pubsub": { "com.example.clientdevices.MySmartLightManager:pubsub:1": { "policyDescription": "Allows access to client devices' unnamed shadow updates", "operations": [ "aws.greengrass#SubscribeToTopic" ], "resources": [ "$aws/things/+/shadow/update/accepted" ] } } } } }, "Manifests": [ { "Platform": { "os": "linux" }, "Lifecycle": { "Install": "python3 -m pip install --user awsiotsdk", "Run": "python3 -u {artifacts:path}/smart_light_manager.py" } }, { "Platform": { "os": "windows" }, "Lifecycle": { "Install": "py -3 -m pip install --user awsiotsdk", "Run": "py -3 -u {artifacts:path}/smart_light_manager.py" } } ] }
{ "reset": [], "merge": { "strategy": { "type": "realTime" }, "synchronize": { "coreThing": { "classic": false, "namedShadows": [] }, "direction": "betweenDeviceAndCloud" } } }
{ "reset": [], "merge": { "mqttTopicMapping": { "HelloWorldIotCoreMapping": { "topic": "clients/+/hello/world", "source": "LocalMqtt", "target": "IotCore" }, "HelloWorldPubsubMapping": { "topic": "clients/+/hello/world", "source": "LocalMqtt", "target": "Pubsub" }, "ShadowsLocalMqttToPubsub": { "topic": "$aws/things/+/shadow/#", "source": "LocalMqtt", "target": "Pubsub" }, "ShadowsPubsubToLocalMqtt": { "topic": "$aws/things/+/shadow/#", "source": "Pubsub", "target": "LocalMqtt" } } } }