IoT SiteWise OPC-UA collector - Amazon IoT Greengrass
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

IoT SiteWise OPC-UA collector

The IoT SiteWise OPC-UA collector component (aws.iot.SiteWiseEdgeCollectorOpcua) enables Amazon IoT SiteWise gateways to collect data from local OPC-UA servers.

With this component, Amazon IoT SiteWise gateways can connect to multiple OPC-UA servers. For more information about Amazon IoT SiteWise gateways, see Using Amazon IoT SiteWise at the edge in the Amazon IoT SiteWise User Guide.

Versions

This component has the following versions:

  • 2.4.x

  • 2.3.x

  • 2.2.x

  • 2.1.x

  • 2.0.x

Type

This component is a generic component (aws.greengrass.generic). The Greengrass nucleus runs the component's lifecycle scripts.

For more information, see Component types.

Operating system

This component can be installed on core devices that run the following operating systems:

  • Linux

  • Windows

Requirements

This component has the following requirements:

  • The Greengrass core device must run on one of the following platforms:

    • OS: Ubuntu 18.04 or later

      Architecture: x86_64 (AMD64) or ARMv8 (Aarch64)

    • OS: Red Hat Enterprise Linux (RHEL) 8

      Architecture: x86_64 (AMD64) or ARMv8 (Aarch64)

    • OS: Amazon Linux 2

      Architecture: x86_64 (AMD64) or ARMv8 (Aarch64)

    • OS: Debian 11

      Architecture: x86_64 (AMD64) or ARMv8 (Aarch64)

    • OS: Windows Server 2019 or later

      Architecture: x86_64 (AMD64)

  • The Greengrass core device must allow outbound network connectivity to OPC-UA servers.

Dependencies

When you deploy a component, Amazon IoT Greengrass also deploys compatible versions of its dependencies. This means that you must meet the requirements for the component and all of its dependencies to successfully deploy the component. This section lists the dependencies for the released versions of this component and the semantic version constraints that define the component versions for each dependency. You can also view the dependencies for each version of the component in the Amazon IoT Greengrass console. On the component details page, look for the Dependencies list.

The following table lists the dependencies for all versions of this component.

Dependency Compatible versions Dependency type
Greengrass nucleus >=2.3.0 <3.0.0 Hard
Stream manager >2.0.10<3.0.0 Hard
Secret manager >=2.0.8 <3.0.0 Hard

For more information about component dependencies, see the component recipe reference.

Configuration

This component doesn't have any configuration parameters.

You can use the Amazon IoT SiteWise console or API to configure the IoT SiteWise OPC-UA collector component. For more information, see Step 4: Add data sources - optional in the Amazon IoT SiteWise User Guide.

Input data

This component only accepts data in the following formats, all others will be ignored and discarded. The table below maps the OPC UA data types to their SiteWise equivalent.

SiteWise data type

OPC UA data type

Description

STRING

String

Guid

XmlElement

A string of maximum length 1024 bytes.

INTEGER

SByte

Byte

Int16

UInt16

Int32

UInt32*

Int64*

A signed 32-bit integer with a range from -2,147,483,648 to 2,147,483,647 .

DOUBLE

UInt32*

Int64*

Float

Double

A floating point number with range from –10^100 to 10^100 and IEEE 754 double precision.

BOOLEAN

Boolean

true or false.

* For OPC UA data types UInt32 and Int64, its SiteWise data type will be INTEGER if SiteWise is able to represent its value, otherwise it will be DOUBLE.

Output data

This component writes BatchPutAssetPropertyValue messages to Amazon IoT Greengrass stream manager. For more information, see BatchPutAssetPropertyValue in the Amazon IoT SiteWise API Reference.

Local log file

This component uses the following log file.

Linux
/greengrass/v2/logs/aws.iot.SiteWiseEdgeCollectorOpcua.log
Windows
C:\greengrass\v2\logs\aws.iot.SiteWiseEdgeCollectorOpcua.log
To view this component's logs
  • Run the following command on the core device to view this component's log file in real time. Replace /greengrass/v2 or C:\greengrass\v2 with the path to the Amazon IoT Greengrass root folder.

    Linux
    sudo tail -f /greengrass/v2/logs/aws.iot.SiteWiseEdgeCollectorOpcua.log
    Windows (PowerShell)
    Get-Content C:\greengrass\v2\logs\aws.iot.SiteWiseEdgeCollectorOpcua.log -Tail 10 -Wait

