Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,30 @@ RCL enables OPC Foundation members to deploy their applications using the UA UWP

All samples are provided under the [MIT license](https://opcfoundation.org/license/mit.html).

## How to build and run OPC UA UWP Publisher sample:

* Go to Azure portal and create a new [IoTHub](https://azure.microsoft.com/en-us/documentation/articles/iot-hub-csharp-csharp-getstarted/).

* Get [Device Explorer](https://github.com/Azure/azure-iot-sdks/blob/master/tools/DeviceExplorer/doc/how_to_use_device_explorer.md), create a new device and connect to the IoTHub you have just created.

* Get the [OPC UA .NET](https://github.com/OPCFoundation/UA-.NET) reference implementation , open the 'UA Sample application.sln'
and build and execute the Samples\Opc.Ua.SampleClient (this step is needed to generate the certificate).

* Open UA-UWP.sln solution file.

* Open the Opc.Ua.Publisher.Config.xml file to setup the IoTHub connection. In the <AmqpConnectionConfiguration> section configure the following:
* <Host>{Host}</Host>, get the {Host} in the DeviceExplorer Management tab,
where Host is in the connection string the part prefixed with 'HostName='.
* <Endpoint>/devices/{DeviceId}/messages/events</Endpoint>, get the {DeviceID} in the DeviceExplorer Management tab (id)
* <KeyValue>{KeyValue}</KeyValue>, get the {Keyvalue} in the DeviceExplorer Management tab (PrimaryKey)
* <TokenScope>{Host}/devices/{DeviceId}</TokenScope>, {Host} and {DeviceID} are the same as above

* Build and execute Opc.Ua.Publisher. You get a message that the certificate is missing. Go to C:\ProgramData, copy the 'OPC Foundation' folder
to the location you see in the error message (ex: \Users\UserName\AppData\Local\Packages\xxxxx-xxxx-xxx-xxx\LocalState).

* Close the app and start it again. Connect to a server, select a node and press Publish. The app starts publishing the nodes data to IoTHub.

* In DeviceExplorer go to the Data tab, press the Monitor button and you see data flowing to Azure IoTHub.

## Contributing
We strongly encourage community participation and contribution to this project. First, please fork the repository and commit your changes there. Once happy with your changes you can generate a 'pull request'.
Expand Down
3 changes: 2 additions & 1 deletion UA-UWP.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25123.0
VisualStudioVersion = 14.0.24720.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{A579C6F2-2C5F-4176-BEAE-0D1BD0750375}"
EndProject
Expand Down Expand Up @@ -198,6 +198,7 @@ Global
{AA9D8D17-5DBD-4E77-8496-E32177573BF3}.Release|x86.ActiveCfg = Release|x86
{AA9D8D17-5DBD-4E77-8496-E32177573BF3}.Release|x86.Build.0 = Release|x86
{0EADE7FF-73AA-4A37-B096-0076729D90C0}.Debug|Any CPU.ActiveCfg = Debug|x86
{0EADE7FF-73AA-4A37-B096-0076729D90C0}.Debug|Any CPU.Deploy.0 = Debug|x86
{0EADE7FF-73AA-4A37-B096-0076729D90C0}.Debug|ARM.ActiveCfg = Debug|ARM
{0EADE7FF-73AA-4A37-B096-0076729D90C0}.Debug|ARM.Build.0 = Debug|ARM
{0EADE7FF-73AA-4A37-B096-0076729D90C0}.Debug|ARM.Deploy.0 = Debug|ARM
Expand Down