By using AWS re:Post, you agree to the Terms of Use
/Internet of Things/

Questions tagged with Internet of Things

Sort by most recent
  • 1
  • 90 / page

Browse through the questions and answers listed below or filter and sort to narrow down your results.

Memory leak with AWS C SDK released by ESP for ESP32C3 (example OTA mqtt) on Internet disconnection and reconnection

Hi All, We are working on ESP32C3 for OTA functionality using https://github.com/espressif/esp-aws-iot/tree/release/beta/examples/ota/ota_mqtt. We understood original C SDK from AWS side updated from ESP side to make it compatible to ESP32C3. As a part of testing, ESP32C3 is always connected to the Router over WiFi (Mobile Hotspot always ON). We are toggling the internet connection to the router.(**Mobile Data turned Off and ON**) We observed on every internet reconnection, there is memory leak of ~3KB. The memory leak used to get restored. But it take ~12 Min, ~17 Min, ~23Min. In one of the captured log, original free heap of 121828 get reduced to 118620 (~3K leak) after internet restore. After ~23 min, memory leak recovered to 121740. We are following with ESP for this issue. But we are getting little slow reply from ESP side. We have following observation, i) The AWS CSDK has WiFi disconnect event. But there is no event to handle Internet disconnect as we highlighted above - **Mobile Data turned Off and ON** ii) On WiFi disconnection and reconnection, memory leak not observed **Our queries/request:** i) If possible, we request AWS to replicate above testing on ESP32 device and share result. We are also trying to build code for ESP32 - mqtt OTA released from AWS side. We are getting some error. We are working on same. ii) Provide input from AWS side for memory leak observation. That will help to work on this issue further. **Did you came across the mentioned memory leak error in past? ** iii) Provide input on Internet disconnect event as we mentioned in observation 1 Thanks....
0
answers
0
votes
2
views
asked 10 days ago

MQTT Connection keeps getting disconnected/closed while publishing or subscribing to topics using LTE Modem

- I'm using Quectel modem BG95 with a host MCU to connect to AWS IoT core and publish to topics and subscribe to topics as well. - I used to get an error occasionally that closed the MQTT connection exactly while doing pub/sub operations and connection had to be re-established , but that was very rare. - However, since the last few days I have been running tests on multiple devices (using same IoT core endpoint) and have been getting this MQTT dis-connection on each pub or sub operation. I am attaching a log for review. - To me it seems a server side issue since I have tried it with multiple modems and previous versions of firmware. ``` [While publishing to topic] ;2022-05-08T02:29:41Z;28;-966233403;462863960;;RAK000121|-45,RAKTEST|-56 AT+QIDEACT=1 OK[ 2022-05-08T02:29:41Z ] [FARM_IP][INFO] MDM_SET_DEACTIVATE_PDP-else AT+QIACT=1 OK AT+QMTOPEN=0,"a5u9klmd2viw3z-ats.iot.us-west-1.amazonaws.com",8883 OK +QMTOPEN: 0,0 --- [Opening MQTT Connection] [ 2022-05-08T02:29:41Z ] [FARM_IP][INFO] Mqtt opened AT+QMTCONN=0,"0123qwer786" OK +QMTCONN: 0,0,0 --- [MQTT client connected] AT+QMTPUB=0,1,1,0,"fm/1011",72 --- [Publishing to the MQTT Topic] > ;2022-05-08T02:29:41Z;28;-966233403;462863960;;RAK000121|-45,RAKTEST|-56 OK +QMTSTAT: 0,1 --- [MQTT Connection Closed] ``` ``` [While Subscribing to topic] AT+QMTSUB=0,1,"imei/get_logs",0 --- [Subscribing to the MQTT Topic] OK +QMTSTAT: 0,1 --- [MQTT Connection Closed] [ ] [FARM_IP][INFO] Starting timer AT+QMTSUB=0,1,"imei/get_logs",0 --- [Subscribing to the MQTT Topic] OK +QMTSTAT: 0,1 --- [MQTT Connection Closed] ```
1
answers
0
votes
7
views
asked 11 days ago

[Greengrass][IDT] test component and MQTT failed with general info

