OPC UA Sender Connector
The OPC UA Sender Connector allows writing data to OPC UA server nodes, enabling control and configuration of industrial automation systems and IoT devices.
Service Description
The OPC UA Sender Connector enables writing values to OPC UA server nodes. It establishes a secure connection to the OPC UA server, authenticates, and writes data to specified nodes.
Required Connector Properties
- Host: The OPC UA server endpoint URL (e.g.,
opc.tcp://localhost:4840) - Anonymous Login: Enable anonymous authentication (true/false)
- Basic Authentication ID: Credential ID for username/password authentication
- Allowed Security Policies: Security policy to use (None, Basic128Rsa15, Basic256, Basic256Sha256)
- Key Alias: Certificate key alias for certificate-based authentication
- Key Store ID: Key store containing the client certificate
- Application URI: Unique identifier for the OPC UA client application
- Application Name: Descriptive name for the OPC UA client
- Node IDs: Comma-separated list of OPC UA node identifiers to write to
- Data Type: Data type of the values to write (Boolean, Int32, Double, String, etc.)
Configuration Details
Connection Settings
- Host: Full OPC UA endpoint URL including protocol (opc.tcp://)
- Application URI: Should be unique and match certificate if using certificate auth
- Application Name: Identifies your application in OPC UA server logs
Authentication
Choose one of the following authentication methods:
Anonymous Login
- Set Anonymous Login to
true - No credentials required (use only in trusted networks)
Username/Password Authentication
- Set Anonymous Login to
false - Configure Basic Authentication ID with credential reference
- Credentials must be pre-configured in Operations → Credentials
Certificate-based Authentication
- Set Anonymous Login to
false - Configure Key Store ID with keystore reference
- Configure Key Alias with certificate alias
- Certificate must be pre-configured in Operations → Keystores
Security Policy
Select appropriate security policy:
- None: No encryption (use only for testing)
- Basic128Rsa15: RSA 1024-bit encryption (legacy)
- Basic256: RSA 2048-bit encryption
- Basic256Sha256: RSA 2048-bit with SHA-256 (recommended)
Node Configuration
- Node IDs: Specify OPC UA node identifiers (e.g.,
ns=2;s=MyDevice.Temperature)- Format:
ns=<namespace>;s=<identifier>orns=<namespace>;i=<numeric> - Multiple nodes:
ns=2;s=Node1,ns=2;s=Node2
- Format:
- Data Type: Must match the OPC UA node's data type
Supported Data Types
- Boolean: true/false values
- Byte, SByte: 8-bit integers
- Int16, UInt16: 16-bit integers
- Int32, UInt32: 32-bit integers
- Int64, UInt64: 64-bit integers
- Float: 32-bit floating point
- Double: 64-bit floating point
- String: Text values
- DateTime: Timestamp values
Message Flow
- Message arrives at OPC UA Sender connector
- Connector establishes connection to OPC UA server
- Authenticates using configured method
- Extracts values from message body
- Writes values to specified OPC UA nodes
- Receives write confirmation from server
- Closes connection or maintains for next write
Best Practices
- Use Secure Policies: Always use encryption in production (Basic256Sha256)
- Certificate Authentication: Prefer certificate-based auth over username/password
- Validate Node IDs: Ensure node IDs exist and are writable on the server
- Match Data Types: Verify data types match OPC UA node definitions
- Handle Errors: Implement error handling for connection and write failures
- Connection Pooling: Reuse connections for better performance
- Monitor Write Status: Track write confirmations and failures
Use the OPC UA Sender Connector when you need to control industrial equipment, update setpoints, or configure IoT devices. Common scenarios include sending production commands to PLCs, updating temperature setpoints, or controlling actuators.
Message Format
The message body should contain the values to write:
{
"values": [
{
"nodeId": "ns=2;s=MyDevice.Temperature",
"value": 25.5
},
{
"nodeId": "ns=2;s=MyDevice.Status",
"value": "Running"
}
]
}
Or for single value:
{
"value": 25.5
}
Error Handling
Common errors and solutions:
- Connection Failed: Verify host URL and network connectivity
- Authentication Error: Check credentials or certificate configuration
- Security Policy Mismatch: Ensure policy matches server requirements
- Node Not Found: Verify node ID exists on the server
- Access Denied: Check user permissions for writing to nodes
- Data Type Mismatch: Ensure value type matches node data type
- Certificate Error: Verify certificate validity and trust
Integration Example
A typical integration flow using OPC UA Sender:
- Timer/Trigger: Initiates the flow periodically
- Database/API: Retrieves control values
- Mapping: Transforms data to OPC UA format
- OPC UA Sender: Writes values to OPC UA server
- Logging: Records write operations for audit