Set up the OPC UA connector for Easy Integration - TeamViewer Support
<main>
<article class="userContent">
<p><br></p><p>📌<strong>Note: </strong>This article applies to all TeamViewer IoT users and requires <strong>TeamViewer IoT Agent 2.11</strong> or higher.</p><p><br></p><h3></h3><h2 data-id="overview">Overview</h2><p>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.</p><p><br></p><h3 data-id="-1"></h3><h2 data-id="architecture">Architecture</h2><p>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 <a href="https://community.teamviewer.com/English/kb/articles/109800-iot-agent-on-linux" rel="nofollow noreferrer ugc">IoT Agent</a>.</p><p>The setup contains three basic steps. Follow the sections in this article:</p><ol><li>Installation</li><li>Connector Configuration</li><li>Adding a Sensor via <strong>OPC UA Connector</strong></li></ol><p><br></p><h3 data-id="-2"></h3><h2 data-id="installation">Installation</h2><ol><li>Access the edge device remotely (<a href="https://community.teamviewer.com/English/kb/articles/109829-access-the-edge-device-via-remote-terminal" rel="nofollow noreferrer ugc">Access the Edge Device via Remote Terminal</a>).</li><li>In the terminal type in the following command and press return.</li></ol><pre class="code codeBlock" spellcheck="false" tabindex="0">sudo teamviewer-iot-agent install opcua
</pre><p><br></p><h3 data-id="-3"></h3><h2 data-id="connector-configuration">Connector configuration</h2><p>In most cases, the <strong>OPC UA servers</strong> are 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 <strong>OPC UA Connector</strong> according to your server’s configuration by providing the URL of the server, security settings, and authentication options.</p><ol><li>Edit the <strong>opcua.conf</strong> file. The file is located in <strong>/var/lib/teamviewer-iot-agent/scripts/opcua/</strong> directory of the Edge Device.</li><li>Below are the parameters included in the file:</li></ol><pre class="code codeBlock" spellcheck="false" tabindex="0"># Server Information
EndpointURL="opc.tcp://localhost:46570"
# Security Policy
# 0 - None
# 1 - Basic128Rsa15
# 2 - Basic256
# 3 - Basic256Sha256
# 4 - Aes128Sha256RsaOaep
# 5 - Aes256Sha256RsaPss
SecurityPolicy=0
# Message Security Mode
# 0 - None
# 1 - Sign
# 2 - Sign & Encrypt
MessageSecurityMode=0
# Authentication Settings
# 0 - Anonymous
# 1 - Username & Password
# 2 - Certificate & Private Key
AuthenticationType=0
# If "Username & Password" is selected
Username="admin"
Password="admin"
</pre><p><br></p><h3 data-id="-4"></h3><h2 data-id="adding-a-sensor-via-opc-ua-connector">Adding a sensor via OPC UA connector</h2><ol><li>Login in <a href="https://teamviewer-iot.com/?_ga=2.127673998.2061074140.1679400704-933174053.1679400704" rel="nofollow noreferrer ugc">TeamViewer IoT Management Console</a>.</li><li>From the navigation panel click on <strong>Inventory</strong>.</li><li>Select the <strong>Edge Device</strong> where the <strong>Connector</strong> is installed and from the dropdown menu on the right select <strong>Add Sensor</strong>.</li><li>Choose the <strong>OPC UA</strong> from the <strong>Connectors</strong> section.</li><li>Provide the <strong>Node IDs</strong> as they are specified in the server.</li><li>Associate the <strong>OPC UA Nodes</strong> with a metric name that will be displayed in <a href="https://teamviewer-iot.com/?_ga=2.127673998.2061074140.1679400704-933174053.1679400704" rel="nofollow noreferrer ugc"><strong>Teamviewer IoT Cloud</strong></a>. All the metrics are grouped in a sensor instance.</li><li>Provide the scan rate at which the data will be requested from the server and save your configuration.</li><li>Monitor the values received from the <strong>OPC UA Server</strong> by pining the configured metrics to the <strong>Dashboard</strong>.</li></ol><p><br></p><h3 data-id="-5"></h3>
</article>
</main>