Troubleshooting and debugging

This component includes a new events log to help customers identify and fix problems. The log file is separate from the local log file, and is found in the following location. Replace /greengrass/v2 or C:\greengrass\v2 with the path to the Amazon IoT Greengrass root folder.

Linux
/greengrass/v2/work/aws.iot.SiteWiseEdgeCollectorOpcua/logs/IotSiteWiseOpcUaCollectorEvents.log
Windows
C:\greengrass\v2\work\aws.iot.SiteWiseEdgeCollectorOpcua\logs\IotSiteWiseOpcUaCollectorEvents.log

This log includes detailed information and troubleshooting instructions. Troubleshooting information is provided alongside the diagnostics, with a description of how to remedy the issue, and sometimes with links to further information. Diagnostic information includes the following:

  • Severity level

  • Timestamp

  • Additional event-specific information

Example log
dataSourceConnectionSuccess: Summary: Successfully connected to OpcUa server Level: INFO Timestamp: '2023-06-15T21:04:16.303Z' Description: Successfully connected to the data source. AssociatedMetrics: - Name: FetchedDataStreams Description: The number of fetched data streams for this data source Value: 1.0 Namespace: IoTSiteWise Dimensions: - Name: SourceName Value: SourceName{value=OPC-UA Server} - Name: ThingName Value: test-core AssociatedData: - Name: DataSourceTrace Description: Name of the data source Data: - OPC-UA Server - Name: EndpointUri Description: The endpoint to which the connection was attempted. Data: - '"opc.tcp://10.0.0.1:1234"'

Licenses

This component is released under the Greengrass Core Software License Agreement.

Changelog

The following table describes the changes in each version of the component.

Version

Changes

2.4.2

Bug fixes and improvements
  • Fixes issues during OPC UA server discovery in which a node may be discovered multiple times.

  • Fixes the snapshot feature to ensure the timestamp is new for each snapshot data point.

2.4.1

Bug fixes and improvements
  • Fixes issues related to proxy support.

  • Fixes issue where thread cleanup failed and caused a data blockage.

2.4.0

New features
  • Adds an events log to make it easier to identify and remediate problems.

Bug fixes and improvements
  • Fixes an issue with the OPC-UA client that caused certificate errors when connecting to an OPC-UA server that uses version 1.05 of the OPC-UA specification.

2.3.0

New features
  • Adds support for the Greengrass nucleus HTTP proxy configuration on Linux.

Bug fixes and improvements

2.2.0

New features
  • Adds support for installing Data Collection Pack on Linux ARMv8 architecture.

  • Minimum requirements for Linux ARMv8:

    • Memory: 4 GB

    • CPU: ARM Cortex-A72 or equivalent specification

Bug fixes and improvements
  • Improves logging of metrics in node discovery process.

  • Improves handling of unsupported data types.

  • Improves logging of data stream errors.

2.1.3

New features
  • Adds support for Windows Server 2019 or higher.

Bug fixes and improvements
  • Improves error messages when you deploy this component on unsupported devices.

2.1.1

New features
  • Adds support for configuring the following subscription properties:

    • DataChangeTrigger ‐ You can define the condition that initiates a data change alert.

    • QueueSize ‐ The depth of the queue on an OPC‐UA server for a particular metric where notifications for Monitored Items are queued.

    • PublishingIntervalMilliseconds ‐ The interval (in milliseconds) of a publishing cycle specified when a subscription is created.

    • SnapshotFrequencyMilliseconds ‐ You can configure the snapshot frequency timeout setting to ensure that Amazon IoT SiteWise Edge ingests a steady stream of data.

  • This version supports ingestion of BAD quality data and filters data based on the following data qualities:

    • UNCERTAIN quality data

    • BAD quality data

Bug fixes and improvements
  • Improvements to customer metrics.

  • Fixes the security encoding that sometimes caused issues when connecting to servers with encryption enabled.

  • Fixes an issue where the property group failed to update.

2.0.3

Bug fixes and improvements.

2.0.2

Bug fixes and improvements to asset priority syncing with edge.

2.0.1

Initial version.

See also