# OpenHistorian - OPC UA input

**URL:** <http://discussions.gridprotectionalliance.org/t/openhistorian-opc-ua-input/676>\
**Category:** openHistorian\
**Created:** [May 13, 2020, 3:42pm UTC](http://discussions.gridprotectionalliance.org/t/openhistorian-opc-ua-input/676 "2020-05-13T15:42:12Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![KBonnot](http://discussions.gridprotectionalliance.org/letter_avatar_proxy/v4/letter/k/e8c25b/32.png) [@KBonnot](http://discussions.gridprotectionalliance.org/u/KBonnot)\
**Post date:** [May 13, 2020, 3:42pm UTC](http://discussions.gridprotectionalliance.org/t/openhistorian-opc-ua-input/676/1 "2020-05-13T15:42:12Z")

</div>

Hello there,

Brand new here from a ‘grid user’ side of things : I work in the renewable field and I’m looking to using OpenHistorian in our existing architecture. The Modbus input configuration works well (I’m still in the early stages of getting it to work), but I’m wondering if you’re looking into other industrial protocols, such as OPC UA ? Is there an input out there in the works ?

Thanks a lot in advance,

Best regards,

KB

---

<div class="post-metadata">

**Author:** ![ritchiecarroll](http://discussions.gridprotectionalliance.org/user_avatar/discussions.gridprotectionalliance.org/ritchiecarroll/32/2_2.png) [@ritchiecarroll](http://discussions.gridprotectionalliance.org/u/ritchiecarroll)\
**Post date:** [May 13, 2020, 3:47pm UTC](http://discussions.gridprotectionalliance.org/t/openhistorian-opc-ua-input/676/2 "2020-05-13T15:47:18Z")

</div>

We started work on some OPC UA adapters, but it was never completed as we haven’t had any demand for it. The work to date is here:

> **[GitHub - GridProtectionAlliance/OPCAdapters: OPC-UA Adapters for the Grid...](https://github.com/GridProtectionAlliance/OPCAdapters)**
>
> OPC-UA Adapters for the Grid Solutions Framework Time-series Library - GitHub - GridProtectionAlliance/OPCAdapters: OPC-UA Adapters for the Grid Solutions Framework Time-series Library

Thanks,  
Ritchie

---

<div class="post-metadata">

**Author:** ![tom](http://discussions.gridprotectionalliance.org/letter_avatar_proxy/v4/letter/t/3d9bf3/32.png) [@tom](http://discussions.gridprotectionalliance.org/u/tom)\
**Post date:** [September 17, 2020, 11:17pm UTC](http://discussions.gridprotectionalliance.org/t/openhistorian-opc-ua-input/676/3 "2020-09-17T23:17:52Z")

</div>

I’ve written OPC UA Adapter recently. Available here:

> **[GitHub - Pinkisagit/OpenHistorian-OPC-UA-Adapter: Adapter which ingests OPC...](https://github.com/Pinkisagit/OpenHistorian-OPC-UA-Adapter)**
>
> Adapter which ingests OPC UA data into OpenHistorian - GitHub - Pinkisagit/OpenHistorian-OPC-UA-Adapter: Adapter which ingests OPC UA data into OpenHistorian

Regards,  
Tom

---

<div class="post-metadata">

**Author:** ![ritchiecarroll](http://discussions.gridprotectionalliance.org/user_avatar/discussions.gridprotectionalliance.org/ritchiecarroll/32/2_2.png) [@ritchiecarroll](http://discussions.gridprotectionalliance.org/u/ritchiecarroll)\
**Post date:** [September 18, 2020, 2:17am UTC](http://discussions.gridprotectionalliance.org/t/openhistorian-opc-ua-input/676/4 "2020-09-18T02:17:44Z")

</div>

Wow Tom!

Nice work! I’ll check it out!

Ritchie

---

<div class="post-metadata">

**Author:** ![Peter](http://discussions.gridprotectionalliance.org/letter_avatar_proxy/v4/letter/p/278dde/32.png) [@Peter](http://discussions.gridprotectionalliance.org/u/Peter)\
**Post date:** [April 1, 2021, 8:28am UTC](http://discussions.gridprotectionalliance.org/t/openhistorian-opc-ua-input/676/5 "2021-04-01T08:28:27Z")

</div>

Howto compile project from Github is not (yet) very clear to me.  
What to do with the csproj files ? Do i need Visual studio installed ? And what version?

Sorry for this questions but iám newby on github.

---

<div class="post-metadata">

**Author:** ![ritchiecarroll](http://discussions.gridprotectionalliance.org/user_avatar/discussions.gridprotectionalliance.org/ritchiecarroll/32/2_2.png) [@ritchiecarroll](http://discussions.gridprotectionalliance.org/u/ritchiecarroll)\
**Post date:** [April 2, 2021, 1:18pm UTC](http://discussions.gridprotectionalliance.org/t/openhistorian-opc-ua-input/676/6 "2021-04-02T13:18:21Z")

</div>

Yes, you would need to compile with Visual Studio. There is a free version you can download here:

> **[Visual Studio 2022 Community Edition – Download Latest Free Version](https://visualstudio.microsoft.com/vs/community/)**
>
> Try our free, fully-featured, and extensible IDE for creating modern developer apps for Windows, Android, & iOS. Download Community for free today!

---

<div class="post-metadata">

**Author:** ![NewUser](http://discussions.gridprotectionalliance.org/letter_avatar_proxy/v4/letter/n/3e96dc/32.png) [@NewUser](http://discussions.gridprotectionalliance.org/u/NewUser)\
**Post date:** [April 3, 2021, 9:52am UTC](http://discussions.gridprotectionalliance.org/t/openhistorian-opc-ua-input/676/7 "2021-04-03T09:52:42Z")

</div>

So i installed VS2019  
Add extra dir with the GSF dll, compiling goes a little better  
There is need for OPCUA adapter, but wich version to use ?  
This version is mentioned in the code  
[https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua.Client.ComplexTypes.Symbols/1.4.362.42](https://www.nuget.org/packages/OPCFoundation.NetStandard.Opc.Ua.Client.ComplexTypes.Symbols/1.4.362.42) ???

| Severity | Code | Description | Project | File | Line | Suppression State |
| --- | --- | --- | --- | --- | --- | --- |
| Error | CS0246 | The type or namespace name ‘MonitoredItemNotificationEventArgs’ could not be found (are you missing a using directive or an assembly reference?) | OPCUA Adapter | C:\Users\Administrator\source\repos\OpenHistorian-OPC-UA-Adapter\OPCUAAdapter\OPCUAAdapter.cs | 198 | N/A |
| Error | CS0246 | The type or namespace name ‘Opc’ could not be found (are you missing a using directive or an assembly reference?) | OPCUA Adapter | C:\Users\Administrator\source\repos\OpenHistorian-OPC-UA-Adapter\OPCUAAdapter\OPCUAAdapter.cs | 6 | N/A |
| Error | CS0246 | The type or namespace name ‘Opc’ could not be found (are you missing a using directive or an assembly reference?) | OPCUA Adapter | C:\Users\Administrator\source\repos\OpenHistorian-OPC-UA-Adapter\OPCUAAdapter\OPCUAAdapter.cs | 7 | N/A |
| Error | CS0246 | The type or namespace name ‘Opc’ could not be found (are you missing a using directive or an assembly reference?) | OPCUA Adapter | C:\Users\Administrator\source\repos\OpenHistorian-OPC-UA-Adapter\OPCUAAdapter\OPCUAAdapter.cs | 8 | N/A |
| Error | CS0246 | The type or namespace name ‘ConfiguredEndpoint’ could not be found (are you missing a using directive or an assembly reference?) | OPCUA Adapter | C:\Users\Administrator\source\repos\OpenHistorian-OPC-UA-Adapter\OPCUAAdapter\OPCUAAdapter.cs | 22 | N/A |
| Error | CS0246 | The type or namespace name ‘ApplicationConfiguration’ could not be found (are you missing a using directive or an assembly reference?) | OPCUA Adapter | C:\Users\Administrator\source\repos\OpenHistorian-OPC-UA-Adapter\OPCUAAdapter\OPCUAAdapter.cs | 23 | N/A |
| Error | CS0246 | The type or namespace name ‘Session’ could not be found (are you missing a using directive or an assembly reference?) | OPCUA Adapter | C:\Users\Administrator\source\repos\OpenHistorian-OPC-UA-Adapter\OPCUAAdapter\OPCUAAdapter.cs | 24 | N/A |
| Error | CS0246 | The type or namespace name ‘SessionReconnectHandler’ could not be found (are you missing a using directive or an assembly reference?) | OPCUA Adapter | C:\Users\Administrator\source\repos\OpenHistorian-OPC-UA-Adapter\OPCUAAdapter\OPCUAAdapter.cs | 26 | N/A |
| Error | CS0246 | The type or namespace name ‘Subscription’ could not be found (are you missing a using directive or an assembly reference?) | OPCUA Adapter | C:\Users\Administrator\source\repos\OpenHistorian-OPC-UA-Adapter\OPCUAAdapter\OPCUAAdapter.cs | 27 | N/A |
| Error | CS0246 | The type or namespace name ‘CertificateValidator’ could not be found (are you missing a using directive or an assembly reference?) | OPCUA Adapter | C:\Users\Administrator\source\repos\OpenHistorian-OPC-UA-Adapter\OPCUAAdapter\OPCUAAdapter.cs | 118 | N/A |
| Error | CS0246 | The type or namespace name ‘CertificateValidationEventArgs’ could not be found (are you missing a using directive or an assembly reference?) | OPCUA Adapter | C:\Users\Administrator\source\repos\OpenHistorian-OPC-UA-Adapter\OPCUAAdapter\OPCUAAdapter.cs | 118 | N/A |
| Error | CS0246 | The type or namespace name ‘Session’ could not be found (are you missing a using directive or an assembly reference?) | OPCUA Adapter | C:\Users\Administrator\source\repos\OpenHistorian-OPC-UA-Adapter\OPCUAAdapter\OPCUAAdapter.cs | 134 | N/A |
| Error | CS0246 | The type or namespace name ‘KeepAliveEventArgs’ could not be found (are you missing a using directive or an assembly reference?) | OPCUA Adapter | C:\Users\Administrator\source\repos\OpenHistorian-OPC-UA-Adapter\OPCUAAdapter\OPCUAAdapter.cs | 134 | N/A |
| Error | CS0246 | The type or namespace name ‘ReferenceDescriptionCollection’ could not be found (are you missing a using directive or an assembly reference?) | OPCUA Adapter | C:\Users\Administrator\source\repos\OpenHistorian-OPC-UA-Adapter\OPCUAAdapter\OPCUAAdapter.cs | 174 | N/A |
| Error | CS0246 | The type or namespace name ‘MonitoredItem’ could not be found (are you missing a using directive or an assembly reference?) | OPCUA Adapter | C:\Users\Administrator\source\repos\OpenHistorian-OPC-UA-Adapter\OPCUAAdapter\OPCUAAdapter.cs | 198 | N/A |

---

<div class="post-metadata">

**Author:** ![ritchiecarroll](http://discussions.gridprotectionalliance.org/user_avatar/discussions.gridprotectionalliance.org/ritchiecarroll/32/2_2.png) [@ritchiecarroll](http://discussions.gridprotectionalliance.org/u/ritchiecarroll)\
**Post date:** [April 5, 2021, 4:16pm UTC](http://discussions.gridprotectionalliance.org/t/openhistorian-opc-ua-input/676/8 "2021-04-05T16:16:49Z")

</div>

I’m hoping @tom can weigh in here since he wrote that code - but it looks like your reference to OPC is not setup correctly - I would start here:

[https://www.opcconnect.com/dotnet.php](https://www.opcconnect.com/dotnet.php)

Thanks,  
Ritchie

---

<div class="post-metadata">

**Author:** ![tom](http://discussions.gridprotectionalliance.org/letter_avatar_proxy/v4/letter/t/3d9bf3/32.png) [@tom](http://discussions.gridprotectionalliance.org/u/tom)\
**Post date:** [April 6, 2021, 5:44am UTC](http://discussions.gridprotectionalliance.org/t/openhistorian-opc-ua-input/676/9 "2021-04-06T05:44:57Z")

</div>

What you need is OPC-UA Nuget package installed. Since packages.config file already exists and should have references to OPC-UA, all you most likely need is to restore packages.

Following the image I attached below, in Solution Explorer of Visual Studio, right click on the solution and you’ll get a menu. Click on “Restore NuGet Packages”.

 ![image](http://discussions.gridprotectionalliance.org/uploads/default/original/1X/55ca54f47038201aa0681fbb97ed537ae38dbd57.png)

---

<div class="post-metadata">

**Author:** ![tom](http://discussions.gridprotectionalliance.org/letter_avatar_proxy/v4/letter/t/3d9bf3/32.png) [@tom](http://discussions.gridprotectionalliance.org/u/tom)\
**Post date:** [April 6, 2021, 5:45am UTC](http://discussions.gridprotectionalliance.org/t/openhistorian-opc-ua-input/676/10 "2021-04-06T05:45:28Z")

</div>

If that doesn’t work, then you may have to install OPCUA Nuget package by clicking on “Manage NuGet Packages for Solution…” in the same menu. Then search for opc.ua (version highlighted).

![image](http://discussions.gridprotectionalliance.org/uploads/default/original/1X/e1f34b34d097007dbacf6548a198c30a102bff7b.png)

One of these solutions should solve the reference issue.
