Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Historian SDK

Using the AVEVA Historian SDK with AVEVA Insight

AVEVA Insight uses the same SDK as on-premises versions of AVEVA Historian. Because of this, all of the work supporting the on-premises Historian can be leveraged for AVEVA Insight one.

Note: In addition to what you can do with on-premises Historian, you can use the SDK with AVEVA Insight to create tag extended properties.

Here are a few key things to remember about AVEVA Insight:

  • It requires the Historian 2014 R2 SDK (or later)  
  • It has limited support for retrieval through the SDK (restricted to a single data source, due to the security model). We recommend that you use the REST/OData (“iHistory”) interface instead for general retrieval. This option is not restricted to a single data source.  
  • The constructor for HistorianConnectionArgs uses a different signature, one that accepts a single “connection string” parameter.

Data Sources

Tag data in the AVEVA Insight system is partitioned by Insight solution (a.k.a., tenant or organization). Within a solution, tag data is organized by data source. Within a data source, all tag names must be unique, but duplicates may exist across data sources. In general, a data source will be aligned with a specific application, such as a single InTouch application, a single tier -1 Historian, or a single instance of your SDK application.

Your overall AVEVA Insight account can contain many data sources. The combination of a data source plus a tagname (together called the tag’s “fully qualified name”, or FQN) identifies a unique stream of data.

Historian Publisher

Historian Publisher is utility available from the AVEVA Insight site and is used to register a new data source. By default, it registers an InTouch data source, but can also be used to register a data source for an application created with the Historian SDK.

To download the Publisher

  1. Log in to AVEVA Insight with an account that has administrator permissions.  
  2. From the Application menu (top-right area of the screen), select Administration.  
  3. Select Downloads to get to the Downloads page.  
  4. Select the Download button for Publisher.

Connection Strings

The connection string contains an encrypted URL to the server and an associated security token that both authenticates the sending application and identifies the associated tenant and data source.

To obtain a token

  1. Run Historian Publisher.  
  2. Log in with a valid AVEVA Insight account.  
  3. Supply a name for a new data source.

The Publisher includes a .config file that controls what happens next.

As originally distributed, the configuration launches an executable in the background to read the InTouch tag dictionary, creates a runtime configuration file that embeds the security token mentioned above, lists all the InTouch tags to be historized to Insight, and then launches the runtime executable. The runtime executable in turn loads that configuration, creates the tags, and begins sending data. 

You can modify the “.config” to launch your own executables that operate similarly, but against an application created with the Historian SDK. You can also have Publisher store the security token in a text file, so that you can use it in those applications. Once generated, this token is not tied to the user login used to create it and there is never a need to refresh or update it. As such, it does need to be secured and Publisher will automatically handle that for you.

There are two options for how the security token is encrypted: 

  • Encryption with a machine key
    By default, the token is encrypted with the computer’s machine key. This prevents the token from being reused to impersonate the sending application. The drawback of this approach is that the token cannot be shared across nodes and requires Publisher to be run from the same computer hosting the runtime component. Although it is not possible to share this token across machines, it is possible to share a data source across multiple computers: Simply rerun Publisher on each computer, enter the same data source name on each, and select Share when warned about specifying the name of an existing data source.  
  • Certificate
    By identifying a certificate (which can be self-signed) in the .config file based on its thumbprint, you can share the token on any computer with that certificate installed. Note that it is your responsibility to install that certificate on the computer running Publisher and on every computer which hosts the runtime. The drawback of this approach is the hassle of managing the certificate. You must also send the “thumbprint” of the certificate to the Wonderware Cloud Operations team to have it authorized for your account.

The token itself embeds an indication of which method was used, so you only need to care about the choice when you run Publisher (and be sure to install the certificate if you picked “B”). Your runtime does not need to be aware of the choice. It just needs to be able to load the generated token and use it as the connection string value.

In This Topic