Questions tagged with AWS IoT SiteWise

Content language: English

Sort by most recent

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

Collecting data from OPC-UA to SiteWise fails

Hi, I have a Greengrass Core v2 running in a Docker container which is successfully collecting measurements from an OPC-UA server however these measurements are not being forwarded to AWS Sitewise. Investigating the local logs on the core I can see swPublisher.log contains many entries saying "Failed to publish messages because an SDK client error occurred. Retrying. Error details: Unable to load AWS credentials from any provider in the chain". Any suggestions? Log: 2021-09-27T06:20:41.022Z \[INFO] (Copier) aws.iot.SiteWiseEdgePublisher: stdout. \[INFO ] 2021-09-27 06:20:41.022 \[main] Publisher - {"message":"Initialization Completed."}. {scriptName=services.aws.iot.SiteWiseEdgePublisher.lifecycle.Startup.Script, serviceName=aws.iot.SiteWiseEdgePublisher, currentState=RUNNING} 2021-09-27T06:20:44.787Z \[INFO] (Copier) aws.iot.SiteWiseEdgePublisher: stdout. \[WARN ] 2021-09-27 06:20:44.770 \[PublisherThread-0] BatchMessageUploaderTask - {"message":"Failed to publish messages because an SDK client error occurred. Retrying. Error details: Unable to load AWS credentials from any provider in the chain: \[EnvironmentVariableCredentialsProvider: Unable to load AWS credentials from environment variables (AWS_ACCESS_KEY_ID (or AWS_ACCESS_KEY) and AWS_SECRET_KEY (or AWS_SECRET_ACCESS_KEY)), SystemPropertiesCredentialsProvider: Unable to load AWS credentials from Java system properties (aws.accessKeyId and aws.secretKey), WebIdentityTokenCredentialsProvider: You must specify a value for roleArn and roleSessionName, com.amazonaws.auth.profile.ProfileCredentialsProvider@41442f3f: profile file cannot be null, com.amazonaws.auth.EC2ContainerCredentialsProviderWrapper@6833fcdc: Failed to connect to service endpoint: ]"}. {scriptName=services.aws.iot.SiteWiseEdgePublisher.lifecycle.Startup.Script, serviceName=aws.iot.SiteWiseEdgePublisher, currentState=RUNNING} Image version: amazon/aws-iot-greengrass:2.4.0-0 Edited by: johnDa on Sep 26, 2021 11:32 PM
1
answers
0
votes
114
views
johnDa
asked a year ago

How do I know when a new Metric value is available for a SiteWise Asset?

I have a SiteWise Asset with 12 Measurements and 36 Metrics. The Metrics are things like min, max, and average for each Measurement. So a Measurement might be Temperature and the corresponding Metrics would be Temperature_min, Temperature_max, and Temperature_avg. I have notifications enabled for all Measurements and Metrics. I am simulating IoT data being sent to SiteWise by passing a set of property updates for the Measurements via the CLI's batch-put-asset-property-value command. This works well; I can see the data appearing in SiteWise for both Measurements and Metrics. Again, I'm sending data in for the Measurements only whereas the Metrics are calculated by SiteWise from these Measurement values. I want to store all of this data by timestamp somewhere so I setup a IoT Rule that passes PropertyValueUpdate messages to a Lambda that updates a DynamoDB Item per timestamp. This partly works; I see messages going through the IoT Rule and appearing in DynamoDB for the Measurements but not the Metrics. It appears that updating a given property (Measurements or Metrics) triggers a notification but a Metric being calculated by SiteWise does not. Is there a way to trigger a message when a given Metric is calculated in SiteWise or can I be assured that a Metric value is available when the Measurement's PropertyValueUpdate message fires, or is there a better way of doing what I'm attempting? Thanks.
3
answers
0
votes
61
views
apenn
asked 3 years ago