Jump to: navigation, search

Changes


OSIPI (Plugin)

1,780 bytes added, 14:16, 14 September 2021
Added OSIsoft OCS API Interface
The OSIPI interface module enables support for reading data from [https://www.osisoft.com/pi-system/ OSIsoft PI systems]as well as data from the [https://docs.osisoft.com/bundle/ocs/page/ocs-content-portal-overview.html OSIsoft Cloud Services] and provides them as [[Live_Values]] within Ubik.
== Features ==
The module allows live data from the Data Archive to be read via both the '''PI Web API''' as well as from the '''OCS system'''{{Version/ServerSince|3.6.0}}. Furthermore, it supports:* Supports Values of multiple value types* Multi-Configuration of multiple server configurationinstances to handle multiple sources simultaneously* Correctly formatted Correct value in Attributesformatting according to the docs{{Version/ServerSince|3.5.0}}
== Prerequesites ==
They vary slightly by the type of interface. For the common things, you need a functioning Ubik Server setup (Studio, Database, and Web Service).
 
=== PIWebAPI===
To be able to successfully set up the system, the Ubik server/development machine needs access to the OSIPI instance. This can be easily checked in the web browser by navigating to the provided URL. [https://techsupport.osisoft.com/Documentation/PI-Web-API/help.html OSIsoft's PiWebAPI] is a [https://en.wikipedia.org/wiki/Representational_state_transfer REST API], from which the plugin reads data.
 
=== OCS API===
The Ubik server/development machine needs access to the OCS server, which usually means internet access, as it's somewhere in the cloud. The API uses OpenID Connect for authentication, and the Ubik module supports the [https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-client-creds-grant-flow OAuth2 Client Credentials Flow] only, so make sure to have a valid <code>TenantID</code>, <code>ClientID</code> and <code>ClientSecret</code> ready.
== Configuration in Ubik ==
|<code>Float</code>
|}
 
The same is true for the '''OCS API''', nullables are not yet supported.
=== Authentication ===
The following authentication methods are supported. ==== PI Web API ====The OSIPI plugin supports two types of authenticationfor the '''PIWebAPI''':
* Basic {{Version/ServerSince|3.5.0}}
* Current User/Windows Authentication In the case of '''Basic authentication''', put the credentials in the respective fields <code>LOGINNAME</code> and <code>PASSWORD</code>. Be aware that domain backslashes might need to be doubled, thanks to their escaping nature, e.g.: <code>DOMAIN\\USER</code> If you leave the <code>LOGINNAME</code> field empty, the client tries to authenticate against the OSIPI server with <code>[https://docs.microsoft.com/en-us/dotnet/api/system.net.webclient.usedefaultcredentials WebClient.UseDefaultCredentials]</code>. Should this be the authentication of your choice, be aware that the Ubik Studio/Enterprise Service/Web Service needs to be started as that user that has access to the PI system.  Also, make sure that <code>USE_OCS</code> is '''not''' checked. ==== OCS API ====Only one type of authentication is supported for the '''OCS API''':* OAuth2.0/OpenID Connect Client Credentials Flow
In the case of '''Basic authentication'''For that, put the credentials in make sure to fill up the respective required fields <code>LOGINNAMETENANT_ID</code> and , <code>PASSWORDCLIENT_ID</code>. Be aware that domain backslashes might need to be doubled, thanks to their escaping nature: <code>DOMAIN\\USERCLIENT_SECRET</code>, <code>API_VERSION</code>, <code>OCS_NAMESPACE</code> and make sure that <code>USE_OCS</code> is checked.
If you leave the <code>LOGINNAME</code> field empty, the client tries to authenticate against the OSIPI server with <code>[https:== Attributes {{Version/WinXSince|3.6}} {{Version/docsXamarinSince|1.microsoft.com/en-us/dotnet/api1}} {{Version/systemServerSince|3.net5.webclient.usedefaultcredentials WebClient.UseDefaultCredentials]0}} ==The OSIPI Plugin delivers the correctly formatted value (if numeric) in the Live Value Attributes collection (exposed as <code>FORMATTED</code>. Should this be the authentication of your choice), which can be aware that the Ubik Studio/Enterprise Service/Web Service needs [[Live_Values#Binding_to_Attributes|bound to be started as that user that has access to the PI systemdirectly from XAML]].
== Attributes {{Version/WinXSince|3.6}} {{Version/XamarinSince|1.1}} {{Version/ServerSince|3.6.0}} ==
The OSIPI Plugin delivers the correctly formatted value in the Live Value Attributes collection, which can be [[Live_Values#Binding_to_Attributes|bound to directly from XAML]].
The [https://docs.microsoft.com/en-us/dotnet/api/system.globalization.cultureinfo value formatting culture] can be set in the '''OSIPI_SERVER''' configuration with the <code>FORMATTING_CULTURE</code> field, which defaults to <code>EN_US</code>. There's also an option to trim leading zeroes (<code>TRIM_LEADING_ZEROES</code>, defaulting to <code>false</code>).
This functionality is available in Ubik.Server 3.5.x as well, however, the fields <code>FORMATTING_CULTURE</code> and <code>TRIM_LEADING_ZEROES</code> are not generated automatically. They got added with This was repaired in 3.6.0.
187
edits