Skip to content

OPC UA Client connector Basic & Scale ​

The OPC UA Client connector of ConnectMQ Edge connects to any OPC UA server, subscribes to its variables and publishes the changes to your ConnectMQ broker as ISA-95 topics with value, quality, unit and timestamp. It is also the way to bring optimized S7-1500 data blocks to the cloud.

Supported servers ​

Any OPC UA server reachable over opc.tcp://: PLCs with a built-in server (S7-1500, Beckhoff, B&R…), SCADA systems, gateways such as KEPServerEX, or another ConnectMQ Edge.

ConceptOPC UA meaningLimit
ChannelOne OPC UA sessionmax 256 channels
DeviceOne subscriptionmax 256 devices per channel
TagOne monitored item

Values arrive by subscription, so only changes travel between the server and Edge. Limits are per driver, not per project. How many values you can send to the cloud depends on your plan: see Plans & broker limits and pricing.

Prepare the server ​

  • Get the endpoint URL of the server, for example opc.tcp://192.168.1.50:4840, and a user name and password if anonymous access is off.
  • Look up the NodeIds of the variables with an OPC UA browser such as UaExpert (attribute NodeId, for example ns=3;s="DB_Press"."Pressure"), or let Edge browse them (see below).
  • With SecurityMode Sign or SignAndEncrypt, the server must trust Edge: after the first connection attempt, accept the ConnectMQ Edge client certificate in the server's certificate list. Edge creates it on first start in %ProgramData%\ConnectMQ\Edge\pki-client\own.
  • Check the network: Test-NetConnection 192.168.1.50 -Port 4840 in PowerShell.

S7-1500 optimized data blocks

Turn on the OPC UA server of the S7-1500 in TIA Portal and read the optimized DBs through this connector. The Siemens S7 connector can only read non-optimized DBs.

Add the connector in ConnectMQ Edge ​

Add a channel from the template ​

In the ConnectMQ Edge desktop app open Connectors in the left menu, click + Add channel and pick the OPC UA Client template. The channel is added with sample addresses.

Enter the endpoint ​

Set EndpointUrl, and SecurityMode, SecurityPolicy, Username and Password if the server needs them. Leave user name and password empty for an anonymous session.

Add nodes as tags, or let Edge browse ​

Each device is one subscription; its ScanRateMs is the publishing interval. Either list the nodes as tags (NodeId or browse path), or give a device "AutoCreateTags": true and a BrowseRoot so Edge creates a tag for every variable below that node.

Validate and save ​

Click Validate project, then press Save and apply. The channel starts right away without restarting the service.

Trust the certificate if needed ​

With Sign or SignAndEncrypt, accept the ConnectMQ Edge client certificate on the server, then wait for the next reconnect.

Check the values ​

On Overview the devices show Reading data under Field devices; problems such as a rejected login appear in the Last problem column. Live values are on Local OPC UA Server › Live tag values, details in Windows Service Settings › Logs.

Settings reference ​

Channel (session) settings ​

SettingDefaultDescription
EndpointUrlopc.tcp://localhost:4840Server address
SecurityModeNoneNone, Sign, SignAndEncrypt
SecurityPolicyBasic256Sha256Basic256Sha256, Aes128_Sha256_RsaOaep, Aes256_Sha256_RsaPss or a policy URI (when SecurityMode is not None)
Username / Password—Empty = anonymous session. A saved password shows as ******** and is kept on save
AutoAcceptServerCertificatetrueAccept the server certificate automatically. With false, copy the server certificate to pki-client\trusted\certs
OverrideEndpointHosttrueUse the configured host/port instead of the one the server returns in its endpoint (fixes NAT/DNS issues)
SessionTimeoutMs60000Session timeout
KeepAliveIntervalMs5000Keep-alive interval; the session is re-created if it fails
OperationTimeoutMs15000Request timeout
ReconnectMinMs / ReconnectMaxMs2000 / 60000Wait range between reconnect attempts

Device (subscription) settings ​

SettingDefaultDescription
PublishingIntervalMsdevice ScanRateMsPublishing interval
SamplingIntervalMspublishing intervalSampling interval
QueueSize / DiscardOldest1 / trueMonitored item queue
DeadbandType / DeadbandValueNone / 0None, Absolute, Percent
KeepAliveCount / LifetimeCount / Priority10 / 100 / 0Subscription parameters
BrowseRooti=85 (Objects)Start node for browsing
BrowseDepth / BrowseMaxTags5 / 2000Browse depth and maximum number of tags
AutoCreateTagsfalseOn connect, browse below BrowseRoot and create a tag for every variable found

