A demo OPC UA server application, currently in development, that fetches weather information, such as temperature, pressure, humidity, wind speed etc, from web services online through rest calls. The request's responses are returned in JSON format and manipulated in the application. The demo server put all the information requested available in OPC UA communication protocol.
- Make sure you have the two libraries open62541 and C++ REST SDK included in your project.It is expected that amalgamated open62541 header and source files are located at folder ....\open62541-Single-File and C++ REST SDK - under vcpkg folder ....\vcpkg\installed\x64-windows, relatively to the VC project folder.
- To fetch weather data, you will use the API from DarkSky API - Weather.
- If you do not already have an account, you will need to create one in order to request an API Key.
- Open the
settings.jsoninside the visual studio project folder and follow the instructions:
- Under the
darksky_apiobject, you may change:
- (REQUIRED) The value of "api_key" parameter with your API KEY that you received from your registration above.
- (OPTIONAL) The value of "interval_download" parameter to control the interval in minutes of the download of weather data.
- Under the
- Pass the path to the
settings.jsonfile as an command line argument before run.
- Build & run!
A more detail explanation about the project is going to be here soon...