Set up the OPC UA connector for Easy Integration on Windows IoT Host - TeamViewer Support
<main>
<article class="userContent">
<p><br></p><p>š<strong>Note:</strong> This article applies to all TeamViewer IoT users and works with any officially released TeamViewer Windows IoT Host.</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>Connect to the device</li><li>Download theĀ <a href="https://download.teamviewer-iot.com/teamviewer-iot-public-plugins/teamviewer-iot-opcua/latest/windows/teamviewer_iot_opcua.zip?_ga=2.225070617.2061074140.1679400704-933174053.1679400704" rel="nofollow noreferrer ugc"><strong>OPC UA Connector</strong></a>Ā and extract the files</li><li>Copy theĀ <strong>opcua</strong>Ā folder to the Windows IoT Host installation directory inĀ <strong>C:\Program Files (x86)\TeamViewer\</strong></li></ol><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 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Ā <strong>OPC UA Connector</strong>Ā according to your serverās configuration by providing the URL of the server, security settings, and authentication options.</p><p>For setting the connector configuration, edit the āconfig.jsonā file according to your OPC UA server settings. The file is located in theĀ <strong>C:\Program Files (x86)\TeamViewer\</strong>Ā directory.</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">"OPCUA_CONN_SETTINGS": {
"URL": "opc.tcp://127.0.0.1:49320",
"SEC_POLICY": "None",
"AUTH": "Anonymous!ā
</pre><p>Note: For the moment are only supported anonymous connections without security policy toĀ <strong>OPC UA servers</strong>.</p><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>For adding sensors, add in theĀ <strong>config.json</strong>Ā 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.</li><li>Run theĀ <strong>opcua-connector.exe</strong>Ā manually after starting the TeamViewer Windows IoT Host. The executable is located inĀ <strong>C:\Program Files (x86)\TeamViewer\opcua</strong></li><li>You can configure the Windows Task Scheduler to run theĀ <strong>opcua-connector.exe</strong>Ā on Windows startup.</li></ol><pre class="code codeBlock" spellcheck="false" tabindex="0">"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"
</pre><p><br></p><h3 data-id="-5"></h3>
</article>
</main>