Atrium IIoT Gateway › OPC UA Server
Atrium App

OPC UA Server App User Guide

OPC UA Server turns the Atrium gateway into an OPC UA server, so the systems you already run — SCADA, historians, MES and test tools — can browse, subscribe to and historize every NCD wireless sensor without custom mapping. Values carry units, sensor health and data quality, and every connection is secured with certificates and user accounts.

Audience
Gateway operators and controls engineers
Requires
Atrium 2.0.0 or newer
License
Not required

01Overview

OPC UA Server makes the gateway one more OPC UA server on the plant network, so an existing OPC UA system reads NCD sensor data the same way it reads a PLC.

What OPC UA is

OPC UA (IEC 62541) is the standard industrial software uses to exchange data between machines and the systems that supervise them. A device that runs an OPC UA server publishes its data as a browsable tree of named, typed values. An OPC UA client — Ignition, Kepware, AVEVA, FactoryTalk, a historian, Node-RED or the free UaExpert test tool — connects to the server, browses that tree, and reads or subscribes to the values it needs. Connections are secured with application certificates and user accounts.

The problem it solves

NCD sensors report to the gateway over their own wireless network. Getting those readings into a SCADA system or historian otherwise means building a bridge: an MQTT broker and topic mapping, a database export, or a script. With OPC UA Server installed, add the gateway as a connection in your client, browse to Objects › Sensors, and every published sensor is there with its measurements, units, health and history.

The app is read-only. Clients cannot change sensor configuration or any gateway setting through OPC UA.

One object per sensor
Measurements, health and properties under Objects › Sensors, named by the sensor’s Atrium name, with NodeIds that survive a rename.
Live values and history
Values are pushed to subscriptions as each sensor report arrives. History is read from the readings the gateway already stores.
Secured by default
Encrypted endpoints only, client applications you approve, and OPC UA user accounts. Anonymous access is off.
Honest data quality
When a sensor stops reporting, its values turn Uncertain and its Health › Online value turns false.
NCD OPC-UA Server App Overview
Atrium App Center

02Requirements

What has to be in place before a client can connect.

