Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Azure-Samples/iot-edge-proficy-historian

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments

Proficy Historian Module for the Azure IoT Gateway SDK

This reference implementation demonstrates how the Azure IoT Gateway SDK can be used to connect to existing Proficy Historian servers and send JSON encoded telemetry data from these servers using the Proficy Historian SDK pub/sub format (using a JSON payload) to Azure IoT Hub. All transport protocols supported by the Gateway SDK can be used, i.e. HTTPS, AMQP and MQTT. The transport is selected in the transport setting in gateway_config.json.

This module uses the Proficy Historian SDK and therefore licensing restrictions from GE may apply.

Azure IoT Gateway SDK compatibility

The current version of the Proxy module is targeted at the Azure IoT Gateway SDK 2017-01-13 release.

Use the following command line to clone the compatible version Azure IoT Gateway SDK, then follow the build instructions included:

git clone --recursive https://github.com/Azure/azure-iot-gateway-sdk.git

Directory Structure

/samples

This folder contains a sample configuration that instructs a vanilla gateway host load the module and IoT Hub proxy module and configures the module to create a subscription on a standard server which publishes the specified tags to Azure IoT Hub.

/src

This folder contains the C# Proficy Historian module source file (GatewayModule.cs).

Building the Module

Open the solution in Visual Studio and run the build command

Configuring the Module

Proficy Historian tags whose values should be published to Azure IoT Hub can be configured in the module JSON configuration. A sample template configuration file can be found in samples/gateway_config.json. The configuration consists of a OPC-UA Application Configuration and Subscriptions section.

Application Configuration section

The args section should be confiugred as shown below

"args": {
    "ServerName": "<HistorianServerName>", //Mandatory
    "UserName": "<HistorianUserName>", //Mandatory
    "Password": "<HistorianPassWord>", //Mandatory
    "PrintToConsole": false, // Optional - default is false
    "TagsToSubscribe": [ ... ]
    ]
}

TagsToSubscribe section

The TagsToSubscribe section contains an array of Tagnames that should be subscribed to from the Proficy Historian server at startup.

    "TagsToSubscribe": [
        { "TagName": "<Tagname1>" }, // Tagname is mandatory, MinimumElapsedMilliSeconds is optional - default is 1000
        { "TagName": "<Tagname2>", "MinimumElapsedMilliSeconds": 1000 }
    ]

Running the module

To run the module and have it publish to IoT Hub, configure the name of your Hub (JSON field "IoTHubName") and the IoT Hub device ID and shared access key to use (JSON fields "Id" and "SharedAccessKey") in your version of gateway_config.json. Ensure that the right native module is configured, based on your platform (i.e. iothub.dll for Windows, libiothub.so for Linux, etc.).

About

C# Proficy Historian Module for Azure IoT Edge

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages