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.
| Concept | OPC UA meaning | Limit |
|---|---|---|
| Channel | One OPC UA session | max 256 channels |
| Device | One subscription | max 256 devices per channel |
| Tag | One 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
SecurityModeSignorSignAndEncrypt, 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 4840in 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
| Setting | Default | Description |
|---|---|---|
EndpointUrl | opc.tcp://localhost:4840 | Server address |
SecurityMode | None | None, Sign, SignAndEncrypt |
SecurityPolicy | Basic256Sha256 | Basic256Sha256, 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 |
AutoAcceptServerCertificate | true | Accept the server certificate automatically. With false, copy the server certificate to pki-client\trusted\certs |
OverrideEndpointHost | true | Use the configured host/port instead of the one the server returns in its endpoint (fixes NAT/DNS issues) |
SessionTimeoutMs | 60000 | Session timeout |
KeepAliveIntervalMs | 5000 | Keep-alive interval; the session is re-created if it fails |
OperationTimeoutMs | 15000 | Request timeout |
ReconnectMinMs / ReconnectMaxMs | 2000 / 60000 | Wait range between reconnect attempts |
Device (subscription) settings
| Setting | Default | Description |
|---|---|---|
PublishingIntervalMs | device ScanRateMs | Publishing interval |
SamplingIntervalMs | publishing interval | Sampling interval |
QueueSize / DiscardOldest | 1 / true | Monitored item queue |
DeadbandType / DeadbandValue | None / 0 | None, Absolute, Percent |
KeepAliveCount / LifetimeCount / Priority | 10 / 100 / 0 | Subscription parameters |
BrowseRoot | i=85 (Objects) | Start node for browsing |
BrowseDepth / BrowseMaxTags | 5 / 2000 | Browse depth and maximum number of tags |
AutoCreateTags | false | On 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 status | quality in ConnectMQ |
|---|---|
| Good | good |
| Uncertain | uncertain |
BadNodeIdUnknown and similar configuration errors | bad_config_error |
| Communication errors | bad_comm_failure |
| Other Bad codes | bad |
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.
| Name | Address | Unit | Notes |
|---|---|---|---|
Pressure | ns=3;s="DB_Press"."Pressure" | bar | Float64 |
Running | path:3:Press1/3:Running | Boolean | |
Target | ns=3;s="DB_Press"."Target" | bar | Writable |
{
"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:
connectmq/site1/production/line1/press/Press1/Pressurewith this payload:
{
"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 just12.5) to the tag topic plus/set, for exampleconnectmq/site1/production/line1/press/Press1/Target/set. - Locally: write the tag from an OPC UA client on the Edge local OPC UA server.
Troubleshooting
| Symptom | Cause and fix |
|---|---|
Connection fails with Sign or SignAndEncrypt | The server does not trust the Edge client certificate yet. Accept it on the server (it is in %ProgramData%\ConnectMQ\Edge\pki-client\own). |
| Login rejected | Wrong user name or password, or the server does not allow anonymous sessions. |
| Connects, then fails with an unreachable host | The server returns an endpoint with a host name Edge cannot resolve. Keep OverrideEndpointHost at true. |
| Server certificate rejected | AutoAcceptServerCertificate is false. Copy the server certificate to pki-client\trusted\certs or set it to true. |
Tag quality bad_config_error | The NodeId or browse path does not exist (BadNodeIdUnknown). Copy the NodeId from UaExpert, including the namespace index. |
| Too many or too few auto-created tags | Narrow BrowseRoot, or adjust BrowseDepth and BrowseMaxTags. |
| Too many messages | Set DeadbandType / DeadbandValue on the device, or a Deadband per tag. |