At current, my Greengrass core device (v2.5.5), is on my rasp 3b+ running normally with manual deployment from local/cloud. However, the IDT (version 4.5.3 with suite=GGV2Q_2.3.1) execution passed for 3/6 test cases as below only: ========== Test Summary ========== * Execution Time: 1m51s * Tests Completed: 6 * Tests Passed: 3 * Tests Failed: 3 * Tests Skipped: 0 ---------------------------------- Test Groups: * pretestvalidation: PASSED * version: PASSED * coredependencies: PASSED * mqtt: FAILED * component: FAILED ---------------------------------- Failed Tests: * Group Name: mqtt Test Name: mqttpubsub; Reason: Failed at 'my device is running Greengrass * Group Name: component Test Name: cloudcomponent; Reason: Failed at 'my device is running Greengrass' Test Name: localcomponent; Reason: Failed at 'my device is running Greengrass' ---------------------------------- **Is there further detail/meaningful info from these error log/code?** **I have tried to look into the log folder but nothing else there.** **I have attached all failed logs as below:** # localcomponent: - time="22:48:06+07:00" level=info msg=22:48:06.237 [localdeployment] [INFO] com.aws.greengrass.testing.features.LoggerSteps - Attaching thread context to scenario: 'A component is deployed locally using CLI' - time="22:48:06+07:00" level=info msg=22:48:06.238 [localdeployment] [INFO] greengrass/features/localdeployment.feature - line 4: 'my device is registered as a Thing' - time="22:48:08+07:00" level=info msg=22:48:08.085 [localdeployment] [INFO] com.aws.greengrass.testing.resources.AbstractAWSResourceLifecycle - Created IotPolicy in IotLifecycle - time="22:48:09+07:00" level=info msg=22:48:09.615 [localdeployment] [INFO] com.aws.greengrass.testing.resources.AbstractAWSResourceLifecycle - Created IamPolicy in IamLifecycle - time="22:48:10+07:00" level=info msg=22:48:10.194 [localdeployment] [INFO] com.aws.greengrass.testing.resources.AbstractAWSResourceLifecycle - Created IamRole in IamLifecycle - time="22:48:10+07:00" level=info msg=22:48:10.639 [localdeployment] [INFO] com.aws.greengrass.testing.resources.AbstractAWSResourceLifecycle - Created IotRoleAlias in IotLifecycle - time="22:48:10+07:00" level=info msg=22:48:10.837 [localdeployment] [INFO] com.aws.greengrass.testing.resources.AbstractAWSResourceLifecycle - Created IotPolicy in IotLifecycle - time="22:48:11+07:00" level=info msg=22:48:11.040 [localdeployment] [INFO] com.aws.greengrass.testing.resources.AbstractAWSResourceLifecycle - Created IotThingGroup in IotLifecycle - time="22:48:12+07:00" level=info msg=22:48:12.066 [localdeployment] [INFO] com.aws.greengrass.testing.resources.AbstractAWSResourceLifecycle - Created IotCertificate in IotLifecycle - time="22:48:12+07:00" level=info msg=22:48:12.466 [localdeployment] [INFO] com.aws.greengrass.testing.resources.AbstractAWSResourceLifecycle - Created IotThing in IotLifecycle - time="22:48:14+07:00" level=info msg=22:48:14.966 [localdeployment] [INFO] greengrass/features/localdeployment.feature - line 5: 'my device is running Greengrass' - time="22:48:14+07:00" level=info msg=22:48:14.976 [localdeployment] [ERROR] greengrass/features/localdeployment.feature - Failed at step: 'my device is running Greengrass' - time="22:48:14+07:00" level=info msg=com.google.inject.ConfigurationException: Guice configuration errors: - time="22:48:14+07:00" level=info msg=1) [Guice/ErrorInUserCode]: Unable to method intercept: GreengrassSteps - time="22:48:14+07:00" level=info msg= while locating GreengrassSteps - time="22:48:14+07:00" level=info msg=22:48:14.990 [localdeployment] [INFO] greengrass/features/localdeployment.feature - line 9: 'I create a Greengrass deployment with components' - time="22:48:14+07:00" level=info msg=22:48:14.990 [localdeployment] [INFO] greengrass/features/localdeployment.feature - line 11: 'I deploy the Greengrass deployment configuration' - time="22:48:14+07:00" level=info msg=22:48:14.991 [localdeployment] [INFO] greengrass/features/localdeployment.feature - line 12: 'the Greengrass deployment is COMPLETED on the device after 180 seconds' - time="22:48:14+07:00" level=info msg=22:48:14.991 [localdeployment] [INFO] greengrass/features/localdeployment.feature - line 13: 'I verify greengrass-cli is available in greengrass root' - time="22:48:14+07:00" level=info msg=22:48:14.991 [localdeployment] [INFO] greengrass/features/localdeployment.feature - line 14: 'I create a local deployment with components' - time="22:48:14+07:00" level=info msg=22:48:14.991 [localdeployment] [INFO] greengrass/features/localdeployment.feature - line 16: 'the local Greengrass deployment is SUCCEEDED on the device after 120 seconds' - time="22:48:14+07:00" level=info msg=22:48:14.991 [localdeployment] [INFO] greengrass/features/localdeployment.feature - line 17: 'the aws.greengrass.LocalHelloWorld log on the device contains the line "Hello World!!" within 20 seconds' - time="22:48:16+07:00" level=info msg=22:48:16.569 [localdeployment] [INFO] com.aws.greengrass.testing.features.LoggerSteps - Clearing thread context on scenario: 'A component is deployed locally using CLI' - time="22:48:16+07:00" level=info msg=22:48:16.577 [localdeployment] [ERROR] com.aws.greengrass.testing.launcher.reporting.StepTrackingReporting - Failed: 'A component is deployed locally using CLI': Failed at 'my device is running Greengrass' - time="22:48:16+07:00" level=info msg=22:48:16.584 [] [] [INFO] com.aws.greengrass.testing.modules.AWSResourcesCleanupModule - Cleaned up com.aws.greengrass.testing.resources.iam.IamLifecycle$$EnhancerByGuice$$10441879@e128dc2 - time="22:48:23+07:00" level=error msg=Test exited unsuccessfully error=exit status # cloudcomponent: - 2022-May-04 15:37:28,499 [cloudComponent] [idt-b47156801aee3f29c860] [INFO] greengrass/features/cloudComponent.feature - line 9: 'I create a Greengrass deployment with components' - 2022-May-04 15:37:28,499 [cloudComponent] [idt-b47156801aee3f29c860] [INFO] greengrass/features/cloudComponent.feature - line 11: 'I deploy the Greengrass deployment configuration' - 2022-May-04 15:37:28,500 [cloudComponent] [idt-b47156801aee3f29c860] [INFO] greengrass/features/cloudComponent.feature - line 12: 'the Greengrass deployment is COMPLETED on the device after 180 seconds' - 2022-May-04 15:37:28,500 [cloudComponent] [idt-b47156801aee3f29c860] [INFO] greengrass/features/cloudComponent.feature - line 13: 'the com.aws.HelloWorld log on the device contains the line "Hello World!!" within 20 seconds' - 2022-May-04 15:37:28,500 [cloudComponent] [idt-b47156801aee3f29c860] [INFO] greengrass/features/cloudComponent.feature - line 15: 'I create a Greengrass deployment with components' - 2022-May-04 15:37:28,500 [cloudComponent] [idt-b47156801aee3f29c860] [INFO] greengrass/features/cloudComponent.feature - line 17: 'I deploy the Greengrass deployment configuration' - 2022-May-04 15:37:28,500 [cloudComponent] [idt-b47156801aee3f29c860] [INFO] greengrass/features/cloudComponent.feature - line 18: 'the Greengrass deployment is COMPLETED on the device after 180 seconds' - 2022-May-04 15:37:28,500 [cloudComponent] [idt-b47156801aee3f29c860] [INFO] greengrass/features/cloudComponent.feature - line 19: 'the com.aws.HelloWorld log on the device contains the line "Hello World Updated!!" within 20 seconds' - 2022-May-04 15:37:31,557 [cloudComponent] [idt-b47156801aee3f29c860] [INFO] com.aws.greengrass.testing.features.LoggerSteps - Clearing thread context on scenario: 'As a developer, I can create a component in Cloud and deploy it on my device' - 2022-May-04 15:37:31,558 [cloudComponent] [idt-b47156801aee3f29c860] [ERROR] com.aws.greengrass.testing.launcher.reporting.StepTrackingReporting - Failed: 'As a developer, I can create a component in Cloud and deploy it on my device': Failed at 'my device is running Greengrass' # mqttpubsub: - 2022-May-04 15:36:55,929 [mqtt] [idt-614fb227a4f0913ba4be] [INFO] greengrass/features/mqtt.feature - line 9: 'I create a Greengrass deployment with components' - 2022-May-04 15:36:55,931 [mqtt] [idt-614fb227a4f0913ba4be] [INFO] greengrass/features/mqtt.feature - line 12: 'I deploy the Greengrass deployment configuration' - 2022-May-04 15:36:55,931 [mqtt] [idt-614fb227a4f0913ba4be] [INFO] greengrass/features/mqtt.feature - line 13: 'the Greengrass deployment is COMPLETED on the device after 180 seconds' - 2022-May-04 15:36:55,931 [mqtt] [idt-614fb227a4f0913ba4be] [INFO] greengrass/features/mqtt.feature - line 14: 'the aws.greengrass.IotMqttSubscriber log on the device contains the line "Subscribed to IoT topic idt/Mqtt/Test with QOS=AT_LEAST_ONCE" within 20 seconds' - 2022-May-04 15:36:55,931 [mqtt] [idt-614fb227a4f0913ba4be] [INFO] greengrass/features/mqtt.feature - line 15: 'the aws.greengrass.IotMqttPublisher log on the device contains the line "Published to IoT topic idt/Mqtt/Test with payload test message and qos AT_LEAST_ONCE" within 10 seconds' - 2022-May-04 15:36:58,922 [mqtt] [idt-614fb227a4f0913ba4be] [INFO] com.aws.greengrass.testing.features.LoggerSteps - Clearing thread context on scenario: 'Component publishes MQTT message to Iot core and retrieves it as well' - 2022-May-04 15:36:58,924 [mqtt] [idt-614fb227a4f0913ba4be] [ERROR] com.aws.greengrass.testing.launcher.reporting.StepTrackingReporting - Failed: 'Component publishes MQTT message to Iot core and retrieves it as well': Failed at 'my device is running Greengrass' - 2022-May-04 15:36:58,930 [] [] [INFO] com.aws.greengrass.testing.modules.AWSResourcesCleanupModule - Cleaned up com.aws.greengrass.testing.resources.s3.S3Lifecycle$$EnhancerByGuice$$11137706@7e3ca22c
4
answers
0
votes
14
views
asked 15 days ago

Launch Announcement: AWS IoT TwinMaker is now generally available

