DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Configuring a Shopify MuleSoft Connector
  • Handle HL7 MLLP Messages With Mule 4
  • SharePoint Integration With MuleSoft
  • Configuring Amazon S3 Using Mulesoft

Trending

  • Rethinking Java CRUDs With Event Sourcing and CQRS Patterns
  • Microservices: Externalized Configuration
  • How to Parse Large XML Files in PHP Without Running Out of Memory
  • Spring AI Advisors: Chat Memory, Token Tracking, and Message Logging
  1. DZone
  2. Software Design and Architecture
  3. Integration
  4. OSIsoft PI Historian Connector for MuleSoft

OSIsoft PI Historian Connector for MuleSoft

In this short tutorial, I will quickly walk you through our brand new OSIsoft PI Historian connector for Mule 4. This connector is developed on the top of PI Web API SDK.

By 
Deepak Kushwaha user avatar
Deepak Kushwaha
·
Feb. 07, 21 · Tutorial
Likes (3)
Comment
Save
Tweet
Share
7.9K Views

Join the DZone community and get the full member experience.

Join For Free

Hi there,

In this short tutorial, I will quickly walk you through our brand new OSIsoft PI Historian connector for Mule 4. This connector is developed by IntegrationWorks Australia and you can reach out to us if you want to know more about this connection.

So basically, this connector is developed on the top of PI Web API SDK provided by OSIsoft and you can refer to the following link to learn more about it:

https://github.com/IntegrationWorksAus/mule-pi-historian-connector/tree/1.0.0

Usecase

In this use case, I will demonstrate a step-by-step process to connect with the Pi Historian system and retrieve the stream value of a Pi Point.

  1. Install the OSIsoft Pi Historian connector from the MuleSoft exchange in your Anypoint studio. you can follow this link to check it out in Anypoint exchange: https://www.mulesoft.com/exchange/works.integration/mule-pi-historian-connector/
  2. Once installed, create a simple Mule App and drag-drop 'Get End Stream' for the palette into a flow:
  3. Mule Palette UICreate a global configuration for the connector and set the server details:

    Global Element Properties UI
    Optionally, click on the 'Test Connection' button to test the connectivity.
  4. Once you successfully complete step 2, now is the time to set the input for this operation. To do that, drag-drop the 'Transform message' component before the connector.
    Transform message component This connector also provides the datasense feature, which makes it simple to understand the input/output data structure during the development.
    In the above snapshot, you can see We have mapped a query parameter named 'webId' to the input webId field of the operation.
  5. We are almost done with the connector side of the configuration. To trigger this flow by an HTTP request, place and configure an HTTP listener at the source of this flow.
    Below is the snapshot of the final flow:demoFlow
  6. To trigger this flow, prepare and send an HTTP request with the webId query parameter. Since I have used the default parameters provided with the HTTP Listener, my endpoint URL is:
    http://localhost:8081/pi?webId=<PI Point's webId>
  7. If you have correctly followed the above steps, you will see a JSON response from the PI server with end stream value:
JSON
 




x


 
1
{
2
  "Timestamp": "2021-01-22T14:00:00Z",
3
  "UnitsAbbreviation": "m",
4
  "Good": true,
5
  "Questionable": false,
6
  "Substituted": false,
7
  "Annotated": false,
8
  "Value": 12.3
9
}



Thanks for reading this article. If you need any help with this tutorial or you want to discuss your specific use-case, please contact us here:

Email: [email protected] 

Also, check out our video tutorial for PI Historian connector on YouTube: https://youtu.be/YURZRpow68s


Connector (mathematics) MuleSoft

Opinions expressed by DZone contributors are their own.

Related

  • Configuring a Shopify MuleSoft Connector
  • Handle HL7 MLLP Messages With Mule 4
  • SharePoint Integration With MuleSoft
  • Configuring Amazon S3 Using Mulesoft

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook