OPC UA Client Connection Properties

host (string, required)

The hostname or IP address of the OPC UA device.

Examples: "192.168.2.60", "plc01.local"

port (integer, required)

The network port used by the OPC UA device.

Default: 4840

resourcePath (string)

The resource path of the OPC UA server. It is recommended to set this to a valid value, as some servers may not accept connections without one.

Default: ""

Example: "/OPCUA/PLC1"

username (string)

Specifies the username used to authenticate with the OPC UA server.

Example: "operator"

password (string)

Specifies the password used to authenticate with the OPC UA server.

Example: "SecurePass123!"

timeout (integer)

Specifies the timeout duration (in milliseconds) for connection attempts.

Default: 1000

certificateFile (string)

The absolute file path to the client’s certificate file.

Example: "/connectware_certs/cybus_client.crt"

privateKeyFile (string)

The absolute file path to the client’s private key file.

Example: "/connectware_certs/cybus_client.key"

checkHostReachable (boolean)

Determines whether a low level TCP connection can be made to the configured host and port.

Default: false

maxMonitoredItemsPerCall (integer)

Specifies the maximum number of monitored items (i.e. multiple nodes/endpoints) to register per call. If set to 0, all items are registered in a single call. The server’s configuration for this value is available at nodeId: ns=0;i=11714.

Default: 0

options (object)

Provides connection settings to fine-tune the OPC UA client behavior.

Properties of the options object:

defaultSecureTokenLifetime (integer)

Specifies the lifetime of the secure token (in milliseconds). After this time, the token must be renewed. A longer lifetime reduces effort for renewals but may impact security.

Default: 3600000

requestedSessionTimeout (integer)

Specifies the duration (in milliseconds) before an inactive OPC UA session is deleted. Sessions persist through TCP connection losses until this timeout is reached. Setting this to a higher value allows sessions to survive longer interruptions but may consume more server resources.

Default: 3600000

transportTimeout (integer)

Specifies the timeout duration (in milliseconds) for establishing a secure channel when connecting or reconnecting to an OPC UA host. This affects how long reconnection attempts wait before timing out. A longer timeout may help in unstable networks but increases the wait time for failures.

Default: 60000

endpointMustExist (boolean)

Determines whether the client must connect to the specified endpoint. If set to false, a suitable default endpoint is used when the specified one is unavailable. Setting this to true ensures connection to the exact endpoint but may lead to failures if it is unreachable.

Default: false

messageSecurityMode (string, enum)

Specifies the security mode for messages sent between the client and server. This determines how messages are encrypted and authenticated.

This element must be one of the following enum values:

  • None

  • Sign

  • SignAndEncrypt

Default: "None"

securityPolicy (string, enum)

Specifies the security policy to apply to the connection. This determines the level of security applied to the communication.

This element must be one of the following enum values:

  • Aes128_Sha256_RsaOaep

  • Basic128

  • Basic128Rsa15

  • Basic192

  • Basic192Rsa15

  • Basic256

  • Basic256Rsa15

  • Basic256Sha256

  • None

  • PubSub_Aes128_CTR

  • PubSub_Aes256_CTR

Default: "None"

watchInterval (integer)

Specifies the interval (in milliseconds) for the watchdog process that monitors connection status. Shorter intervals detect connection losses faster but increase load. Longer intervals reduce load but may delay detection of issues.

Default: 30000

connectionStrategy (object)

Specifies how connection retries are handled when an attempt fails, including the maximum number of retries and delay timing strategy. This helps manage network instability by controlling how aggressively the client tries to reconnect.

Properties of the connectionStrategy object:

maxRetry (integer)

Specifies the maximum number of times the client retries connecting after a failure.

Default: 1000000000

initialDelay (integer)

Specifies the initial delay (in milliseconds) before the first retry. Each subsequent retry delay doubles, with an optional random variation defined by randomisationFactor.

Default: 1000

maxDelay (integer)

Specifies the maximum delay (in milliseconds) allowed between retries. Retry intervals will not exceed this value and must be greater than initialDelay. A higher value allows for longer wait times between retries in unstable networks.

Default: 30000

randomisationFactor (number)

Specifies the amount of randomization that is added to the retry attempts. It must be a number between 0 and 1. If set to 0, the retries will be performed with an exponentially growing delay until the maximum delay is reached. If set to 1, the retry delays will have a maximum amount of noise added to them.

Default: 0

Additional restrictions:

  • Maximum: 1

Last updated

Was this helpful?