Overview

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.

This article applies to all TeamViewer Embedded users and works with any officially released TeamViewer Windows Embedded Host.

Architecture

TeamViewer Embedded provides an OPC UA Connector that connects to the OPC UA Server and collects values from OPC UA Variables. The connector communicates with TeamViewer Embedded Cloud with the help of the Embedded Agent.

The setup contains three basic steps. Follow the sections in this article:

  1. Installation
  2. Connector Configuration
  3. Adding a Sensor via OPC UA Connector

Installation

  1. Connect to the device
  2. Download the OPC UA Connector and extract the files
  3. Copy the opcua folder to the Windows Embedded Host installation directory in C:\Program Files (x86)\TeamViewer\

Connector configuration

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.

  1. Edit the opcua.conf file. The file is located in /var/lib/teamviewer-iot-agent/scripts/opcua/ directory of the Edge Device.
  2. Below are the parameters included in the file:
"OPCUA_CONN_SETTINGS": {
    "URL": "opc.tcp://127.0.0.1:49320",
    "SEC_POLICY": "None",
    "AUTH": "Anonymous!”

Note: For the moment are only supported anonymous connections without security policy to OPC UA servers.

Adding a sensor via OPC UA connector

  1. 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.
  2. Run the opcua-connector.exe manually after starting the TeamViewer Windows Embedded Host. The executable is located in C:\Program Files (x86)\TeamViewer\opcua
  3. You can configure the Windows Task Scheduler to run the opcua-connector.exe on Windows startup.
"MQTT_OPCUA_MAP_CFG": {
    "Sensor1": {
      "OPCUA_NODE_LIST": [
        {
          "Name": "Tag1",
          "Nodeid": "ns=2;s=Channel1.Device1.Tag1"
        },
        {
          "Name": "Tag2",
          "Nodeid": "ns=2;s=Channel1.Device1.Tag2"
        }
      ]
    },
	"Sensor2": {
      "OPCUA_NODE_LIST": [
        {
          "Name": "Bool",
          "Nodeid": "ns=2;s=Channel1.Device1.Bool"
        },
		{
		  "Name": "String",
		  "Nodeid": "ns=2;s=Channel1.Device1.Str"