node-opcua-client
v2.175.2
Published
pure nodejs OPCUA SDK - module client
Maintainers
Readme
node-opcua-client
Lightweight OPC UA client for Node.js — connect to any OPC UA server, browse, read, write, and subscribe to data changes.
Part of the node-opcua project — the most popular OPC UA stack for Node.js.
When to use this package
| Package | Use case |
|---|---|
| node-opcua-client | You only need client capabilities (smaller install, faster startup) |
| node-opcua | You need both client and server in the same project |
Quick Start
npm install node-opcua-clientRequires Node.js 20 or later.
Connect, read, and disconnect
import {
OPCUAClient,
AttributeIds,
DataValue,
} from "node-opcua-client";
(async () => {
// 1. Create a client and connect to an OPC UA server
const client = OPCUAClient.create({ endpointMustExist: false });
await client.connect("opc.tcp://opcuademo.sterfive.com:26543");
// 2. Create a session
const session = await client.createSession();
// 3. Read the server's current time (ns=0;i=2258)
const dataValue: DataValue = await session.read({
nodeId: "ns=0;i=2258",
attributeId: AttributeIds.Value,
});
console.log("Server time:", dataValue.value.value);
// 4. Clean up
await session.close();
await client.disconnect();
})();📖 Documentation
- 📘 NodeOPCUA by Example — The best starting point: practical, ready-to-use examples with full explanations.
- 📚 API Reference — Complete API documentation.
- 🛠️ Client Tutorial — Step-by-step guide to building an OPC UA client in TypeScript.
🏢 Professional Support
| Feature | Community (GitHub) | Professional (Sterfive) | |---|:---:|:---:| | Bug reports via GitHub Issues | ✅ | ✅ | | CVE security advisories | After disclosure | Early access — patch before public disclosure | | Priority response time | — | ✅ | | Private support channel | — | ✅ | | Architecture & code review | — | ✅ | | Dedicated consulting hours | — | ✅ | | Certifiable version | — | ✅ |
📧 Contact: [email protected]
:heart: Sponsors
If you find this package valuable, please consider supporting the project:
Your sponsorship ensures long-term maintenance, new features, and continued OPC Foundation representation.
License
MIT — Copyright © 2014-2026 Etienne Rossignon / Sterfive SAS
