📌Note: This article applies to all TeamViewer IoT users and works with any officially released TeamViewer Windows IoT Host.
OPC Technology stands for “Open Platform Communications” and is an approved communication standard for the process industry. The OPC Unified Architecture (UA) is an interoperability standard and provides a secure and reliable data exchange mechanism. OPC UA is a platform-independent system and ensures information flow between devices from multiple vendors. For real-time data access, the OPC Data Access specification is being used.
TeamViewer IoT provides an OPC UA Connector that connects to the OPC UA Server and collects values from OPC UA Variables. The connector communicates with TeamViewer IoT Cloud with the help of the IoT Agent.
The setup contains three basic steps. Follow the sections in this article:
- Connector Configuration
- Adding a Sensor via OPC UA Connector
- Connect to the device
- Download the OPC UA Connector and extract the files
- Copy the opcua folder to the Windows IoT Host installation directory in C:\Program Files (x86)\TeamViewer\
In most cases, the OPC UA servers are being configured by other companies. And the configuration is specific to the installation and the environment where it is being used. You need to configure the OPC UA Connector according to your server’s configuration by providing the URL of the server, security settings, and authentication options.
For setting the connector configuration, edit the “config.json” file according to your OPC UA server settings. The file is located in the C:\Program Files (x86)\TeamViewer\ directory.
- Edit the opcua.conf file. The file is located in /var/lib/teamviewer-iot-agent/scripts/opcua/ directory of the Edge Device.
- Below are the parameters included in the file:
Note: For the moment are only supported anonymous connections without security policy to OPC UA servers.
Adding a sensor via OPC UA connector
- For adding sensors, add in the config.json file the sensors and the metrics. The default config file contains 2 sensors with 2 metrics each as an example. Add as many sensors and metrics as you want.
- Run the opcua-connector.exe manually after starting the TeamViewer Windows IoT Host. The executable is located in C:\Program Files (x86)\TeamViewer\opcua
- You can configure the Windows Task Scheduler to run the opcua-connector.exe on Windows startup.