SamplingIntervalMs and QueueSize can also be set per tag under the tag's Settings.

Tag addresses ​

  • NodeId: ns=2;s=Demo.Static.Scalar.Double, ns=3;i=1001, ns=2;g=..., ns=2;b=...
  • Browse path from the Objects folder: path:2:Demo/2:Static/2:Double. A name without a namespace index uses namespace 0.
  • Browse path from another start node: path:i=2253|0:ServerStatus/0:State

Value, status code and source timestamp are passed on unchanged. Arrays are published as JSON arrays and structures (ExtensionObject) as text.

OPC UA statusquality in ConnectMQ
Goodgood
Uncertainuncertain
BadNodeIdUnknown and similar configuration errorsbad_config_error
Communication errorsbad_comm_failure
Other Bad codesbad

Tags created by browsing ​

With "AutoCreateTags": true Edge browses below BrowseRoot when it connects. The tag name is the browse names joined with . (for example Machine1.Temperature); DataType and Writable are read from the server.

Example ​

A press PLC with an encrypted OPC UA server. The project's ISA-95 levels are connectmq / site1 / production, and the device sets Line: line1 and Cell: press.

NameAddressUnitNotes
Pressurens=3;s="DB_Press"."Pressure"barFloat64
Runningpath:3:Press1/3:RunningBoolean
Targetns=3;s="DB_Press"."Target"barWritable
json
{
  "Name": "LineUa",
  "Driver": "OpcUaClient",
  "Settings": {
    "EndpointUrl": "opc.tcp://192.168.1.50:4840",
    "SecurityMode": "SignAndEncrypt",
    "SecurityPolicy": "Basic256Sha256",
    "Username": "operator",
    "Password": "***"
  },
  "Devices": [
    {
      "Name": "Press1",
      "ScanRateMs": 500,
      "Isa95": { "Line": "line1", "Cell": "press" },
      "Settings": { "DeadbandType": "Absolute", "DeadbandValue": 0.1 },
      "Tags": [
        { "Name": "Pressure", "Address": "ns=3;s=\"DB_Press\".\"Pressure\"", "DataType": "Float64", "Unit": "bar" },
        { "Name": "Running", "Address": "path:3:Press1/3:Running", "DataType": "Boolean" },
        { "Name": "Target", "Address": "ns=3;s=\"DB_Press\".\"Target\"", "Unit": "bar", "Writable": true }
      ]
    },
    {
      "Name": "AllVariables",
      "Settings": { "BrowseRoot": "ns=3;s=Press1", "BrowseDepth": 3, "AutoCreateTags": true }
    }
  ]
}

The Pressure tag arrives in ConnectMQ on the topic:

text
connectmq/site1/production/line1/press/Press1/Pressure

with this payload:

json
{
  "timestamp": "2026-10-21T14:29:00.123Z",
  "value": 182.6,
  "quality": "good",
  "unit": "bar",
  "dataType": "Float64",
  "tag": "Pressure",
  "device": "Press1",
  "channel": "LineUa"
}

The timestamp is the source timestamp from the server. See Topics and payloads.

Write values to the server ​

Tags with "Writable": true are written with the OPC UA Write service; the value is converted to the data type of the server variable automatically.

  • From the cloud: turn on Allow writes from the cloud in Cloud Settings, then publish {"value": 12.5} (or just 12.5) to the tag topic plus /set, for example connectmq/site1/production/line1/press/Press1/Target/set.
  • Locally: write the tag from an OPC UA client on the Edge local OPC UA server.

Troubleshooting ​

SymptomCause and fix
Connection fails with Sign or SignAndEncryptThe server does not trust the Edge client certificate yet. Accept it on the server (it is in %ProgramData%\ConnectMQ\Edge\pki-client\own).
Login rejectedWrong user name or password, or the server does not allow anonymous sessions.
Connects, then fails with an unreachable hostThe server returns an endpoint with a host name Edge cannot resolve. Keep OverrideEndpointHost at true.
Server certificate rejectedAutoAcceptServerCertificate is false. Copy the server certificate to pki-client\trusted\certs or set it to true.
Tag quality bad_config_errorThe NodeId or browse path does not exist (BadNodeIdUnknown). Copy the NodeId from UaExpert, including the namespace index.
Too many or too few auto-created tagsNarrow BrowseRoot, or adjust BrowseDepth and BrowseMaxTags.
Too many messagesSet DeadbandType / DeadbandValue on the device, or a Deadband per tag.

Fully managed MQTT broker for connected devices.