ItemRequirement
Atrium platform2.0.0 or newer.
GatewayAtrium EG5120 or EG5100. The EG5100 allows fewer monitored items and subscriptions (see Reference).
SensorsAny NCD wireless sensor, whitelisted on the gateway. Sensors that are not whitelisted are not published.
NetworkThe client reaches the gateway on TCP port 4840 (or the port you set) over the local network.
OPC UA clientAny client that speaks the OPC UA binary protocol (opc.tcp://) with the Basic256Sha256, Aes128_Sha256_RsaOaep or Aes256_Sha256_RsaPss security policy.
LicenseThe app is free and needs no license.

3. Installing

Install the app from App Center or a package file (.tar.gz) on the gateway’s Apps page.

  1. 1
    Open the Apps page
    Log in to the Atrium dashboard and click Apps in the top navigation.
  2. 2
    Upload the package
    Use the Install App Button on the Apps page to select the OPC UA Server App package file (for example opc-ua-server-app-0.1.0.tar.gz). OPC UA Server App is listed in the App Center, you can install it from there instead. click Browse App Center and Select OPC UA Server App.
  3. 3
    Wait for the gateway to reload
    Installing an app restarts the gateway’s services. This takes a few seconds; the page reconnects on its own. Sensor data and settings are kept.
  4. 4
    Open the app
    OPC UA Server App appears as a card on the Apps page. Click it to open the app on its Connection screen.
NCD OPC-UA Server App Installation
Atrium App Center

Installing a newer package the same way upgrades the app. Users, trusted client certificates, the server certificate and settings are kept, so clients reconnect without being trusted again. Uninstall on the card closes the OPC UA port; the app’s data stays on the gateway and is picked up again if you reinstall.

04First-Time Setup

The shortest path from a fresh install to sensor values in your OPC UA client. The Getting connected checklist on the Connection screen ticks off each step as it is done.

1. Add an OPC UA user

  1. 1
    Open Security
    Click Security in the app’s left navigation.
  2. 2
    Add the user
    Under Users › Add a user, enter a User name and a Password of at least 8 characters, then click Add user.

2. Connect your client

  1. 1
    Copy the endpoint URL
    On Connection, under Endpoint URLs, click Copy next to the address your client can reach, for example opc.tcp://xxx.xxx.x.x:4840.
  2. 2
    Add the server in the client
    Create an OPC UA connection with that URL. Choose security policy Basic256Sha256 with mode Sign & Encrypt, and log in with the user name and password from step 1.
  3. 3
    Connect once
    The first connection is refused with a certificate error such as BadCertificateUntrusted. This is expected: the gateway has not approved the client yet.

3. Trust the client

  1. 1
    Trust it in the app
    On Security › Client certificates, the client is listed under Waiting for trust. Check that its name and the time of the attempt match the client you just set up, then click Trust.
  2. 2
    Trust the gateway in the client, if asked
    Many clients also ask you to accept the server’s certificate the first time. Accept the one whose subject starts with Atrium OPC UA Server.
  3. 3
    Connect again and browse
    Reconnect and browse to Objects › Sensors. Each sensor has Measurements and Health folders. Bind your tags to the values you need.

05Connection

The app’s home screen: the addresses clients use, what is still missing before a client can connect, who is connected, and why recent connections were refused. It refreshes every 5 seconds.

The left navigation lists Connection, Security, Sensors, Settings and Diagnostics. The number beside Security counts client certificates waiting for trust; the number beside Sensors counts published sensors. The foot of the navigation shows Listening on 4840 (or Not listening) and the app version.

StateMeans
ListeningThe server is accepting connections.
StartingThe server is starting, for example right after install or a settings change.
ErrorThe server could not start. The reason is shown beside the state, for example Port 4840 is already in use on the gateway.
OffThe server is switched off under Settings.

Endpoint

  • Endpoint URLs — the addresses to enter in a client, each with a Copy button. The first is the gateway’s network name, ncd-XXXX.local, where XXXX is the last four characters of the MAC on the gateway’s label. The rest are the gateway’s IP addresses. Use the one the client’s computer can reach; if it cannot resolve the .local name, use an IP address.
  • Application URI — the server’s unique OPC UA identity, for example urn:ncd.io:atrium:0013a2004242e0fd:opcua. Some clients ask for it when you set up trust. It is fixed when the app first starts.

Getting connected

Four checks, in the order they must be true. The first one without a tick is the one to fix.

StepTicked whenIf not
Server listeningThe server accepts connections on its port.Turn the server on under Settings, or read the error shown.
A way to log inAt least one enabled OPC UA user exists, or anonymous access is on.Add a user on the Security screen.
Client certificate trustedAt least one client certificate is trusted.Connect once from the client, then trust it on the Security screen. A link shows how many are waiting.
Client connectedAt least one session is open.Connect from the client.

Clients and refusals

Connected clients has one row per open session: Client (the application’s name and URI), User (or anonymous), Remote address, Security, Connected, Monitored items and Subscriptions. A client marked Not activated yet has opened a session but not logged in.

Recent refusals appears when connections were refused, with the Time, Remote address and a Message saying why. A certificate refusal means the client is waiting on the Security screen; BadUserAccessDenied means a wrong user name or password. See Troubleshooting for the rest.

Recent refusals window
OPC UA Server > Connection > Recent refusals

06Security

Who can connect and how. OPC UA checks two identities on every connection: the client application proves who it is with its certificate, which you trust once per application, and the user logs in with a user name and password. Both must pass.

Endpoints

A grid of security policies (rows) and modes (None, Sign, Sign and encrypt). Each ticked box is an endpoint clients can connect to. Save security applies the grid and the anonymous switch; new clients see the change at once, and clients already connected keep their connection. At least one endpoint must stay ticked.

PolicyModesDefaultNotes
NoneNoneoffNo signing or encryption. Only for commissioning on an isolated network; the screen warns in red while it is on.
Basic256Sha256Sign, Sign and encryptSign and encrypt onWorks with every common client.
Aes128_Sha256_RsaOaepSign, Sign and encryptSign and encrypt onWidely supported.
Aes256_Sha256_RsaPssSign, Sign and encryptSign and encrypt onThe newest policy; older clients may not offer it.
Allow anonymous access—offWhen on, any client that can reach the gateway reads every sensor without a password.
Recent refusals window
OPC UA Server > Security > Endpoints

Users

Field or buttonNotes
User name1 to 64 printable characters.
Password8 to 128 characters. Stored only as a salted hash; nobody can read it back.
StatusEnabled or Disabled. A disabled user cannot log in.
Last login / CreatedWhen a client last logged in as the user, and when it was added.
Reset passwordOpens New password (8+ characters); Set password saves it.
Disable / EnableBlocks or allows logins without deleting the user.
DeleteRemoves the user after a confirmation click.
Users window
OPC UA Server > Security > Users

Checking a password takes about a second of processor time on an EG5100, so a new client login takes one to two seconds there.

Client certificates

Every OPC UA client application presents its own certificate. The gateway refuses any application it has not been told to trust and lists it here.

  • Waiting for trust — applications that tried to connect and were refused, with name, application URI, short thumbprint, Valid until (marked expired once passed) and Last attempt. Trust approves one; Delete discards the entry, and the application is listed again if it retries. The 50 most recent are kept.
  • Trusted — approved applications. Remove (with a confirmation click) moves one back to waiting; its next connection is refused.
  • Add a trusted certificate — paste a client’s certificate as PEM, or the base64 of its .der file, and click Trust certificate to approve it before it first connects.
Client Certificates window
OPC UA Server > Security > Client certificates

Server certificate

The gateway’s own OPC UA certificate (RSA 2048, valid 10 years), created when the app first starts.

  • Subject, Thumbprint, Valid dates and Subject alt names — the host names and IP addresses the certificate is valid for. A client that checks host names expects the address in its endpoint URL to be in this list.
  • Certificate (PEM) and Copy PEM — most clients trust the server on first connect. To trust it in advance, save the PEM as a .pem or .crt file in the client’s trusted folder.
  • Regenerate certificate — creates a new certificate after a confirmation click. Use it after the gateway’s host name or address changes, or when a notice says the certificate does not list the advertised host.
Recent refusals window
OPC UA Server > Security > Server certificate

07Sensors

Which sensors are published over OPC UA, where each one is in the address space, and the exact NodeIds to bind tags to.

Sensor list

The header shows how many sensors are published and online, for example 2 of 3 published · 1 online. Filter by name, MAC or type narrows the list. When some sensors are not published, Publish all publishes them in one click. Only sensors whitelisted on the gateway are listed.

ColumnShows
PublishOn puts the sensor in the address space; off removes it. auto under the switch means it was published by Publish newly whitelisted sensors automatically.
SensorAtrium name, radio MAC, and location and asset if set.
TypeThe sensor model, such as 114 – Standalone Smart Vibration Sensor v4.
StatusOnline reporting on schedule; Offline has missed the configured number of reports; No data has never reported.
Last seenWhen the sensor last reported.
Browse pathWhere clients find it, such as Objects/Sensors/Press #12. Greyed when not published.
NodeIdThe sensor’s NodeId with a Copy button. Hover for the namespace-URI form.
Recent refusals window
OPC UA Server > Sensors

A sensor’s nodes

Click a sensor’s row to expand it. It shows the sensor’s NodeId, its OPC UA type name and the namespace-URI form of the NodeId, then two tables, Measurements and Health, with Browse name, NodeId (with Copy), Unit, Last value and Age.

  • Measurements appear after the sensor reports once while published. Until then the table reads No measurements yet.
  • When a sensor type reports a new measurement, after a firmware or mode change, it is added. Measurements are never removed from a sensor type, so a client tag never loses its node.
  • An unpublished sensor still shows a preview of its nodes, noting that they appear once publishing is on.
Recent refusals window
OPC UA Server > Sensors > sensor

08Settings

Server on/off, port and host name, how new sensors are handled, how sensors are named, and when a sensor counts as offline. Nothing applies until you click Save settings; changes then apply within a few seconds.

SettingDefaultNotes
OPC UA serverOnOff closes the port without uninstalling the app and disconnects every client.
Port48401024 to 65535. 4840 is the OPC UA standard. Changing it disconnects every client.
Advertised host nameempty (ncd-XXXX.local)The host shown first in the endpoint URLs. Set an IP address or DNS name if clients cannot resolve the .local name, then regenerate the server certificate so it lists the new name.
Publish newly whitelisted sensors automaticallyonOff: new sensors appear on the Sensors screen unpublished until you turn them on.
Sensor browse namesAtrium name (MAC if unnamed)Or Radio MAC. Only the browse path changes; NodeIds always use the MAC.
Offline after (missed reports)32 to 20. After this many report intervals without data, the sensor’s Health › Online turns false and its values turn Uncertain.
Recent refusals window
OPC UA Server > Settings

If two published sensors share an Atrium name, each browse name gets the last four characters of its MAC, for example Motor (5397), so every path stays unique. Browse names are cut to 64 characters.

09Diagnostics

Live counters from the running server, every open connection, and the state of each client subscription. Counters reset when the gateway’s services restart.

PanelShows
ServerRequests, Faults (requests answered with an error), Channels opened, Sessions created, Rejected (connections refused for an untrusted certificate, a bad login or a disabled endpoint) and Monitored items.
Address spaceSensors, Online, Sensor types, Nodes, Frames (sensor reports received) and Value updates.
Open secure channelsOne row per connection: Channel, Remote, Security, Opened, Requests.
Sessions and subscriptionsEach session (client, user, address, security, created, last active, timeout) and its subscriptions: Publishing interval, Items, Notifications, Keep-alives, Publishes and State.

A subscription’s State is OK, or Late when the client is not asking for updates fast enough — usually a client that is overloaded or on a slow link.

Recent refusals window
OPC UA Server > Diagnostics

10Integration

OPC UA Server shares sensor data with OPC UA clients. It reads sensor data, sensor names and gateway details from the gateway and changes none of them.

Events and actions

The app publishes no events and provides no actions, so it adds nothing to the gateway’s Automations page.

AI assistants and API tokens

An AI assistant connected to the gateway’s MCP server can read two views from the app, to answer questions such as why can’t my SCADA connect? or what is the NodeId for the press motor’s velocity? Neither can change anything.

ReadReturns
OPC UA server connection settings (server_config)The endpoint URL, enabled security policies and modes, whether anonymous access is on, OPC UA user names (never passwords), trusted client applications, the last 10 refused clients, and the sessions connected at the server’s last snapshot.
Where each sensor lives in the OPC UA address space (tag_map)For each published sensor: MAC, name, browse path, NodeId, whether it is online, and its measurement names. Up to 50 sensors; pass a MAC for one.

The same reads are available to scripts with a gateway API token that has the apps:data scope:

HTTPReads
GET  /api/apps/opcua/mcp/server
GET  /api/apps/opcua/mcp/tag-map?device_id=

Clients

Ignition, Kepware, UaExpert and other clients follow First-Time Setup: add an OPC UA connection with the endpoint URL, a Sign and encrypt policy and an OPC UA user, connect once, trust the client on the Security screen, and connect again.

11Troubleshooting

Start with Getting connected and Recent refusals on the Connection screen; most problems show up there with a reason.

Connecting

SymptomCauseFix
BadCertificateUntrusted, or the connection closes right after it opensThe client application has not been trusted.Security › Client certificates › Waiting for trust › Trust, then reconnect.
BadUserAccessDeniedWrong user name or password, or the user is disabled.Check the user on the Security screen; use Reset password if needed and update the client.
No matching endpoint, or BadSecurityPolicyRejectedThe policy and mode chosen in the client are not ticked under Endpoints.Choose a ticked combination in the client (Basic256Sha256 with Sign & Encrypt works everywhere), or tick it and click Save security.
Anonymous login refused (BadIdentityTokenRejected)Anonymous access is off, the default.Log in with an OPC UA user.
The client warns that the host name does not match the certificateThe address in the endpoint URL is not in the server certificate’s Subject alt names.Use an address listed there, or regenerate the certificate. Clients must then trust the new one.
The client refuses the server certificate after a regenerateThe client still trusts the old certificate.Trust the new certificate in the client.
ncd-XXXX.local does not resolveThe client’s computer cannot resolve .local names, or the gateway does not answer on that name.Use an IP address from Endpoint URLs, or set Advertised host name under Settings and regenerate the certificate.
The connection times out and nothing appears in Recent refusalsThe client cannot reach the port: wrong address, a firewall between them, or the server is off.Check that Connection reads Listening and that TCP 4840 (or your port) is open from the client to the gateway.
Port 4840 is already in use on the gatewayAnother program on the gateway uses the port.Choose another port under Settings and update the clients.
BadTooManySessionsThe limit of 20 sessions is reached. Some clients, such as Node-RED, open one session per client node.Close unused connections, or reuse one connection per client application.

Values

SymptomCauseFix
Values are UncertainLastUsableValue and Health › Online is falseThe sensor has missed the configured number of reports.Check the sensor’s battery and range in Atrium. Raise Offline after if the sensor reports irregularly.
A sensor is missing under Objects › SensorsIt is not whitelisted, or not published.Whitelist it on the gateway, then turn on its Publish switch on the Sensors screen.
A value reads BadWaitingForInitialData, or a sensor has no measurementsThe sensor has not reported since it was published and has no stored readings.Wait for its next report, or wake the sensor.
A read on a sensor returns BadAttributeIdInvalidThe sensor node is an object; it has no value.Read the variables in its Measurements and Health folders, or browse them.
Writes fail with BadNotWritableThe address space is read-only.Expected. Change sensor settings in the Atrium dashboard.
A subscription shows Late on DiagnosticsThe client is not requesting updates fast enough.Reduce the client’s items or raise its publishing interval.

12Reference

The address space clients see, data types and units, status codes, history, and limits.

Address space

Address spaceWhat a client sees when it browses
Objects
  Gateway                     ns=1;s=Gateway
    Name, Model, PlatformVersion, AppVersion, GatewayId
    SensorCount, OnlineSensorCount
  Sensors                     ns=1;s=Sensors
    <sensor name>             ns=1;s=<MAC>
      MAC, SensorType, Model, Location, Asset
      Health                  ns=1;s=<MAC>/Health
        BatteryPercent, BatteryVoltage, RSSI, Counter,
        LastSeen, Online, ReportInterval
      Measurements            ns=1;s=<MAC>/Measurements
        <metric>              ns=1;s=<MAC>/Measurements/<metric>
  • Namespace 1 is the gateway’s own, named by its Application URI. Namespace 2 (http://ncd.io/UA/Atrium/) holds the type definitions.
  • NodeIds use the sensor’s radio MAC in lower case with colons, exactly as the gateway shows it, and do not change when a sensor is renamed.
  • Measurement names are the names Atrium uses for the sensor’s readings, such as x_velocity_mm_sec, rpm or temperature.
  • Types: each sensor is an instance of a type named after its model, such as NCD_114_Standalone_Smart_Vibration_Sensor_v4Type, a subtype of AtriumSensorType. Every Health folder is a SensorHealthType, so an alarm on battery or signal can be defined once against that type.
  • Raw waveform reports from vibration sensors are not published.

Data types and units

NodeData typeEngineering units
MeasurementsDouble (AnalogItem)By name: _velocity_mm_sec mm/s, _displacement_mm mm, _rms_acc_g and _max_acc_g g, _hz Hz, humidity %. Others, including temperature, carry no unit.
Health › BatteryPercentDouble%
Health › BatteryVoltageDoubleV
Health › RSSI, CounterDoublenone
Health › LastSeenUtcTime—
Health › OnlineBoolean—
Health › ReportIntervalDoubles

Units follow OPC UA EUInformation with UNECE Recommendation 20 codes. Temperature has no unit because the gateway does not record whether a sensor reports in °C or °F.

Status codes on values

StatusWhen
GoodThe sensor is online. The source timestamp is the time of the sensor’s report.
UncertainLastUsableValueThe sensor has missed Offline after report intervals (3 by default). The last value is still shown.
BadWaitingForInitialDataNo value has been received or stored for the node yet.

History

Measurements and the BatteryPercent, BatteryVoltage, RSSI and Counter health values support HistoryRead (raw values). History comes from the readings already stored on the gateway, so a historian can backfill an outage from it. Up to 1,000 values come back per request; the client continues from there.

Limits

ItemEG5120EG5100
Open secure channels4025
Sessions2020
Subscriptions per session105
Monitored items, all sessions10,0002,000
Nodes per Read, Browse or CreateMonitoredItems call1,0001,000
Nodes per HistoryRead call100100
Values per HistoryRead response1,0001,000
Session timeout10 seconds to 1 hour, as the client asks (60 seconds if it does not)same
Message size4 MB4 MB

Standards and features

  • OPC UA binary protocol over TCP (opc.tcp), IEC 62541.
  • Security policies Basic256Sha256, Aes128_Sha256_RsaOaep and Aes256_Sha256_RsaPss; None optional.
  • User name and password logins, and optional anonymous. X.509 user certificates are not supported.
  • Discovery, Browse, Read, TranslateBrowsePathsToNodeIds, subscriptions with data-change filters and deadband, and HistoryRead (raw).
  • Not supported: writes, alarms and conditions, events, aggregated history (ReadProcessed), and registration with a discovery server.