diff --git a/README.md b/README.md index 0493a39423..9672fd4999 100644 --- a/README.md +++ b/README.md @@ -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 section configure the following: + * {Host}, get the {Host} in the DeviceExplorer Management tab, + where Host is in the connection string the part prefixed with 'HostName='. + * /devices/{DeviceId}/messages/events, get the {DeviceID} in the DeviceExplorer Management tab (id) + * {KeyValue}, get the {Keyvalue} in the DeviceExplorer Management tab (PrimaryKey) + * {Host}/devices/{DeviceId}, {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'. diff --git a/UA-UWP.sln b/UA-UWP.sln index 6302a68111..bf0bd79e66 100644 --- a/UA-UWP.sln +++ b/UA-UWP.sln @@ -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 @@ -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