How-To Guides
Integration Guides

Aveva Data Hub Integration Guide

15min

Review the following guide for setting up and integration between Litmus Edge and Aveva Data Hub. Once the integration is set up, you can send and receive data through OSIsoft Messaging Format.

Before You Begin

You must have access to Aveva Data Hub and have the correct admin permissions.

Step 1: Add a Device



Step 2: Add Tags



Step 3: Create Client in Aveva Data Hub

You will need to create a client-credentials client and do the following:

  • Set the role to Tenant Administrator.
  • Copy the Client Secret for use later.

See the Aveva Data Hub documentation Get started with client-credentials clients to learn more.

Step 4: Add Type in Aveva Data Hub

Add a type in Aveva Data Hub to define the schema of the data coming from Litmus Edge. This allows Aveva Data Hub to identify the payload and associate events with streams of data.

When you add the type, do the following:

  • Select Standard Type.
  • Enter values for Id, Name, and Description.
  • Add the following properties.

Key

Id

Name

Base Type

Select checkbox

timestamp

timestamp

Int64

Select checkbox

tagName

tagName

String

Select checkbox

deviceName

deviceName

String



success

success

Boolean



datatype

datatype

String



value

value

String



deviceID

deviceID

String



description

description

String



registerId

registerId

String

See the Aveva Data Hub documentation Add a type to learn more.

Step 5: Add Stream in Aveva Data Hub

After adding the type, add a stream that will index data based on the properties of the type you created previously.

When you create the stream, select the type you created in Step 2.

See the Aveva Data Hub documentation Manage streams to learn more.

Step 6: Add the Aveva Data Hub Connector

Follow the steps to Add a Connector and select the Aveva Data Hub provider.

Configure the following parameters.

  • Name: Enter a name for the connector.
  • Description (Optional): Enter a description.
  • Endpoint: Enter the appropriate regional endpoint (U.S. West, North Europe, Australia East), which can be found in Aveva Data Hub by navigating to Security > Clients > Client > Connection Information > Regional Endpoints.
    • U.S. West: https://uswe.datahub.connect.aveva.com/
    • North Europe: https://euno.datahub.connect.aveva.com/
    • Australia East: https://auea.datahub.connect.aveva.com/
  • Client Id: Enter your Aveva Data Hub Client ID, which can be found by navigating to Security > Clients > Client > Details> Client ID.
  • Client Secret: Enter your Aveva Data Hub Client Secret, which can be copied when creating a client in Step 1. If you need to create a new secret, navigate to Security > Clients > Client > Secrets.
  • Tenant Id: Enter your Aveva Data Hub Tenant ID. You can find it by navigating to Security > Client > Details.
  • Stream Id: Enter the Stream ID you created in Step 3. You can find it by navigating to Data Management.
  • Namespace: Enter the namespace of the Default SDS stream name. You can find it in the stream details.
  • Throttling limit: The maximum number of messages per second to be processed. The default value is zero, which means that there is no limit.
  • Persistent storage: When enabled, this will cause messages to undergo a store-and-forward procedure. Messages will be stored within Litmus Edge when cloud providers are online.
  • Queue Mode: Select the queue mode as lifo (last in first out) or fifo (first in first out). Selecting lifo means that the last data entry is processed first, and selecting fifo means the first data entry is processed first.

Step 7: Enable the Connector

After adding the connector, click the toggle in the connector tile to enable it.

Document image


If you see a Failed status, you can review the Connector Logs and relevant error messages.

After adding the connector in Litmus Edge, you have the option of viewing the data flowing through the connector in Aveva Data Hub or Litmus Edge.

View Data in Aveva Data Hub

You can view the stream data in Aveva Data Hub.

Create Outbound Topics for Connector

You will need to create outbound topics for the connector from the tags created in Step 2. If there any existing inbound topics already created for the connector, disable them before creating the outbound topics.



After adding all required topics, navigate to the Integration overview page and ensure the connector is not disabled and still shows a CONNECTED status.

Enable Topics



View Stream Data in Aveva Data Hub

You can now view the data from the DeviceHub tag(s) in Aveva Data Hub. When you configure the stream data view, select Get Range Values from the Query Type drop-down list.

See the Aveva Data Hub documentation View stream data to learn more.

View Data in Litmus Edge

You have the option of adding inbound topics in the Aveva Data Hub connector, so that you can view data in the Litmus Edge Flows Manager.

Create Inbound Topic for Connector

You will use the stream ID from Aveva Data Hub to create the inbound topic. If there any existing outbound topics already created for the connector, disable them before creating the inbound topic.

To create the inbound topic:

  1. Click the connector tile. The connector Dashboard appears.
  2. Click the Topics tab.
  3. Click the Add a new subscription icon.

    Document image
    
  4. Configure the topic.
    • Data Direction: Select Remote to Local - Inbound.
    • Local Data Topic (Optional): Paste the Stream ID value for the local data topic name. A prefix will be automatically added to the name.
    • Remote Data Topic: Copy the stream ID you created in Aveva Data Hub and paste it here.
    • Description (Optional): Enter a description for the topic.
    • Enable: Click the toggle to enable the topic.
  5. Click OK.

After adding all required topics, navigate to the Integration overview page and ensure the connector is not disabled and still shows a CONNECTED status.

Copy Inbound Topic Name

From the Topics tab for the connector, copy the Local Topic name for the new topic and refer to it when creating the flow.

Create Flow

You can now create the flow that will display the data from the connector.

To create the flow:

  1. Navigate to Flows Manager.
  2. For a Flows Manager, click the Go To Flow Definition icon. The flow canvas opens in a new browser tab.

    Go To Flow Definition icon
    Go To Flow Definition icon
    
  3. On the flow canvas, drag the Datahub Subscribe node and debug node onto the canvas. Then, connect the two nodes.

    The DataHub Subscribe and Debug nodes
    The DataHub Subscribe and Debug nodes
    
  4. Double-click the DataHub Subscribe node. The Edit DataHub Subscribe node dialog box appears.
    • In the Topic field, paste the inbound topic name you previously copied (Remote Data Topic) .
    • If needed, configure the Datahub Subscribe connection. See the Step 3: Configure Connector Nodes section in Create a Flow to learn more.
    • Optionally, add a name for the node.
    • Click Done, and then click Deploy.
  5. Expand the message window beneath the flow to view debug messages.

    The message window
    The message window
    
  6. Click the Debug icon.

    The Debug icon
    The Debug icon
    
  7. Confirm that messages are displaying in the message window.

    Data message displayed in debug window
    Data message displayed in debug window