OPC UA Architecture: Information Model, Security, Sessions and Transport
OPC UA (IEC 62541) is a 13-part standard that defines a platform-independent, service-oriented architecture for industrial and building automation communication. Unlike its predecessor OPC Classic (which was Windows COM/DCOM-only), OPC UA runs on any OS, embeds a full security model, and provides a unified information model that makes every server self-describing — eliminating the need for out-of-band data dictionaries when integrating BMS, SCADA, and IoT platforms.
IEC 62541 standard structure
IEC 62541 consists of 13 numbered parts. Parts 1–7 define the core architecture; parts 8–14 cover mappings, security, and profiles. For building automation integrators, the most relevant parts are 1 (Concepts), 3 (Address Space Model), 4 (Services), 6 (Mappings — encoding and transport), 7 (Profiles), and the companion specification IEC 62541-100 (OPC UA for Buildings).
| Part | Title | Relevance |
|---|---|---|
| IEC 62541-1 | Concepts and Overview | Foundational architecture, service model, information model concept |
| IEC 62541-3 | Address Space Model | NodeClass types, References, attributes — the data model backbone |
| IEC 62541-4 | Services | Read, Write, Browse, Subscribe, Call service sets — all server APIs |
| IEC 62541-6 | Mappings | Binary encoding (UA Binary), XML encoding, opc.tcp transport, HTTPS, WebSockets |
| IEC 62541-7 | Profiles | Server, Client, Transport profiles for conformance testing |
| IEC 62541-12 | Discovery and Global Services | Local Discovery Server (LDS), Global Discovery Server (GDS) for cert management |
| IEC 62541-100 | OPC UA for Buildings | IFC-mapped information model for spaces, zones, HVAC, energy metering |
Information model: NodeClass types and References
Every piece of data in an OPC UA server is represented as a Node in the address space. Nodes have a NodeClass attribute that defines their role. Nodes are linked to each other by typed References — for example, HasComponent, HasProperty, Organizes, HasSubtype. This creates a directed graph that clients can browse to discover server content without prior knowledge of the data structure.
| NodeClass | Purpose | Example in BMS |
|---|---|---|
| Object | Container grouping related nodes; no value itself | AHU_01 object grouping all AHU variables |
| Variable | Holds a typed value; readable and optionally writable | SupplyAirTemp (Float, °C), FanSpeed (UInt16, RPM) |
| Method | Callable function; input and output arguments | ResetAlarm(), SetOperatingMode(mode: Int32) |
| View | Named subset of the address space for filtered browsing | EnergyMeteringView showing only kWh nodes |
| DataType | Defines scalar or structured type used by Variables | EnumHvacMode {Auto=0, Heating=1, Cooling=2} |
| ObjectType | Template for Object nodes (like a class definition) | HVACUnitType with standard components |
| VariableType | Template for Variable nodes with default attributes | AnalogItemType with EngineeringUnits property |
| ReferenceType | Defines semantics of a reference between nodes | HasComponent, HasProperty, Organizes |
Address space: namespaces and browsable tree
The address space is structured as a browsable tree. Every node is identified by a NodeId consisting of a namespace index and an identifier (numeric, string, or GUID). Namespace 0 (ns=0) is always the OPC UA standard namespace containing built-in types and standard nodes. Namespace 1+ are assigned by the server for vendor or application-specific content. Clients discover the namespace table via the GetNamespaceArray service call.
OPC UA address space — BMS example
Objects (ns=0;i=85) ← OPC UA standard root
├── Server (ns=0;i=2253) ← always present, server diagnostics
└── Building_01 (ns=1;s=Building_01) ← application namespace
├── Floor_02 (ns=1;s=Building_01/Floor_02)
│ ├── AHU_01 (ns=1;s=AHU_01) [Object]
│ │ ├── SupplyAirTemperature (ns=1;s=AHU_01.SAT) [Variable, Float]
│ │ │ ├── EngineeringUnits [Property: "°C"]
│ │ │ ├── EURange [Property: Low=0, High=60]
│ │ │ └── StatusCode [Property: Good/Bad/Uncertain]
│ │ ├── FanSpeed (ns=1;s=AHU_01.FanRPM) [Variable, UInt16]
│ │ ├── DamperPosition (ns=1;s=AHU_01.Damper) [Variable, Byte, 0–100%]
│ │ └── ResetAlarm (ns=1;s=AHU_01.ResetAlarm) [Method]
│ └── VAV_Zone_2A (ns=1;s=VAV_2A) [Object]
│ ├── RoomTemperature (ns=1;s=VAV_2A.RoomTemp) [Variable, Float]
│ └── Setpoint (ns=1;s=VAV_2A.SP) [Variable, Float, writable]
└── Meters (ns=1;s=Meters)
└── Main_kWh (ns=1;s=Meter.kWh) [Variable, Double]Clients navigate from the Objects root using the Browse service, following HierarchicalReferences (HasComponent, Organizes, HasProperty) to discover nodes. The TranslateBrowsePathsToNodeIds service allows clients to jump directly to a known path without traversing the entire tree — useful for performance-sensitive polling of known variables.
Transport options
OPC UA defines three transport bindings. The choice affects latency, firewall traversal, and protocol overhead. OPC UA Binary over TCP is the default for plant-floor BMS integration; HTTPS and WebSockets are used for cloud or browser-accessible interfaces.
| Transport | URI prefix | Default port | Overhead | Notes |
|---|---|---|---|---|
| OPC UA TCP | opc.tcp:// | 4840 | Lowest — binary framing | Best for plant-floor; persistent TCP connection; not firewall-friendly |
| OPC UA HTTPS | opc.https:// | 443 | Medium — HTTP/1.1 + TLS | Firewall-friendly; can traverse proxies; higher latency per request |
| OPC UA WebSockets | opc.wss:// | 443 | Low — WebSocket framing | Browser-compatible; persistent; used for web SCADA and cloud gateways |
Plant-floor recommendation: Always use opc.tcp:// within a building LAN or OT VLAN. The persistent TCP connection eliminates per-request TLS handshake overhead and gives the lowest subscription notification latency. Reserve HTTPS for cross-site or cloud integrations where firewall port 4840 cannot be opened.
Security modes and security policies
OPC UA security is negotiated at the Secure Channel level before any application messages are exchanged. The server advertises its supported EndpointDescriptions (combinations of MessageSecurityMode and SecurityPolicyUri). The client selects one when opening a connection. Never use None in a production environment — it transmits all data in plaintext with no integrity protection.
| MessageSecurityMode | Protection | Use case |
|---|---|---|
| None | No signing, no encryption | Lab / development only — never production |
| Sign | HMAC integrity on messages; no payload encryption | Performance-critical SCADA on trusted closed LAN |
| SignAndEncrypt | HMAC + AES encryption of all message payloads | Standard for all BMS and cloud integration |
The SecurityPolicyUri selects the cryptographic algorithms. Current recommended policies (as of IEC 62541-7:2022) are:
| SecurityPolicyUri | Asymmetric (key exchange) | Symmetric (data) | Status |
|---|---|---|---|
| Basic128Rsa15 | RSA-PKCS1-v1.5 / 1024-bit | AES-128-CBC | Deprecated — do not use |
| Basic256 | RSA-OAEP / 1024-bit | AES-256-CBC | Deprecated — do not use |
| Basic256Sha256 | RSA-OAEP / 2048-bit + SHA-256 | AES-256-CBC + SHA-256 HMAC | Current — widely supported |
| Aes128Sha256RsaOaep | RSA-OAEP / 2048-bit + SHA-256 | AES-128-CBC + SHA-256 HMAC | Current — lower CPU overhead |
| Aes256Sha256RsaPss | RSA-PSS / 2048-bit + SHA-256 | AES-256-CBC + SHA-256 HMAC | Recommended — strongest, use where supported |
Deprecation notice: Basic128Rsa15 and Basic256 use 1024-bit RSA keys and SHA-1, both considered cryptographically weak. IEC 62541-7:2022 marks them deprecated. Kepware KEPServerEX 6.x and Siemens DESIGO CC support Basic256Sha256 and Aes256Sha256RsaPss. Disable deprecated policies in production server configuration to prevent downgrade attacks.
Authentication methods
Authentication is performed at the Session layer (above the Secure Channel). OPC UA defines three ActivateSession identity token types. Certificate-based authentication is the most secure and is required for industrial security standards such as IEC 62443-3-3 Security Level 2.
| Token type | Description | Recommendation |
|---|---|---|
| AnonymousIdentityToken | No credentials — any client can create a session | Disable in production; acceptable only for read-only public dashboards |
| UserNameIdentityToken | Username and password; password encrypted using server public key | Acceptable for operator access; use with Sign+Encrypt transport |
| X509IdentityToken | Client presents a valid X.509 certificate; server validates against trust list | Required for machine-to-machine integration and IEC 62443 SL-2 compliance |
Sessions and subscriptions
A Session is established on top of the Secure Channel after authentication. Sessions have a RequestedSessionTimeout (typically 60–3600 seconds); if the client does not send a keep-alive before timeout, the server deletes the session and all its subscriptions. Clients should handle reconnection with session re-establishment or transfer.
Subscriptions are the primary mechanism for efficient data monitoring. Instead of polling variables repeatedly (which generates unnecessary traffic), clients create a subscription with a PublishingInterval and add MonitoredItems to it. The server samples each MonitoredItem at the SamplingInterval and queues value changes; when the PublishingInterval fires, all queued notifications are sent in a single PublishResponse message.
Subscription parameters — key fields
CreateSubscription request:
RequestedPublishingInterval: 1000 // ms — how often server sends Publish
RequestedMaxKeepAliveCount: 10 // Publish cycles before keep-alive sent
RequestedLifetimeCount: 30 // LifetimeCount × PublishingInterval = session timeout
MaxNotificationsPerPublish: 1000 // cap notifications per PublishResponse
PublishingEnabled: true
MonitoredItem parameters:
SamplingInterval: 500 // ms — server samples item at this rate
// must be ≥ server MinSupportedSampleRate
QueueSize: 10 // buffer for overrun; 1 = last value only
DiscardOldest: true // discard oldest on queue overflow
DeadbandType: None / Absolute / Percent
DeadbandValue: 0.5 // Absolute: only report if change > 0.5 units
// Percent: only report if change > 0.5% of EURangeDeadband filtering for HVAC sensors: Setting an absolute deadband of 0.2–0.5°C on temperature variables prevents the server from flooding the subscription with trivial noise-driven updates. For energy meters, a percent deadband of 1% on kWh counters is typical. Deadband filtering happens server-side, reducing both CPU load and network traffic.
OPC UA companion specifications
Companion specifications extend the base OPC UA standard with domain-specific information models. They define standard ObjectTypes, VariableTypes, and namespace URIs so that devices from different vendors expose data in a consistent, interoperable structure. Building automation engineers should be aware of the following companion specifications:
| Specification | Scope | Key ObjectTypes |
|---|---|---|
| IEC 62541-100 (OPC UA for Buildings) | Building automation: spaces, zones, equipment, energy metering | BuildingType, SpaceType, HVACSystemType, EnergyMeterType |
| OPC UA for FDI (Field Device Integration) | Field devices: sensors, actuators, process instruments | DeviceType, FunctionBlockType, ParameterType |
| OPC UA for PLCopen | PLC program elements: function blocks, alarms, tasks | FunctionBlockType, AlarmType, TaskType |
| OPC UA for I4.0 Asset Administration Shell | Digital twin: asset metadata, submodels, properties | AssetAdministrationShellType, SubmodelType |
| OPC UA for Devices (DI) | Hardware device information baseline | DeviceType, ComponentType, SoftwareType |
Need OPC UA server configuration for your BMS project?
We configure and secure OPC UA servers on Siemens DESIGO CC, Beckhoff TwinCAT, and Kepware KEPServerEX — including certificate management, security policy hardening, and subscription tuning for high-density sensor deployments.
Request a quote →