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.
02Requirements
What has to be in place before a client can connect.
| Item | Requirement |
|---|---|
| Atrium platform | 2.0.0 or newer. |
| Gateway | Atrium EG5120 or EG5100. The EG5100 allows fewer monitored items and subscriptions (see Reference). |
| Sensors | Any NCD wireless sensor, whitelisted on the gateway. Sensors that are not whitelisted are not published. |
| Network | The client reaches the gateway on TCP port 4840 (or the port you set) over the local network. |
| OPC UA client | Any client that speaks the OPC UA binary protocol (opc.tcp://) with the Basic256Sha256, Aes128_Sha256_RsaOaep or Aes256_Sha256_RsaPss security policy. |
| License | The 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
Open the Apps pageLog in to the Atrium dashboard and click Apps in the top navigation.
-
2
Upload the packageUse 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
Wait for the gateway to reloadInstalling 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
Open the appOPC UA Server App appears as a card on the Apps page. Click it to open the app on its Connection screen.
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
Open SecurityClick Security in the app’s left navigation.
-
2
Add the userUnder 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
Copy the endpoint URLOn Connection, under Endpoint URLs, click Copy next to the address your client can reach, for example opc.tcp://xxx.xxx.x.x:4840.
-
2
Add the server in the clientCreate 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
Connect onceThe 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
Trust it in the appOn 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
Trust the gateway in the client, if askedMany 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
Connect again and browseReconnect 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.
| State | Means |
|---|---|
| Listening | The server is accepting connections. |
| Starting | The server is starting, for example right after install or a settings change. |
| Error | The server could not start. The reason is shown beside the state, for example Port 4840 is already in use on the gateway. |
| Off | The 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.
| Step | Ticked when | If not |
|---|---|---|
| Server listening | The server accepts connections on its port. | Turn the server on under Settings, or read the error shown. |
| A way to log in | At least one enabled OPC UA user exists, or anonymous access is on. | Add a user on the Security screen. |
| Client certificate trusted | At 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 connected | At 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.
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.
| Policy | Modes | Default | Notes |
|---|---|---|---|
| None | None | off | No signing or encryption. Only for commissioning on an isolated network; the screen warns in red while it is on. |
| Basic256Sha256 | Sign, Sign and encrypt | Sign and encrypt on | Works with every common client. |
| Aes128_Sha256_RsaOaep | Sign, Sign and encrypt | Sign and encrypt on | Widely supported. |
| Aes256_Sha256_RsaPss | Sign, Sign and encrypt | Sign and encrypt on | The newest policy; older clients may not offer it. |
| Allow anonymous access | — | off | When on, any client that can reach the gateway reads every sensor without a password. |
Users
| Field or button | Notes |
|---|---|
| User name | 1 to 64 printable characters. |
| Password | 8 to 128 characters. Stored only as a salted hash; nobody can read it back. |
| Status | Enabled or Disabled. A disabled user cannot log in. |
| Last login / Created | When a client last logged in as the user, and when it was added. |
| Reset password | Opens New password (8+ characters); Set password saves it. |
| Disable / Enable | Blocks or allows logins without deleting the user. |
| Delete | Removes the user after a confirmation click. |
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.
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.
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.
| Column | Shows |
|---|---|
| Publish | On puts the sensor in the address space; off removes it. auto under the switch means it was published by Publish newly whitelisted sensors automatically. |
| Sensor | Atrium name, radio MAC, and location and asset if set. |
| Type | The sensor model, such as 114 – Standalone Smart Vibration Sensor v4. |
| Status | Online reporting on schedule; Offline has missed the configured number of reports; No data has never reported. |
| Last seen | When the sensor last reported. |
| Browse path | Where clients find it, such as Objects/Sensors/Press #12. Greyed when not published. |
| NodeId | The sensor’s NodeId with a Copy button. Hover for the namespace-URI form. |
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.
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.
| Setting | Default | Notes |
|---|---|---|
| OPC UA server | On | Off closes the port without uninstalling the app and disconnects every client. |
| Port | 4840 | 1024 to 65535. 4840 is the OPC UA standard. Changing it disconnects every client. |
| Advertised host name | empty (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 automatically | on | Off: new sensors appear on the Sensors screen unpublished until you turn them on. |
| Sensor browse names | Atrium name (MAC if unnamed) | Or Radio MAC. Only the browse path changes; NodeIds always use the MAC. |
| Offline after (missed reports) | 3 | 2 to 20. After this many report intervals without data, the sensor’s Health › Online turns false and its values turn Uncertain. |
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.
| Panel | Shows |
|---|---|
| Server | Requests, 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 space | Sensors, Online, Sensor types, Nodes, Frames (sensor reports received) and Value updates. |
| Open secure channels | One row per connection: Channel, Remote, Security, Opened, Requests. |
| Sessions and subscriptions | Each 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.
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.
| Read | Returns |
|---|---|
| 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:
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
| Symptom | Cause | Fix |
|---|---|---|
| BadCertificateUntrusted, or the connection closes right after it opens | The client application has not been trusted. | Security › Client certificates › Waiting for trust › Trust, then reconnect. |
| BadUserAccessDenied | Wrong 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 BadSecurityPolicyRejected | The 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 certificate | The 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 regenerate | The client still trusts the old certificate. | Trust the new certificate in the client. |
| ncd-XXXX.local does not resolve | The 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 refusals | The 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 gateway | Another program on the gateway uses the port. | Choose another port under Settings and update the clients. |
| BadTooManySessions | The 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
| Symptom | Cause | Fix |
|---|---|---|
| Values are UncertainLastUsableValue and Health › Online is false | The 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 › Sensors | It 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 measurements | The 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 BadAttributeIdInvalid | The sensor node is an object; it has no value. | Read the variables in its Measurements and Health folders, or browse them. |
| Writes fail with BadNotWritable | The address space is read-only. | Expected. Change sensor settings in the Atrium dashboard. |
| A subscription shows Late on Diagnostics | The 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
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
| Node | Data type | Engineering units |
|---|---|---|
| Measurements | Double (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 › BatteryPercent | Double | % |
| Health › BatteryVoltage | Double | V |
| Health › RSSI, Counter | Double | none |
| Health › LastSeen | UtcTime | — |
| Health › Online | Boolean | — |
| Health › ReportInterval | Double | s |
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
| Status | When |
|---|---|
| Good | The sensor is online. The source timestamp is the time of the sensor’s report. |
| UncertainLastUsableValue | The sensor has missed Offline after report intervals (3 by default). The last value is still shown. |
| BadWaitingForInitialData | No 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
| Item | EG5120 | EG5100 |
|---|---|---|
| Open secure channels | 40 | 25 |
| Sessions | 20 | 20 |
| Subscriptions per session | 10 | 5 |
| Monitored items, all sessions | 10,000 | 2,000 |
| Nodes per Read, Browse or CreateMonitoredItems call | 1,000 | 1,000 |
| Nodes per HistoryRead call | 100 | 100 |
| Values per HistoryRead response | 1,000 | 1,000 |
| Session timeout | 10 seconds to 1 hour, as the client asks (60 seconds if it does not) | same |
| Message size | 4 MB | 4 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.