Today, we are announcing the general availability of [AWS IoT TwinMaker](https://aws.amazon.com/iot-twinmaker/), a service that makes it easier for developers to create digital twins of real-world systems such as buildings, factories, production lines, and equipment. Customers are increasingly adopting digital twins to make better operational and strategic decisions in industries such as smart buildings, manufacturing, construction, energy, power & utilities, and more. With AWS IoT TwinMaker you now have the tools you need to build digital twins to help you monitor and improve your industrial operations. With AWS IoT TwinMaker, you can quickly get started creating digital twins of equipment, processes, and facilities by connecting data from different data sources without having to re-ingest or move the data to another location. You can use built-in data connectors for the following AWS services: [AWS IoT SiteWise](https://aws.amazon.com/iot-sitewise/) for equipment and time-series sensor data, and [Amazon Kinesis Video Streams](https://aws.amazon.com/kinesis/video-streams/) for video data. AWS IoT TwinMaker also provides a framework for you to create your own data connectors to use with other AWS or third-party data sources (such as [Amazon Timestream](https://aws.amazon.com/timestream/), Snowflake, and Siemens MindSphere). Then, you can easily access all digital twin data using the AWS IoT TwinMaker unified data access API to underlying data sources without needing to query each data source individually. AWS IoT TwinMaker AWS IoT TwinMaker lets you model your physical environment using entities (e.g. any physical asset or system like a furnace, an assembly line, or an entire factory) and its components (e.g. data connectors) and then saves you time by automatically creating a knowledge (or digital twin) graph that combines and understands the relationships among the connected data sources. As your built environment evolves, for example if you add new sources of data, you can easily update your model so your digital twin remains accurate and current. Once the digital twin graph is created, you can then visualize the data in context of the physical environment. Using AWS IoT TwinMaker, you can import existing 3D models (such as CAD files, and point cloud scans) to compose and arrange 3D scenes of a physical space and its contents (e.g. a factory and its equipment) using simple 3D composition tools. To create a spatially aware visualization of your operations, you can then add interactive video and sensor data from connected data sources, insights from connected machine learning (ML) and simulation services, and equipment maintenance records and manuals. To help developers quickly build a web-based application for end users, such as plant operators and maintenance engineers, AWS IoT TwinMaker includes a plugin for Grafana and [Amazon Managed Grafana](https://aws.amazon.com/grafana/), a fully managed service for the open source dashboard and visualization platform from Grafana Labs. AWS IoT TwinMaker is generally available in regions of US East (N. Virginia), US West (Oregon), Asia Pacific (Singapore), Asia Pacific (Sydney), Europe (Frankfurt), and Europe (Ireland), with more regions to come soon. To learn more visit the AWS IoT TwinMaker product page, and to find an AWS Partner to help you on your digital twin journey, visit the AWS IoT TwinMaker [partner page](https://aws.amazon.com/iot-twinmaker/partners/). Use the [AWS Management Console](https://console.aws.amazon.com/iottwinmaker) to get started, or visit our [GitHub repository](https://github.com/aws-samples/aws-iot-twinmaker-samples) for a sample digital twin application.
0
answers
1
votes
4
views
asked a month ago

Aws Iot Device Client Setup not working

Hello, i have been trying to setup a rpi using the tutorials [here](https://docs.aws.amazon.com/iot/latest/developerguide/iot-dc-install-configure.html) and when i run the command `./aws-iot-device-client --config-file ~/dc-configs/dc-testconn-config.json ` i am getting errors on the terminal saying that the aws crt sdk is not found with a fatal error like this ``` 2022-04-11T07:38:13.850Z [WARN] {Config.cpp}: Key {template-name} was provided in the JSON configuration file with an empty value 2022-04-11T07:38:13.850Z [WARN] {Config.cpp}: Key {csr-file} was provided in the JSON configuration file with an empty value 2022-04-11T07:38:13.850Z [WARN] {Config.cpp}: Key {device-key} was provided in the JSON configuration file with an empty value 2022-04-11T07:38:13.850Z [WARN] {Config.cpp}: Key {file} was provided in the JSON configuration file with an empty value 2022-04-11T07:38:13.850Z [WARN] {Config.cpp}: Key {publish-file} was provided in the JSON configuration file with an empty value 2022-04-11T07:38:13.851Z [WARN] {Config.cpp}: Key {subscribe-file} was provided in the JSON configuration file with an empty value 2022-04-11T07:38:13.851Z [WARN] {Config.cpp}: Shadow Name {shadow-name} was provided in the JSON configuration file with an empty value 2022-04-11T07:38:13.851Z [WARN] {Config.cpp}: Input file {shadow-input-file} was provided in the JSON configuration file with an empty value 2022-04-11T07:38:13.851Z [WARN] {Config.cpp}: Output file {shadow-output-file} was provided in the JSON configuration file with an empty value 2022-04-11T07:38:13.851Z [INFO] {Config.cpp}: Successfully fetched JSON config file: { "endpoint": "a32vqcn021ykiy-ats.iot.ap-south-1.amazonaws.com", "cert": "~/certs/testconn/device.pem.crt", "key": "~/certs/testconn/private.pem.key", "root-ca": "~/certs/AmazonRootCA1.pem", "thing-name": "Triton_Dp_Office", "logging": { "enable-sdk-logging": true, "level": "DEBUG", "type": "STDOUT", "file": "" }, "jobs": { "enabled": false, "handler-directory": "" }, "tunneling": { "enabled": false }, "device-defender": { "enabled": false, "interval": 300 }, "fleet-provisioning": { "enabled": false, "template-name": "", "template-parameters": "", "csr-file": "", "device-key": "" }, "samples": { "pub-sub": { "enabled": true, "publish-topic": "test/dc/pubtopic", "publish-file": "", "subscribe-topic": "test/dc/subtopic", "subscribe-file": "" } }, "config-shadow": { "enabled": false }, "sample-shadow": { "enabled": false, "shadow-name": "", "shadow-input-file": "", "shadow-output-file": "" } } 2022-04-11T07:38:13.851Z [DEBUG] {Config.cpp}: Did not find a runtime configuration file, assuming Fleet Provisioning has not run for this device 2022-04-11T07:38:13.852Z [DEBUG] {EnvUtils.cpp}: Updated PATH environment variable to: /home/pi/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games:/snap/bin:/home/pi/.aws-iot-device-client:/home/pi/.aws-iot-device-client/jobs:/home/pi/aws-iot-device-client/build:/home/pi/aws-iot-device-client/build/jobs 2022-04-11T07:38:13.852Z [INFO] {Main.cpp}: Now running AWS IoT Device Client version v1.5.19-868465b 2022-04-11T07:38:13.860Z [ERROR] {FileUtils.cpp}: Failed to create empty file: /var/log/aws-iot-device-client/sdk.log errno: 17 msg: File exists 2022-04-11T07:38:13.860Z [ERROR] {Main.cpp}: *** AWS IOT DEVICE CLIENT FATAL ERROR: Failed to initialize AWS CRT SDK. AWS IoT Device Client must abort execution, reason: Failed to initialize AWS CRT SDK Please check the AWS IoT Device Client logs for more information Aborted ``` I need this setup asap to work on deploying a fleet and test out AWS IOT Jobs. Any help is appreciated.
1
answers
0
votes
13
views
asked a month ago

com.aws.greengrass.lambdamanager.StatusTimeoutException mysterious lambda error

I am trying to use lambdas on greengrass v2. I created and packaged the hello world lambda from the greengrass tutorial and deployed it to the core but it continues to error out. It doesnt seem to run to completion, or the lambda isnt getting called correctly and the core reports it as timed out. This is the stacktrace. How do I get this lambda to work in greeengrass v2? com.aws.greengrass.lambdamanager.StatusTimeoutException: Lambda status not received within timeout at com.aws.greengrass.lambdamanager.Lambda.lambda$createInstanceKeepAliveTask$5(Lambda.java:282) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) aws.greengrass.LambdaManager 2.2.2 using Python Python 3.7 With the following hello world lambda ``` import json import awsiot.greengrasscoreipc import awsiot.greengrasscoreipc.client as client from awsiot.greengrasscoreipc.model import ( QOS, PublishToIoTCoreRequest ) TIMEOUT = 10 ipc_client = awsiot.greengrasscoreipc.connect() def greengrass_hello_world_run(): topic = "my/topic" message = "Hello, World" qos = QOS.AT_LEAST_ONCE request = PublishToIoTCoreRequest() request.topic_name = topic request.payload = bytes(message, "utf-8") request.qos = qos operation = ipc_client.new_publish_to_iot_core() operation.activate(request) future = operation.get_response() future.result(TIMEOUT) Timer(5, greengrass_hello_world_run).start() greengrass_hello_world_run() def lambda_handler(event, context): return ```
1
answers
0
votes
3
views
asked a month ago

Connecting from awsiotsdk to Greengrass Core over LocalMQTT TLS problems

I try and connect from a client device over localMQTT to the broker on the greengrass core. However, when I connect, I get this error on the awsiotsdk side. I ran an almost identical script to this a couple months ago and I don't think it had the same problems. ``` Traceback (most recent call last): File "client_v2.py", line 76, in <module> connect_future.result() File "/Users/username/.pyenv/versions/3.8.11/lib/python3.8/concurrent/futures/_base.py", line 444, in result return self.__get_result() File "/Users/username/.pyenv/versions/3.8.11/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result raise self._exception awscrt.exceptions.AwsCrtError: AWS_IO_TLS_ERROR_NEGOTIATION_FAILURE: TLS (SSL) negotiation failed ``` On the Core side, I have just the Moquette broker and the bridge and a component that subscribes to the messages coming off of LocalMqtt and through the bridge. This is the message in greengrass.log ``` 2022-04-05T07:00:56.397Z [ERROR] (nioEventLoopGroup-7-10) io.moquette.broker.NewNettyMQTTHandler: Unexpected exception while processing MQTT message. Closing Netty channel. CId=null. {} io.netty.handler.codec.DecoderException: javax.net.ssl.SSLProtocolException: Received close_notify during handshake at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:478) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) at io.moquette.broker.metrics.BytesMetricsHandler.channelRead(BytesMetricsHandler.java:51) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: javax.net.ssl.SSLProtocolException: Received close_notify during handshake at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:129) at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117) at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:339) at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:295) at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:286) at java.base/sun.security.ssl.Alert$AlertConsumer.consume(Alert.java:250) at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:185) at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:172) at java.base/sun.security.ssl.SSLEngineImpl.decode(SSLEngineImpl.java:681) at java.base/sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:636) at java.base/sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:454) at java.base/sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:433) at java.base/javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:637) at io.netty.handler.ssl.SslHandler$SslEngineType$3.unwrap(SslHandler.java:282) at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1387) at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1282) at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1329) at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:508) at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:447) ... 25 more 2022-04-05T07:00:56.399Z [INFO] (nioEventLoopGroup-7-10) io.moquette.broker.metrics.MQTTMessageLogger: Channel Inactive. {} ``` I'm using the mqtt_connection_builder.mtls_from_path function to create my connection setup between the client and the core, but obviously during the connect function itself it breaks because of the TLS handshake.
1
answers
0
votes
7
views
asked a month ago

Greengrass v2 fleet provisioning retry in case of lack of the Internet connection.

Hi. I have created a Greengrass fleet deployment workflow for my devices which works great - cloud resources are provisioned, claim certs are used to obtain device individual certs, and device gets connected. However in production environment the scenario will be different: 1. An IoT device is installed by an engineer in a newly built home, with no occupiers and no internet connection. 2. The Greengrass is ready to claim device certs and connect as soon as the device is powered up. 3. The device then is powered up by the installing engineer, meaning the Greengrass fleet provisioning plugin will try to do its job, but there is no internet connection, so it will fail. 4. The engineer will leave the device on, and it will be permanently on since now on. 5. The occupiers will move in some time later and install their broadband router, the Internet is now available. At this point, from my tests, I noticed the Greengrass/provisioning plugin won't detect Internet connection and won't try to register the device/obtain certs - meaning there is no retry functionality implemented. I understand that the device can be rebooted or Greengrass service restarted to initialize new registration attempt, however - if possible I'd like to avoid occupiers fiddling with the device, and prefer the device to the retry automatically. I also understand that I can write a software that will be automatically cyclically restarting the Greengrass service if the previous registration attempt failed (probably by checking if the thingCert.crt is present) but before I'll spend my time on coding, **the question is**: Is it possible to configure Greengrass to retry delayed provisioning using claim certificates if previous attempt has failed? Appreciate any help.
1
answers
0
votes
13
views
asked 2 months ago

greengrasssdk.stream_manager.exceptions.UnknownFailureException: Broken bit parity

Hi there I have some problem with stream manager in ggv1, I can fix this after I reboot the device. However I dont think this is a good solution. Do you have any suggestion where I can look into ``` [2022-04-01T09:19:31.876+11:00][INFO]-imageCamera.py:108,>>> Get frame atm hour:9 - sleep_time:11 s [2022-04-01T09:19:31.876+11:00][INFO]-imageCamera.py:112,>>> Frame size from rtsp: (720, 1280, 3) [2022-04-01T09:19:31.889+11:00][INFO]-imageCamera.py:119,>>> Resized farme: (720, 1280, 3) [2022-04-01T09:19:32.002+11:00][INFO]-imageCamera.py:144, >>>>> realite-data-image Sleep time: 60 - payload size: 189004 [2022-04-01T09:19:32.002+11:00][INFO]-Response: 1065 [2022-04-01T09:19:39.336+11:00][INFO]-lambda_runtime.py:366,Caught signal 15. Stopping runtime. [2022-04-01T09:20:22.061+11:00][INFO]-imageCamera.py:173,>> Getting hub config ... [2022-04-01T09:20:22.064+11:00][INFO]-ipc_client.py:167,Posting work for function [:function:secret_loader] to http://localhost:8000/2016-11-01/functions/arn:aws:lambfunction:secret_loader [2022-04-01T09:20:22.078+11:00][INFO]-ipc_client.py:177,Work posted with invocation id [14ce6b2c-add7-4dc0-452d-be84d2700e4e] [2022-04-01T09:20:22.078+11:00][INFO]-ipc_client.py:290,Getting work result for invocation id [14ce6b2c-add7-4dc0-452d-be84d2700e4e] from http://localhost:8000/2016-11-01/functions/arn:aws:lambda:ap:function:secret_loader [2022-04-01T09:20:26.32+11:00][INFO]-ipc_client.py:298,Got result for invocation id [14ce6b2c-add7-4dc0-452d-be84d2700e4e] [2022-04-01T09:20:26.321+11:00][INFO]-imageCamera.py:175,>> Done ... [2022-04-01T09:20:26.321+11:00][INFO]-imageCamera.py:180,Setup tranfer stream [2022-04-01T09:20:26.628+11:00][INFO]-imageCamera.py:151, >>> Stream list: ['kstream1'] [2022-04-01T09:20:27.291+11:00][ERROR]-imageCamera.py:209, >>>>> Exception while running: Broken bit parity [2022-04-01T09:20:27.291+11:00][ERROR]-Traceback (most recent call last): [2022-04-01T09:20:27.291+11:00][ERROR]- File "/greengrass/ggc/deployment/lambda/.imageCamera.14/imageCamera.py", line 182, in main [2022-04-01T09:20:27.291+11:00][ERROR]- stream_client=setup_data_stream(stream_name,kinesis_stream_name) [2022-04-01T09:20:27.291+11:00][ERROR]- File "/greengrass/ggc/deployment/lambda/.function.imageCamera.14/imageCamera.py", line 154, in setup_data_stream [2022-04-01T09:20:27.291+11:00][ERROR]- client.delete_message_stream(stream_name=stream_name) [2022-04-01T09:20:27.291+11:00][ERROR]- File "/greengrass/ggc/deployment/lambda/arn.aws.lambda.ap-southeast-Camera.14/greengrasssdk/stream_manager/streammanagerclient.py", line 448, in delete_message_stream [2022-04-01T09:20:27.291+11:00][ERROR]- return Util.sync(self._delete_message_stream(stream_name), loop=self.__loop) [2022-04-01T09:20:27.291+11:00][ERROR]- File "/greengrass/ggc/deployment/lambda/.function.imageCamera.14/greengrasssdk/stream_manager/util.py", line 28, in sync [2022-04-01T09:20:27.291+11:00][ERROR]- return asyncio.run_coroutine_threadsafe(coro, loop=loop).result() [2022-04-01T09:20:27.291+11:00][ERROR]- File "/usr/lib/python3.7/concurrent/futures/_base.py", line 432, in result [2022-04-01T09:20:27.291+11:00][ERROR]- return self.__get_result() [2022-04-01T09:20:27.291+11:00][ERROR]- File "/usr/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result [2022-04-01T09:20:27.291+11:00][ERROR]- raise self._exception [2022-04-01T09:20:27.291+11:00][ERROR]- File "/greengrass/ggc/deployment/lambda/arn.aws.lambda.ap-southeast-2era.14/greengrasssdk/stream_manager/streammanagerclient.py", line 352, in _delete_message_stream [2022-04-01T09:20:27.291+11:00][ERROR]- Util.raise_on_error_response(delete_stream_response) [2022-04-01T09:20:27.291+11:00][ERROR]- File "/greengrass/ggc/deployment/lambda/ar.imageCamera.14/greengrasssdk/stream_manager/util.py", line 148, in raise_on_error_response [2022-04-01T09:20:27.291+11:00][ERROR]- raise UnknownFailureException(response.error_message, response.status, response.request_id) [2022-04-01T09:20:27.291+11:00][INFO]-imageCamera.py:210,>>> restart module after 10s ```
0
answers
0
votes
5
views
asked 2 months ago

Verifying Rule destination on AWS IOT for Telegram Bot

I am trying to set up a simple service where I send messages from an edge device towards AWS IOT. AWS IOT then has a rule functionality (https://docs.aws.amazon.com/iot/latest/developerguide/iot-rules.html) that allows me to route that message towards a web app or service. I have managed to do is to send messages to a topic on AWS IOT Core and save them in a S3 Bucket. Now I am trying to set up a rule to route them to Telegram. I followed a Telegram Bot tutorial and obtained a link https://api.telegram.org/bot<bot token>/sendMessage?chat_id=<chat id>&text=<my message>. I have a bot token and chat id entered in. If I substitute <my message> with my personal message and add to that my browser, my telegram channel will get the message. I am trying to have custom messages to my telegram channel based on received messages on MQTT, AWS IoT Rules Engine requires a confirmation that I can access the data sent to that endpoint. The Rules Engine issues a challenge message to the specified endpoint with a token. If I can get the token and send that back to Rules Engine, then I can prove that I have access to the data on the receiving side, which would complete the confirmation process. The message has a format like this: HTTP POST {confirmationUrl}/?confirmationToken={confirmationToken} I am seriously confused how to verify that with the link from Telegram above. According to AWS, if you control that endpoint, you can simply look in your service logs for POST requests to that resource with the confirmationToken URI query, extract that token value, and paste it back into the AWS IoT console. I guess my main questions based on the telegram link I have above would be: 1. What is the HTTPS Endpoint I should enter for my rule action here? 2. What is the Confirmation Url I should enter for my rule action here? 3. How would I check for the confirmation token? I have no idea how to open the service log.
2
answers
0
votes
5
views
asked 2 months ago

AWS IoT Embedded SDK

Hello, To make my device development more straightforward, I'd like to use the [AWS IoT Device SDK Embedded C release 202108.00](https://github.com/aws/aws-iot-device-sdk-embedded-C/tree/202108.00#20210800). However, I am having trouble cross-compiling it for my platform (based on the BG77, using a Qualcomm version of Clang). I am unable to configure & build the project. Here is my configure command: ``` cmake -G Ninja -B build -S . -DCMAKE_TOOLCHAIN_FILE=path/to/bg77.cmake -DBUILD_DEMOS=OFF -DBUILD_TESTS=OFF -DINSTALL_PLATFORM_ABSTRACTIONS=OFF ``` And the error I am seeing is: ``` <trim> Downloading the Amazon Root CA certificate... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1188 100 1188 0 0 20941 0 --:--:-- --:--:-- --:--:-- 21214 Downloading the Baltimore Cybertrust Root CA certificate... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1262 100 1262 0 0 13008 0 --:--:-- --:--:-- --:--:-- 13010 -- Configuring done CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: OPENSSL_CRYPTO_LIBRARY (ADVANCED) linked by target "openssl_posix" in directory aws-iot-device-sdk-embedded-C/platform/posix/transport OPENSSL_SSL_LIBRARY (ADVANCED) linked by target "openssl_posix" in directory aws-iot-device-sdk-embedded-C/platform/posix/transport -- Generating done CMake Generate step failed. Build files cannot be regenerated correctly. ``` At this point, there is no `build.ninja` file generated, so I cannot build the project. The README in the repo says the following: ``` The follow table shows libraries that need to be installed in your system to run certain demos. If a dependency is not installed and cannot be built from source, demos that require that dependency will be excluded from the default all target. ``` What is the proper way to build this without these dependencies? Thank you, Jonathan
0
answers
0
votes
6
views
asked 2 months ago

com.aws.greengrass.deployment.DeploymentConfigMerger: merge-config. merge-config-service BROKEN

Hi there I tried to deploy a component to a new provisioned device, however i encounter this error com.aws.greengrass.deployment.DeploymentConfigMerger: merge-config. merge-config-service BROKEN here is part of the logs ``` 2022-03-20T23:26:34.797Z [INFO] (pool-2-thread-6) com.aws.greengrass.componentmanager.ComponentManager: Found running component which meets the requirement and use it.. {ComponentIdentifier=rtt.ancillary-v1.0.1} 2022-03-20T23:26:34.798Z [INFO] (pool-2-thread-6) com.aws.greengrass.componentmanager.ComponentManager: Found the best local candidate that satisfies the requirement.. {LocalCandidateId=rtt.ancillary-v1.0.1} 2022-03-20T23:26:35.377Z [INFO] (pool-2-thread-6) com.aws.greengrass.componentmanager.ComponentManager: resolve-component-version-end. Resolved component version.. {ResolvedComponent=rtt.ancillary-v1.0.1} 2022-03-20T23:26:35.409Z [INFO] (pool-2-thread-6) com.aws.greengrass.componentmanager.DependencyResolver: resolve-group-dependencies-finish. Finish resolving group dependencies. {resolvedComponents={rtt.ancillary=ComponentMetadata(componentIdentifier=rtt.ancillary-v1.0.1, dependencies={})}, componentToVersionRequirements={rtt.ancillary={thing/test123==1.0.1}}} 2022-03-20T23:26:35.439Z [INFO] (pool-2-thread-6) com.aws.greengrass.componentmanager.ComponentManager: prepare-package-start. {packageIdentifier=rtt.ancillary-v1.0.1} 2022-03-20T23:26:35.502Z [INFO] (pool-2-thread-5) com.aws.greengrass.lifecyclemanager.UpdateSystemPolicyService: register-service-update-action. {action=0-071b-439e-9e57-303d24e2748f, serviceName=UpdateSystemPolicyService, currentState=RUNNING} 2022-03-20T23:26:35.508Z [INFO] (pool-2-thread-6) com.aws.greengrass.lifecyclemanager.UpdateSystemPolicyService: service-update-start. {serviceName=UpdateSystemPolicyService, currentState=RUNNING} 2022-03-20T23:26:35.513Z [INFO] (pool-2-thread-6) com.aws.greengrass.deployment.DeploymentConfigMerger: merge-config. Applying deployment changes, deployment cannot be cancelled now. {deployment=07e027a5-071b-439e-9e57-303d24e2748f} 2022-03-20T23:26:35.514Z [INFO] (pool-2-thread-6) com.aws.greengrass.deployment.DeploymentDirectoryManager: Persist configuration snapshot. {file=/greengrass/v2/deployments/07e027a5-071b-439e-9e57-303d24e2748f/rollback_snapshot.tlog} 2022-03-20T23:26:35.574Z [INFO] (main-lifecycle) com.aws.greengrass.lifecyclemanager.GenericExternalService: service-set-state. {serviceName=main, currentState=FINISHED, newState=INSTALLED} 2022-03-20T23:26:35.587Z [INFO] (Serialized listener processor) com.aws.greengrass.lifecyclemanager.GenericExternalService: service-config-change. Requesting restart for component. {configNode=services.main.lifecycle, serviceName=main, currentState=INSTALLED} 2022-03-20T23:26:35.804Z [ERROR] (pool-2-thread-14) com.aws.greengrass.lifecyclemanager.GenericExternalService: service-errored. {reason=Script errored in install, serviceName=rtt.ancillary, currentState=NEW} 2022-03-20T23:26:35.806Z [INFO] (rtt.ancillary-lifecycle) com.aws.greengrass.lifecyclemanager.GenericExternalService: service-set-state. {serviceName=rtt.ancillary, currentState=NEW, newState=ERRORED} 2022-03-20T23:26:35.807Z [INFO] (rtt.ancillary-lifecycle) com.aws.greengrass.lifecyclemanager.GenericExternalService: service-set-state. {serviceName=rtt.ancillary, currentState=ERRORED, newState=NEW} 2022-03-20T23:26:35.905Z [ERROR] (pool-2-thread-14) com.aws.greengrass.lifecyclemanager.GenericExternalService: service-errored. {reason=Script errored in install, serviceName=rtt.ancillary, currentState=NEW} 2022-03-20T23:26:35.905Z [INFO] (rtt.ancillary-lifecycle) com.aws.greengrass.lifecyclemanager.GenericExternalService: service-set-state. {serviceName=rtt.ancillary, currentState=NEW, newState=ERRORED} 2022-03-20T23:26:35.906Z [INFO] (rtt.ancillary-lifecycle) com.aws.greengrass.lifecyclemanager.GenericExternalService: service-set-state. {serviceName=rtt.ancillary, currentState=ERRORED, newState=NEW} 2022-03-20T23:26:35.996Z [ERROR] (pool-2-thread-14) com.aws.greengrass.lifecyclemanager.GenericExternalService: service-errored. {reason=Script errored in install, serviceName=rtt.ancillary, currentState=NEW} 2022-03-20T23:26:35.997Z [INFO] (rtt.ancillary-lifecycle) com.aws.greengrass.lifecyclemanager.GenericExternalService: service-set-state. {serviceName=rtt.ancillary, currentState=NEW, newState=BROKEN} 2022-03-20T23:26:35.997Z [ERROR] (rtt.ancillary-lifecycle) com.aws.greengrass.lifecyclemanager.GenericExternalService: service-broken. service is broken. Deployment is needed. {serviceName=rtt.ancillary, currentState=BROKEN} 2022-03-20T23:26:36.701Z [WARN] (pool-2-thread-6) com.aws.greengrass.deployment.DeploymentConfigMerger: merge-config. merge-config-service BROKEN. {serviceName=rtt.ancillary} 2022-03-20T23:26:36.702Z [ERROR] (pool-2-thread-6) com.aws.greengrass.deployment.activator.DeploymentActivator: merge-config. Deployment failed. {deploymentId=07e027a5-439e-9e57-303d24e} com.aws.greengrass.deployment.exceptions.ServiceUpdateException: Service rtt.ancillary in broken state after deployment at com.aws.greengrass.deployment.DeploymentConfigMerger.waitForServicesToStart(DeploymentConfigMerger.java:194) at com.aws.greengrass.deployment.activator.DefaultActivator.activate(DefaultActivator.java:84) at com.aws.greengrass.deployment.DeploymentConfigMerger.updateActionForDeployment(DeploymentConfigMerger.java:150) at com.aws.greengrass.deployment.DeploymentConfigMerger.lambda$mergeInNewConfig$0(DeploymentConfigMerger.java:102) at com.aws.greengrass.lifecyclemanager.UpdateSystemPolicyService.runUpdateActions(UpdateSystemPolicyService.java:95) at com.aws.greengrass.lifecyclemanager.UpdateSystemPolicyService.lambda$startup$0(UpdateSystemPolicyService.java:165) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) 2022-03-20T23:26:36.708Z [INFO] (pool-2-thread-6) com.aws.greengrass.deployment.activator.DeploymentActivator: merge-config. Rolling back failed deployment. {deploymentId=07e027a5-071b-9e57-303d} 2022-03-20T23:26:36.769Z [INFO] (pool-2-thread-6) com.aws.greengrass.config.ConfigurationWriter: truncate-tlog. queued immediate truncation. {} 2022-03-20T23:26:36.882Z [INFO] (Serialized listener processor) com.aws.greengrass.config.ConfigurationWriter: truncate-tlog. completed successfully. {} 2022-03-20T23:26:36.889Z [INFO] (pool-2-thread-6) com.aws.greengrass.deployment.DeploymentConfigMerger: merge-config. Removing services. {service-to-remove=[rtt.ancillary]} 2022-03-20T23:26:36.889Z [INFO] (pool-2-thread-14) com.aws.greengrass.lifecyclemanager.GenericExternalService: service-close. Service is now closing. {serviceName=rtt.ancillary, currentState=BROKEN} ``` here is my deployment config ``` { "targetArn": "arn:aws:iot::thing/test123", "revisionId": "2", "deploymentId": "07e027a5-9e57-303d2", "deploymentName": "update firmware", "deploymentStatus": "ACTIVE", "components": { "rtt.ancillary": { "componentVersion": "1.0.1", "configurationUpdate": { "merge": "{\"thing_name\":\"test_name\"}" } } }, "deploymentPolicies": { "failureHandlingPolicy": "ROLLBACK", "componentUpdatePolicy": { "timeoutInSeconds": 30, "action": "NOTIFY_COMPONENTS" }, "configurationValidationPolicy": { "timeoutInSeconds": 60 } }, "iotJobConfiguration": { "jobExecutionsRolloutConfig": { "exponentialRate": { "baseRatePerMinute": 5, "incrementFactor": 2.0, "rateIncreaseCriteria": { "numberOfNotifiedThings": 10, "numberOfSucceededThings": 5 } }, "maximumPerMinute": 50 }, "timeoutConfig": { "inProgressTimeoutInMinutes": 15 } }, "creationTimestamp": 1647818095.423, "isLatestForTarget": true, "tags": { "PRODUCT": "GGv2 Deployment" } } ```
4
answers
0
votes
4
views
asked 2 months ago

How to change the greengrass v2 config on a core device

Hi there I have a problem with the iot permision on my device which already have gg installed and running so when i run the gg installer I put GGTokenAccessRole for "iotRoleAlias" instead of the actual name ``` 2022-03-18T05:43:45.295Z [ERROR] (pool-2-thread-5) com.aws.greengrass.tes.CredentialRequestHandler: TES responded with status code: 403. Caching response. {"message":"Access Denied"}. {iotCredentialsPath=/role-aliases/GGTokenAccessRole/credentials} 2022-03-18T05:43:45.296Z [ERROR] (pool-2-thread-5) com.aws.greengrass.tes.CredentialRequestHandler: Error in retrieving AwsCredentials from TES. {iotCredentialsPath=/role-aliases/GGTokenAccessRole/credentials, credentialData=TES responded with status code: 403. Caching response. {"message":"Access Denied"}} 2022-03-18T05:44:27.897Z [ERROR] (pool-2-thread-5) com.aws.greengrass.tes.CredentialRequestHandler: Error in retrieving AwsCredentials from TES. {iotCredentialsPath=/role-aliases/GGTokenAccessRole/credentials, credentialData=TES responded with status code: 403. Caching response. {"message":"Access Denied"}} 2022-03-18T05:45:22.119Z [ERROR] (pool-2-thread-5) com.aws.greengrass.tes.CredentialRequestHandler: Error in retrieving AwsCredentials from TES. {iotCredentialsPath=/role-aliases/GGTokenAccessRole/credentials, credentialData=TES responded with status code: 403. Caching response. {"message":"Access Denied"}} ``` Also i did not create iot aliase so i wonder if that is a problem? can it use a IAMF role directly ? Thanks for your help
1
answers
0
votes
8
views
asked 2 months ago

Error log when i try to authenticate my SMTP

I get the below error when i try to authenticate, my word press SMTP using my SES credentials. This is the error log below, how do i fix this? Versions: WordPress: 5.9.2 WordPress MS: No PHP: 7.4.27 WP Mail SMTP: 3.3.0 Params: Mailer: smtp Constants: No ErrorInfo: SMTP Error: data not accepted.SMTP server error: DATA END command failed Detail: Message rejected: Email address is not verified. The following identities failed the check in region US-EAST-1: SMTP code: 554 Host: email-smtp.us-east-1.amazonaws.com Port: 587 SMTPSecure: tls SMTPAutoTLS: bool(true) SMTPAuth: bool(true) Server: OpenSSL: OpenSSL 1.1.1d 10 Sep 2019 Debug: Email Source: WP Mail SMTP Mailer: Other SMTP SMTP Error: data not accepted.SMTP server error: DATA END command failed Detail: Message rejected: Email address is not verified. The following identities failed the check in region US-EAST-1: SMTP code: 554 SMTP Debug: 2022-03-17 22:48:33 Connection: opening to email-smtp.us-east-1.amazonaws.com:587, timeout=300, options=array() 2022-03-17 22:48:33 Connection: opened 2022-03-17 22:48:33 SERVER -> CLIENT: 220 email-smtp.amazonaws.com ESMTP SimpleEmailService-d-BCF0QJ2IG JBrz7mJEs78kGQwGHZFv 2022-03-17 22:48:33 CLIENT -> SERVER: EHLO 2022-03-17 22:48:33 SERVER -> CLIENT: 250-email-smtp.amazonaws.com250-8BITMIME250-STARTTLS250-AUTH PLAIN LOGIN250 Ok 2022-03-17 22:48:33 CLIENT -> SERVER: STARTTLS 2022-03-17 22:48:33 SERVER -> CLIENT: 220 Ready to start TLS
1
answers
0
votes
13
views
asked 2 months ago

StreamManger - UnknownFailureException: Broken bit parity - re:post

Hi there, i just upgrade my Greengrass (GG) core software from 1.10 to 1.11.5. Cus i want to use S3ExportTaskDefinition. However there is some error with the create_message_stream() the attached is the log of my lambda (which i copy from: https://github.com/aws-greengrass/aws-greengrass-stream-manager-sdk-python) I manually trackback and found the error at line 336 `result = await self.__requests[data.request_id].get()` in the streammanagerclient.py::__send_and_receive() GGStreamManager.log ``` [2022-02-28T16:43:51.367+11:00][ERROR]-Feb 28, 2022 4:43:51 PM com.amazonaws.internal.DefaultServiceEndpointBuilder getServiceEndpoint [2022-02-28T16:43:51.367+11:00][ERROR]-INFO: {iotsitewise, ap-southeast-2} was not found in region metadata, trying to construct an endpoint using the standard pattern for this region: 'iotsitewise.ap-southeast-2.amazonaws.com'. [2022-02-28T16:43:51.646+11:00][INFO]- (main) com.amazonaws.iot.greengrass.streammanager.server.StreamServer: Starting streamServer on port: 8088 [2022-02-28T16:43:51.665+11:00][INFO]- (main) com.amazonaws.iot.greengrass.streammanager.export.decider.Decider: Starting decider [2022-02-28T16:43:52.186+11:00][INFO]- (pool-6-thread-1) com.amazonaws.iot.greengrass.streammanager.server.StreamServer: StreamServer ready to accept connections on port 8088 [2022-02-28T16:43:52.207+11:00][INFO]-Putting initialization result for function arn [arn:aws:lambda:::function:GGStreamManager:1] to http://localhost:8000/2016-11-01/functions/arn:aws:lambda:::function:GGStreamManager:1/initialized [2022-02-28T16:43:52.377+11:00][INFO]-Put initialization result for function arn [arn:aws:lambda:::function:GGStreamManager:1] [2022-02-28T16:43:53.407+11:00][ERROR]- (nioEventLoopGroup-3-1) com.amazonaws.iot.greengrass.streammanager.server.handlers.CreateMessageStreamRequestHandler: Encountered unknown exception while creating message stream SomeStatusStreamName [2022-02-28T16:43:53.407+11:00][ERROR]-org.mapdb.DBException$PointerChecksumBroken: Broken bit parity [2022-02-28T16:43:53.407+11:00][ERROR]- at org.mapdb.DataIO.parity4Get(DataIO.java:476) ~[AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.407+11:00][ERROR]- at org.mapdb.StoreWAL.longStackLoadChunk(StoreWAL.kt:732) ~[AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.407+11:00][ERROR]- at org.mapdb.StoreWAL.longStackPut(StoreWAL.kt:712) ~[AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.407+11:00][ERROR]- at org.mapdb.StoreDirectAbstract.releaseData(StoreDirectAbstract.kt:367) ~[AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.407+11:00][ERROR]- at org.mapdb.StoreWAL.updateProtected(StoreWAL.kt:455) ~[AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.407+11:00][ERROR]- at org.mapdb.StoreWAL.update(StoreWAL.kt:426) ~[AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.407+11:00][ERROR]- at org.mapdb.IndexTreeListJava.treePut(IndexTreeListJava.java:341) ~[AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.407+11:00][ERROR]- at org.mapdb.IndexTreeLongLongMap.put(IndexTreeLongLongMap.kt:77) ~[AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.407+11:00][ERROR]- at org.mapdb.HTreeMap.putprotected(HTreeMap.kt:363) ~[AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.407+11:00][ERROR]- at org.mapdb.HTreeMap.put(HTreeMap.kt:324) ~[AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.407+11:00][ERROR]- at com.amazonaws.iot.greengrass.streammanager.dao.MapDbMetadataDao.put(MapDbMetadataDao.java:73) ~[AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.407+11:00][ERROR]- at com.amazonaws.iot.greengrass.streammanager.store.log.LogStore.createMessageStream(LogStore.java:113) ~[AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.407+11:00][ERROR]- at com.amazonaws.iot.greengrass.streammanager.server.handlers.CreateMessageStreamRequestHandler.handle(CreateMessageStreamRequestHandler.java:41) [AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.407+11:00][ERROR]- at com.amazonaws.iot.greengrass.streammanager.server.handlers.MessageStreamHandler.channelRead(MessageStreamHandler.java:133) [AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.407+11:00][ERROR]- at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.407+11:00][ERROR]- at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.407+11:00][ERROR]- at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.407+11:00][ERROR]- at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:321) [AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.407+11:00][ERROR]- at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:295) [AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.407+11:00][ERROR]- at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.407+11:00][ERROR]- at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.407+11:00][ERROR]- at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.407+11:00][ERROR]- at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:321) [AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.407+11:00][ERROR]- at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:295) [AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.407+11:00][ERROR]- at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.407+11:00][ERROR]- at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.407+11:00][ERROR]- at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.407+11:00][ERROR]- at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) [AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.408+11:00][ERROR]- at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.408+11:00][ERROR]- at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.408+11:00][ERROR]- at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) [AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.408+11:00][ERROR]- at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) [AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.408+11:00][ERROR]- at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714) [AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.408+11:00][ERROR]- at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650) [AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.408+11:00][ERROR]- at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576) [AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.408+11:00][ERROR]- at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) [AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.408+11:00][ERROR]- at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) [AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.408+11:00][ERROR]- at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.408+11:00][ERROR]- at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [AWSGreengrassStreamManager.jar:?] [2022-02-28T16:43:53.408+11:00][ERROR]- at java.lang.Thread.run(Thread.java:834) [?:?] ``` thanks for your help
2
answers
0
votes
8
views
asked 3 months ago

IoT Core: KafkaAction failed to send a message to the specified bootstrap servers. SSL handshake failed

I'm trying to create an IoT Core Rule that triggers a Kafka action to send our device data directly to our Kafka cluster, using Basic Ingest. I have successfully setup the VPC Destination that this action needs, specifying our subnets that contain the Kafka brokers; however, I am getting the following log in CloudWatch when the KafkaAction fails: ``` { "ruleName": "testKafkaAction", "topic": "", "cloudwatchTraceId": "<id>", "clientId": "test", "base64OriginalPayload": "<payload>", "failures": [ { "failedAction": "KafkaAction", "failedResource": "iot-core-sensordata-stream", "errorMessage": "KafkaAction failed to send a message to the specified bootstrap servers. SSL handshake failed. Message arrived on: , Action: kafka, topic: test-kafka-action, bootstrap.servers: <bootstrap_servers>" } ] } ``` Our Kafka cluster is self hosted, and uses a self-signed CA. I have created a binary secret in Secrets Manager containing the truststore in pkcs12 format. The truststore contains our self-signed CA. I am using SASL_SSL as the security protocol for the rule, and SCRAM-SHA-512 as the mechanism. The username and password are also stored as a separate secret in Secrets Manager. My rule's IAM policy is setup correctly to access these secrets. One other thing to note: My bootstrap servers list for the rule are the private ip:port of the nodes running the Kafka brokers in our VPC, and I have ensured these IPs are on the SAN list for the cert. Here is the json template for my rule as a reference: ``` { "sql": "SELECT *", "ruleDisabled": false, "awsIotSqlVersion": "2016-03-23", "actions": [ { "kafka": { "destinationArn": "<VPC_DESTINATION_ARN>", "topic": "test-kafka-action", "clientProperties": { "bootstrap.servers": "<KAFKA_BOOTSTRAP_SERVERS>", "key.serializer": "org.apache.kafka.common.serialization.StringSerializer", "value.serializer": "org.apache.kafka.common.serialization.ByteBufferSerializer", "security.protocol": "SASL_SSL", "ssl.truststore": "${get_secret('<SECRET_NAME>', 'SecretBinary', '<KAFKA_RULE_ROLE_ARN>')}", "ssl.truststore.password": "{{SSL_TRUSTSTORE_PASSWORD}}", "sasl.mechanism": "SCRAM-SHA-512", "sasl.scram.username": "${get_secret('<SECRET_NAME>', 'SecretString', 'kafkaUser', '<KAFKA_RULE_ROLE_ARN>')}", "sasl.scram.password": "${get_secret('<SECRET_NAME>', 'SecretString', 'kafkaPassword', '<KAFKA_RULE_ROLE_ARN>')}" } } } ], "errorAction": { "cloudwatchLogs": { "logGroupName": "AWSIotLogsV2", "<KAFKA_RULE_LOGS_ROLE_ARN>" } } } ``` This error message does not provide any reason as to why the handshake failed, so my only guess is that IoT Core does not allow self-signed CAs for the KafkaAction in a rule. Is this true, or am I missing something elsewhere potentially? I am able to connect and publish a message to our Kafka cluster with no issues using a python client, giving it the same credentials and self-signed CA, after having to add our servers' IP addresses to the SAN list on the cert.
3
answers
1
votes
6
views
asked 3 months ago

AWS IoT test-authorization missing context values

Hello, This is tangentially related to my question here [Permissions for IoT Things and Cognito User/Identity Pools](https://repost.aws/questions/QUkhT9MqeVR-mysdzKc2YQcA#AN8JHCJ_V2RTq8t38UGEK_IQ). I am trying to understand why my IoT Core Policy isn't working as expected using `aws iot test-authorization`, but am getting this error: `"missingContextValues": ["cognito-identity.amazonaws.com:sub" ]`. Setup * I have cognito user ABC, with associated Identity ID `us-east-1:xxxxxx-xxxx-xxxx-xxxx-5f7a793d20cb`. This identity has the IoT Core Policy `test-policy` (defined below) attached to it. The identity pool ID is `us-east-1:xxxxxxx-xxxx-xxxx-xxxx-fe1a9f14f96b`. * IAM policy for the Identity Pool allows full access to `iot:*` * IoT Thing named TestThing w/the `test-policy` (defined below) attached to it. * IoT Core Policy (named `test-policy`): ``` { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "iot:Connect", "Resource": "*" }, { "Effect": "Allow", "Action": "iot:Publish", "Resource": "*", "Condition": { "StringEquals": { "cognito-identity.amazonaws.com:sub": "us-east-1:xxxxxx-xxxx-xxxx-xxxx-5f7a793d20cb" } } } ] } ``` I am running this test: ``` aws iot test-authorization --principal us-east-1:xxxxxx-xxxx-xxxx-xxxx-5f7a793d20cb --cognito-identity-pool-id us-east-1:xxxxxxx-xxxx-xxxx-xxxx-fe1a9f14f96b --auth-infos actionType=CONNECT,resources=arn:aws:iot:us-east-1:xxxxxxxxxxxxxxxx:client/ABC ``` However, I am getting this response: ``` { "authResults": [ { "authInfo": { "actionType": "CONNECT", "resources": [ "arn:aws:iot:us-east-1:xxxxxxxxxxxxx:client/ABC" ] }, "allowed": { "policies": [] }, "denied": { "implicitDeny": { "policies": [ { "policyName": "test-policy", "policyArn": "arn:aws:iot:us-east-1:xxxxxxxxxxxxx:policy/test-policy" } ] }, "explicitDeny": { "policies": [] } }, "authDecision": "IMPLICIT_DENY", "missingContextValues": [ "cognito-identity.amazonaws.com:sub" ] } ] } ``` I would expect this to pass, since the CONNECT action is allowed for everyone. My best guess is that the policy can't properly be evaluated because of the missingContextValues issue, so it returns a deny. When I test this with my Python script that logs the user in, retrieves credentials and connects to the MQTT server just fine. Is there a way to provide this context value in the `test-authorization` call? Thank you!
0
answers
0
votes
3
views
asked 3 months ago

Permissions for IoT Things and Cognito User/Identity Pools

Hello, I am having some issues architecting a good security scheme for managing IoT Thing access for Cognito users. My use case is the following: * We have a number of users (corresponding to users in a User Pool, with an associated Identity Pool). Each user belongs to a particular "Company". Currently this is done via an attribute (`custom:Company`). * We have a number of IoT Things. Each of these Things belongs to a static Thing Group, whose name matches the attribute above. I'd like for a given User/Identity to be able to receive the MQTT data stream from Things that belong to a static group that matches their custom:Company attribute. Example: * I have 6 Things: A, B, C, D, E, F. * A, B & C belong to static group "FirstCompany" * D, E & F belong to static group "SecondCompany" * I have two cognito users/identities: Alice and Bob. * Alice has the custom attribute `custom:Company` = FirstCompany * Bob has the custom attribute `custom:Company` = SecondCompany I'd like for Alice to be able to subscribe to the MQTT topics for devices A, B and C, but NOT D, E and F. This means permissions for iot:Connect, iot:Receive, iot:Publish and iot:Subscribe. The pseudo-policy I'd like to assign to all users is something like this: ``` effect = allow, action = ["iot:Receive", ...] condition: target thing group == ${aws:PrincipalTag/custom:Company} ``` Unfortunately I haven't found something as straight-forward as this. As I see it, my options are: 1. Draft custom policies for each customer, in which each Thing (and associated topics) are explicitly allowed. This seemingly wouldn't scale well if a customer has thousands of Things. 2. Create a custom IoT authorizer that compares the principal's attribute with the Thing's static group. This seems like it'd run into rate limiting issues, especially if I have to check which groups a Thing belongs to for every MQTT message. 3. Come up with a naming scheme for devices that includes a customer name in some way (e.g., instead of A, B, C I'd have FirstCustomer-A, FirstCustomer-B, FirstCustomer-C). This doesn't feel like a great approach. However, it seems like this situation would be pretty common! Is there a particular way this should be done? Any guidance would be appreciated! -------------- Edit: Following up on the suggestion from Pronoy_C, I've set up the following IoT Core Policy: ``` { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "iot:Connect", "Resource": "*" }, { "Condition": { "StringEquals": { "cognito-identity.amazonaws.com:sub": "${iot:Connection.Thing.Attributes[Owner]}" } }, "Effect": "Allow", "Action": "iot:*", "Resource": "arn:aws:iot:us-east-1:xxxxxxxxxxxx:thing/*" } ] } ``` and I've attached this policy both to Thing A and to Alice's Identity. However, while Alice is able to connect to the MQTT host, I cannot publish to `$aws/things/A/shadow/get`. The AWS logs indicate AUTHORIZATION_FAILURE. I do indeed have the Owner attribute set to Alice's Identity ID. I tried testing with the CLI tool, but have run into issues there (see [this thread](https://repost.aws/questions/QUIy1VujDmTvO-3Il99dw-xQ/aws-io-t-test-authorization-missing-context-values)).
3
answers
1
votes
28
views
asked 3 months ago

Greengrass Deployment configuration use environment variables

Hello, I'm quite new to AWS GreenGrass and I try to create a deployment which will work for more then just one device. I work with a raspberry pi 4 which runs Greengrass and connects to some energy meters and sensors through software things that run on the raspberry pi. I created a deployment using the following AWS provided components: - MQTT Broker - MQTT Bridge - Auth - Shadow manager Let's say the Greengrass core device is called __mainDevice01__ and it should subscribe through MQTT bridge to all subjects containing *__mainDevice01__/things/#*. End users can add things (energy meters, sensors,...) to _mainDevice01_ which will run as a piece of software on the device. From what I experience: - I must create a separate deployment for every mainDevice in my cluster. Correct? - Every new thing that is connected to a Greengrass core devices should trigger a lot of updates to the deployment. (Which shadows to collect, new MQTT bridge links,...) I want to create a single deployment for many _mainDevices_ which all subscribe to their respective sub-topic. I tried to use _{iot:thingName}_ as a variable within the merge configuration of the MQTT bridge but that doesn't seem to work. ```json { "reset": [], "merge": { "ThingData": { "topic": "{iot:thingName}/things/#", "source": "IotCore", "target": "LocalMqtt" } } } } ``` In the same way I would like to automatically configure the Shadow manager (if possible) to collect the shadows of a things belonging to a core device or specific group. I'm not sure if my design idea is correct this way? Any suggestions on how this should be done the correct way are more then welcome! Warm regards, Hacor
1
answers
0
votes
13
views
asked 3 months ago
  • 1
  • 90 / page