NodeOPCUA API Documentation
    Preparing search index...

    Module node-opcua-client

    node-opcua-client

    NPM version NPM downloads CI

    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.

    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
    npm install node-opcua-client
    

    Requires Node.js 20 or later.

    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();
    })();
    • 📘 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.
    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

    Professional Support

    📧 Contact: contact@sterfive.com

    If you find this package valuable, please consider supporting the project:

    Your sponsorship ensures long-term maintenance, new features, and continued OPC Foundation representation.

    MIT — Copyright © 2014-2026 Etienne Rossignon / Sterfive SAS

    Modules

    alarms_and_conditions/client_alarm_tools
    index
    node-opcua-client