📢 Notice: samples have transitioned to being hosted in individual repositories |
---|
The Open Message Format (OMF) defines a set of message headers and bodies that can be used to generate messages for ingestion into a compliant back-end system. The PI System and AVEVA Data Hub both have a compliant OMF receiving endpoint.
OMF can be used to develop data acquisition applications on platforms and in languages for which there are no supported OSIsoft libraries. Official documentation can be found here. The PI Square OMF developer community can be found here.
Some tasks and individual language examples have labels as follows:
The official OMF samples are divided in multiple categories depending on the scenario and problem/task, accessible through the following table:
These samples demonstrate sending some typical OMF messages. The
applications are configurable to both PI and AVEVA Data Hub.
Details
|
||||||||||||||||
This sample demonstrates sending time series data to the AVEVA Data Hub, Edge Data Store, and PI Web API OMF endpoints. It sends 2 values
at 1 timestamp.
Details
|
||||||||||||||||
This sample demonstrates sending time series data to the AVEVA Data Hub, Edge Data Store, and PI Web API OMF endpoints.
Details
|
||||||||||||||||
This sample demonstrates sending pre-made OMF files to the AVEVA Data Hub, Edge Data Store, and PI Web API OMF endpoints.
Details
|
||||||||||||||||
This sample demonstrates sending time series data to AVEVA Data Hub using an Azure Function App Service.
Details
|
||||||||||||||||
This sample demonstrates sending periodic temperature data to the OSIsoft
Cloud Services, Edge Data Store, and PI Web API OMF endpoints.
Details
|
Configure OMF Connection. This can be done programmatically, but here are the general steps to do it via the AVEVA Data Hub portal:
If you do not already have a Client-Credentials Client set up to use:
- After logging in to AVEVA Data Hub, open Clients, or follow the link under the section "Security"
- Under "Client Type", select "Client-Credentials"
- Click "Add Client" and either grant the "Account Administrator" role or whatever custom roles are required to create and write data to Streams
- Click "Continue," then optionally enter a description and/or update the expiration date for the Client Secret
- On the "Client Successfully Created" screen, be sure to save the Client Secret as it will not be available again (a new secret can be generated if necessary)
Once you have a Client-Credentials Client for use with OMF:
- After logging in to AVEVA Data Hub, open Connections, or follow the link under the section "Data Management"
- Under "Type", select "OMF"
- Click "Add Connection" and fill in a name for your OMF Connection
- Click "Next," and choose the Client-Credentials Client you intend your OMF application to use (or the one you just created above)
- Click "Next," and choose the Namespace(s) you intend to write OMF data to
- Click "Next," and review the configuration
- Click "Save," and you can now use this Client-Credentials Client to write OMF data to the specified Namespace(s) in the samples
Use the PI Web API OMF endpoint.
PI Connector Relay is currently not tested for and would require some changes to the code to get to work.
This list is not exhuastive, but rather a few key details to know.
- PI only accepts DateTime timestamp as the property index
- PI can only have 1 index
- ADH only accepts Dynamic OMFType classification
- ADH does not accept Link type data
A credential config.ini or app.config file is used in the examples unless otherwise noted in the example.
Note: This is not a secure way to store credentials. This is to be used at your own risk.
You will need to modify these files locally when you run the samples.
The style guide describes the organization of the repo and the code samples provided. The test guide goes into detail about the included automated tests. The on prem testing document describes the software installed on our internal build agent.
To request a new sample, if there is a feature or capability you would like demonstrated, or if there is an existing sample you would like in your favorite language, please give us feedback at https://feedback.aveva.com under the Developer Samples category. Feedback.
If your support question or issue is related to something with an AVEVA product (an error message, a problem with product configuration, etc...), please open a case with AVEVA Tech Support through myOSIsoft Customer Portal (https://my.osisoft.com).
If your support question or issue is related to a non-modified sample (or test) or documentation for the sample; please email [email protected].
If you wish to contribute please take a look at the contribution guide.
OSI Samples are licensed under the Apache 2 license.
For the main samples landing page ReadMe