Aveva Data Hub Integration Guide
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.
You must have access to Aveva Data Hub and have the correct admin permissions.
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.
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.
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.
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.
After adding the connector, click the toggle in the connector tile to enable it.
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.
You can view the stream data in Aveva Data Hub.
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.
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.
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.
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:
- Click the connector tile. The connector Dashboard appears.
- Click the Topics tab.
Click the Add a new subscription icon.
- 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.
- 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.
From the Topics tab for the connector, copy the Local Topic name for the new topic and refer to it when creating the flow.
You can now create the flow that will display the data from the connector.
To create the flow:
- Navigate to Flows Manager.
For a Flows Manager, click the Go To Flow Definition icon. The flow canvas opens in a new browser tab.
On the flow canvas, drag the Datahub Subscribe node and debug node onto the canvas. Then, connect the two nodes.
- 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.
Expand the message window beneath the flow to view debug messages.
Click the Debug icon.
Confirm that messages are displaying in the message window.