Skip to main content

opc-ua

Connect to OPC-UA servers for secure, cross-platform industrial data exchange with browsing, subscriptions, and method calls.

Overview

The opc-ua node connects to OPC-UA (Unified Architecture) servers for secure, platform-independent industrial data exchange. It supports namespace browsing, real-time subscriptions, method calls, and certificate-based security for enterprise-grade industrial communication.

Binary
Encoding
X.509
Security
Auto
Discovery
Sub
Real-time

Security Configuration

None

No encryption or signing. Suitable for development and isolated networks only.

Not for production

Sign

Messages are signed to verify integrity. Data is not encrypted but tampering is detected.

Medium security

SignAndEncrypt

Full encryption and signing using X.509 certificates. Recommended for production systems.

Recommended

Properties

Property Type Required Default Description
endpoint string Yes - OPC-UA server endpoint URL (e.g., opc.tcp://host:4840)
securityMode string No "None" "None", "Sign", or "SignAndEncrypt"
securityPolicy string No "None" "Basic128Rsa15", "Basic256", "Basic256Sha256"
certificate string No - Path to X.509 client certificate (.pem)
nodeId string Yes - OPC-UA node identifier (e.g., "ns=2;s=Temperature")
interval number No 1000 Subscription publishing interval in ms
queueSize number No 10 Monitored item queue size for buffering changes

Inputs

Read Value
{
  "payload": {
    "action": "read",
    "nodeId": "ns=2;s=Temperature"
  }
}
Subscribe to Changes
{
  "payload": {
    "action": "subscribe",
    "nodeId": "ns=2;s=Temperature",
    "interval": 500
  }
}
Browse Namespace
{
  "payload": {
    "action": "browse",
    "nodeId": "ns=0;i=85"
  }
}

Outputs

Value Response
{
  "payload": {
    "nodeId": "ns=2;s=Temperature",
    "value": 72.5,
    "dataType": "Double",
    "quality": "Good",
    "sourceTimestamp": "2024-01-15T10:30:45Z",
    "serverTimestamp": "2024-01-15T10:30:45Z"
  }
}
Browse Response
{
  "payload": [
    {
      "nodeId": "ns=2;s=Temperature",
      "browseName": "Temperature",
      "nodeClass": "Variable"
    },
    {
      "nodeId": "ns=2;s=Pressure",
      "browseName": "Pressure",
      "nodeClass": "Variable"
    }
  ]
}

Use Cases

SCADA Integration

Connect to SCADA systems for supervisory control, collecting data from distributed process control equipment.

Historian Connection

Stream process data to historian databases through OPC-UA for long-term trend analysis and compliance reporting.

Cross-platform Data

Exchange data between systems from different vendors using the platform-independent OPC-UA standard.

MES Integration

Bridge shop floor data to Manufacturing Execution Systems for production tracking and quality management.

Example: Monitor Process Variables

Subscribe to temperature and pressure nodes on an OPC-UA server.

[
  {
    "id": "opc-client",
    "type": "opc-ua",
    "endpoint": "opc.tcp://192.168.1.50:4840",
    "securityMode": "SignAndEncrypt",
    "securityPolicy": "Basic256Sha256",
    "action": "subscribe",
    "nodeId": "ns=2;s=Temperature",
    "interval": 1000
  },
  {
    "id": "quality-filter",
    "type": "function",
    "func": "if (msg.payload.quality === 'Good') return msg;"
  },
  {
    "id": "dashboard",
    "type": "ui-gauge",
    "name": "Process Temperature"
  }
]

Tips & Best Practices

Browse First: Use the browse action to discover available nodes in the server namespace before setting up subscriptions.

Use Subscriptions: Prefer subscriptions over polling for real-time data. They are more efficient and provide instant change notifications.

Certificate Management: Generate and manage certificates properly. Trust the server certificate and register your client certificate with the server.

Quality Filtering: Always check the quality status of values. "Good" indicates valid data; "Bad" or "Uncertain" should trigger alerts.

Related Nodes