node-opcua 2.173.1 → 2.174.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +93 -35
- package/package.json +42 -42
package/README.md
CHANGED
|
@@ -1,63 +1,121 @@
|
|
|
1
|
-
node-opcua
|
|
2
|
-
==========
|
|
1
|
+
# node-opcua
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/node-opcua)
|
|
4
|
+
[](https://www.npmtrends.com/node-opcua)
|
|
5
|
+
[](https://github.com/node-opcua/node-opcua/actions/workflows/workflow.yml)
|
|
6
|
+
[](https://coveralls.io/r/node-opcua/node-opcua)
|
|
5
7
|
|
|
6
|
-
|
|
8
|
+
**The most complete OPC UA stack for Node.js** — build industrial-grade OPC UA servers and clients in TypeScript.
|
|
7
9
|
|
|
10
|
+
## Why node-opcua?
|
|
8
11
|
|
|
12
|
+
- 🏭 **Full OPC UA stack** — server, client, discovery, aggregation, and GDS
|
|
13
|
+
- 🔒 **Production-grade security** — X.509 certificates, encrypted channels, user authentication
|
|
14
|
+
- 🌍 **Cross-platform** — Windows, Linux, macOS, and browser (via WebSocket)
|
|
15
|
+
- 📦 **120+ packages** — modular architecture, use only what you need
|
|
16
|
+
- 🛡️ **Battle-tested** — 12+ years of development, 1,600+ GitHub stars, 3,000+ tests
|
|
17
|
+
- 📖 **Well documented** — *NodeOPCUA by Example* book + API reference
|
|
9
18
|
|
|
10
|
-
|
|
19
|
+
## Quick Start
|
|
11
20
|
|
|
12
|
-
|
|
21
|
+
**Requirements:** Node.js 20 or later
|
|
13
22
|
|
|
14
|
-
|
|
23
|
+
```bash
|
|
24
|
+
npm install node-opcua
|
|
25
|
+
```
|
|
15
26
|
|
|
27
|
+
### Create an OPC UA Server
|
|
16
28
|
|
|
17
|
-
|
|
29
|
+
```typescript
|
|
30
|
+
import { OPCUAServer, DataType, Variant } from "node-opcua";
|
|
18
31
|
|
|
19
|
-
|
|
32
|
+
const server = new OPCUAServer({ port: 4840 });
|
|
33
|
+
await server.initialize();
|
|
20
34
|
|
|
21
|
-
|
|
22
|
-
|
|
35
|
+
const addressSpace = server.engine.addressSpace!;
|
|
36
|
+
const namespace = addressSpace.getOwnNamespace();
|
|
37
|
+
namespace.addVariable({
|
|
38
|
+
browseName: "Temperature",
|
|
39
|
+
componentOf: addressSpace.rootFolder.objects,
|
|
40
|
+
dataType: DataType.Double,
|
|
41
|
+
value: { get: () => new Variant({ dataType: DataType.Double, value: 22.5 }) },
|
|
42
|
+
});
|
|
23
43
|
|
|
24
|
-
|
|
44
|
+
await server.start();
|
|
45
|
+
console.log("Server started at", server.getEndpointUrl());
|
|
46
|
+
```
|
|
25
47
|
|
|
26
|
-
|
|
27
|
-
- ⚙️ maintain the website and continuous integration platform
|
|
28
|
-
- 🛣 Progress on the road map
|
|
29
|
-
- 🐛 Quick responses to bug reports
|
|
30
|
-
- 🚀 New features & enhancements
|
|
31
|
-
- ⚖️ representing the node-opcua user community at the OPC Foundation
|
|
48
|
+
### Connect as an OPC UA Client
|
|
32
49
|
|
|
33
|
-
|
|
50
|
+
```typescript
|
|
51
|
+
import { OPCUAClient, AttributeIds } from "node-opcua";
|
|
34
52
|
|
|
35
|
-
|
|
53
|
+
const client = OPCUAClient.create({ endpointMustExist: false });
|
|
54
|
+
await client.connect("opc.tcp://localhost:4840");
|
|
36
55
|
|
|
56
|
+
const session = await client.createSession();
|
|
57
|
+
const value = await session.read({ nodeId: "ns=1;s=Temperature", attributeId: AttributeIds.Value });
|
|
58
|
+
console.log("Temperature =", value.value.value);
|
|
37
59
|
|
|
38
|
-
|
|
60
|
+
await session.close();
|
|
61
|
+
await client.disconnect();
|
|
62
|
+
```
|
|
39
63
|
|
|
40
|
-
|
|
64
|
+
## 🏢 Professional Support
|
|
41
65
|
|
|
42
|
-
|
|
66
|
+
| | Community (MIT) | Professional |
|
|
67
|
+
| ------------------------ | :----------------: | :------------------: |
|
|
68
|
+
| Full documentation | ✅ | ✅ + extended docs |
|
|
69
|
+
| Bug fixes | Best effort | **Priority SLA** |
|
|
70
|
+
| CVE security advisories | After disclosure | **Early access — patch before public disclosure** |
|
|
71
|
+
| Certifiable version | — | ✅ |
|
|
72
|
+
| Dedicated consulting | — | ✅ |
|
|
73
|
+
| Custom development | — | ✅ |
|
|
74
|
+
|
|
75
|
+
[](https://support.sterfive.com)
|
|
76
|
+
|
|
77
|
+
Or [contact Sterfive](mailto:contact@sterfive.com) for dedicated consulting and enterprise needs.
|
|
78
|
+
|
|
79
|
+
## 📖 Documentation
|
|
80
|
+
|
|
81
|
+
- **[NodeOPCUA by Example](https://leanpub.com/node-opcuabyexample-edition2024)** — the definitive guide with practical, ready-to-use examples
|
|
82
|
+
- **[API Reference](https://node-opcua.github.io/api_doc/index.html)** — full TypeScript API documentation
|
|
83
|
+
- **[Tutorials](https://github.com/node-opcua/node-opcua/tree/master/documentation)** — step-by-step guides in the main repository
|
|
84
|
+
|
|
85
|
+
## Value-Added Extensions
|
|
43
86
|
|
|
87
|
+
Source-available companion modules available to [NodeOPCUA subscription members](https://support.sterfive.com) (additional fee):
|
|
44
88
|
|
|
45
|
-
|
|
89
|
+
| Module | Description |
|
|
90
|
+
| ------ | ----------- |
|
|
91
|
+
| **node-opcua-pub-sub** | OPC UA PubSub over MQTT (Part 14) — Industry 4.0 ready |
|
|
92
|
+
| **aggregator** | Combine and monitor hundreds of servers and millions of variables |
|
|
93
|
+
| **node-opcua-optimized-client** | High-performance OPC UA client for demanding workloads |
|
|
94
|
+
| **node-opcua-gds** | Global Discovery Server — certificate lifecycle at scale (Part 12) |
|
|
95
|
+
| **node-opcua-modeler-ex** | Programmatic OPC UA modeler |
|
|
46
96
|
|
|
47
|
-
|
|
97
|
+
👉 Visit [support.sterfive.com](https://support.sterfive.com) for access and pricing.
|
|
48
98
|
|
|
49
|
-
|
|
50
|
-
- node-opcua-webproxy: to operate node-opcua from within a web browser
|
|
51
|
-
- node-opcua-optimized-client: super-charge OPC UA Client
|
|
52
|
-
- react-components: a collection of React UI components
|
|
53
|
-
- aggregator: a powerful OPC UA aggregator that can combine and monitor hundred of servers and millions of variables.
|
|
54
|
-
- node-opcua-gds: a Global Discovery Server (Part 12)
|
|
55
|
-
- node-opcua-modeler-ex: a powerful NO-GUI OPC UA modeler
|
|
99
|
+
## Ecosystem
|
|
56
100
|
|
|
101
|
+
### AI-Powered Modeling with MCP
|
|
57
102
|
|
|
58
|
-
|
|
103
|
+
**[node-opcua-modeler-mcp-server](https://www.npmjs.com/package/node-opcua-modeler-mcp-server)** — an [MCP server](https://modelcontextprotocol.io) that gives AI agents access to the OPC UA companion specification type system. Discover types, resolve namespace dependencies, and look up engineering units.
|
|
59
104
|
|
|
60
|
-
|
|
105
|
+
```bash
|
|
106
|
+
npx node-opcua-modeler-mcp-server
|
|
107
|
+
```
|
|
61
108
|
|
|
62
|
-
|
|
109
|
+
### OPC UA Modeler
|
|
63
110
|
|
|
111
|
+
**[OPC UA Modeler](https://opcua-modeler.sterfive.com)** — create, validate, and generate OPC UA information models using a YAML-first workflow with full companion spec support.
|
|
112
|
+
|
|
113
|
+
## :heart: Sponsors
|
|
114
|
+
|
|
115
|
+
If you rely on node-opcua in production, please consider [sponsoring the project](https://github.com/sponsors/node-opcua). Your support funds long-term maintenance, new features, and representation at the OPC Foundation.
|
|
116
|
+
|
|
117
|
+
## License
|
|
118
|
+
|
|
119
|
+
MIT — Copyright (c) 2014-2026 Etienne Rossignon / [Sterfive SAS](https://www.sterfive.com)
|
|
120
|
+
|
|
121
|
+
See [LICENSE](./LICENSE) for details.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-opcua",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.174.0",
|
|
4
4
|
"description": "pure nodejs OPCUA SDK - module node-opcua",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -15,54 +15,54 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@types/semver": "7.7.1",
|
|
17
17
|
"chalk": "4.1.2",
|
|
18
|
-
"node-opcua-address-space": "2.
|
|
19
|
-
"node-opcua-address-space-for-conformance-testing": "2.
|
|
20
|
-
"node-opcua-aggregates": "2.
|
|
18
|
+
"node-opcua-address-space": "2.174.0",
|
|
19
|
+
"node-opcua-address-space-for-conformance-testing": "2.174.0",
|
|
20
|
+
"node-opcua-aggregates": "2.174.0",
|
|
21
21
|
"node-opcua-assert": "2.164.0",
|
|
22
|
-
"node-opcua-basic-types": "2.
|
|
22
|
+
"node-opcua-basic-types": "2.174.0",
|
|
23
23
|
"node-opcua-binary-stream": "2.173.0",
|
|
24
|
-
"node-opcua-certificate-manager": "2.
|
|
25
|
-
"node-opcua-client": "2.
|
|
26
|
-
"node-opcua-client-proxy": "2.
|
|
27
|
-
"node-opcua-common": "2.
|
|
28
|
-
"node-opcua-constants": "2.
|
|
24
|
+
"node-opcua-certificate-manager": "2.174.0",
|
|
25
|
+
"node-opcua-client": "2.174.0",
|
|
26
|
+
"node-opcua-client-proxy": "2.174.0",
|
|
27
|
+
"node-opcua-common": "2.174.0",
|
|
28
|
+
"node-opcua-constants": "2.174.0",
|
|
29
29
|
"node-opcua-crypto": "5.3.6",
|
|
30
|
-
"node-opcua-data-access": "2.
|
|
31
|
-
"node-opcua-data-model": "2.
|
|
32
|
-
"node-opcua-data-value": "2.
|
|
30
|
+
"node-opcua-data-access": "2.174.0",
|
|
31
|
+
"node-opcua-data-model": "2.174.0",
|
|
32
|
+
"node-opcua-data-value": "2.174.0",
|
|
33
33
|
"node-opcua-debug": "2.172.0",
|
|
34
34
|
"node-opcua-enum": "2.173.0",
|
|
35
|
-
"node-opcua-factory": "2.
|
|
35
|
+
"node-opcua-factory": "2.174.0",
|
|
36
36
|
"node-opcua-hostname": "2.167.0",
|
|
37
|
-
"node-opcua-nodeid": "2.
|
|
38
|
-
"node-opcua-nodesets": "2.
|
|
39
|
-
"node-opcua-numeric-range": "2.
|
|
40
|
-
"node-opcua-packet-analyzer": "2.
|
|
41
|
-
"node-opcua-secure-channel": "2.
|
|
42
|
-
"node-opcua-server": "2.
|
|
43
|
-
"node-opcua-server-discovery": "2.
|
|
44
|
-
"node-opcua-service-browse": "2.
|
|
45
|
-
"node-opcua-service-call": "2.
|
|
46
|
-
"node-opcua-service-discovery": "2.
|
|
47
|
-
"node-opcua-service-endpoints": "2.
|
|
48
|
-
"node-opcua-service-filter": "2.
|
|
49
|
-
"node-opcua-service-history": "2.
|
|
50
|
-
"node-opcua-service-node-management": "2.
|
|
51
|
-
"node-opcua-service-query": "2.
|
|
52
|
-
"node-opcua-service-read": "2.
|
|
53
|
-
"node-opcua-service-register-node": "2.
|
|
54
|
-
"node-opcua-service-secure-channel": "2.
|
|
55
|
-
"node-opcua-service-session": "2.
|
|
56
|
-
"node-opcua-service-subscription": "2.
|
|
57
|
-
"node-opcua-service-translate-browse-path": "2.
|
|
58
|
-
"node-opcua-service-write": "2.
|
|
37
|
+
"node-opcua-nodeid": "2.174.0",
|
|
38
|
+
"node-opcua-nodesets": "2.174.0",
|
|
39
|
+
"node-opcua-numeric-range": "2.174.0",
|
|
40
|
+
"node-opcua-packet-analyzer": "2.174.0",
|
|
41
|
+
"node-opcua-secure-channel": "2.174.0",
|
|
42
|
+
"node-opcua-server": "2.174.0",
|
|
43
|
+
"node-opcua-server-discovery": "2.174.0",
|
|
44
|
+
"node-opcua-service-browse": "2.174.0",
|
|
45
|
+
"node-opcua-service-call": "2.174.0",
|
|
46
|
+
"node-opcua-service-discovery": "2.174.0",
|
|
47
|
+
"node-opcua-service-endpoints": "2.174.0",
|
|
48
|
+
"node-opcua-service-filter": "2.174.0",
|
|
49
|
+
"node-opcua-service-history": "2.174.0",
|
|
50
|
+
"node-opcua-service-node-management": "2.174.0",
|
|
51
|
+
"node-opcua-service-query": "2.174.0",
|
|
52
|
+
"node-opcua-service-read": "2.174.0",
|
|
53
|
+
"node-opcua-service-register-node": "2.174.0",
|
|
54
|
+
"node-opcua-service-secure-channel": "2.174.0",
|
|
55
|
+
"node-opcua-service-session": "2.174.0",
|
|
56
|
+
"node-opcua-service-subscription": "2.174.0",
|
|
57
|
+
"node-opcua-service-translate-browse-path": "2.174.0",
|
|
58
|
+
"node-opcua-service-write": "2.174.0",
|
|
59
59
|
"node-opcua-status-code": "2.173.0",
|
|
60
|
-
"node-opcua-transport": "2.
|
|
61
|
-
"node-opcua-types": "2.
|
|
60
|
+
"node-opcua-transport": "2.174.0",
|
|
61
|
+
"node-opcua-types": "2.174.0",
|
|
62
62
|
"node-opcua-utils": "2.173.0",
|
|
63
|
-
"node-opcua-variant": "2.
|
|
64
|
-
"node-opcua-vendor-diagnostic": "2.
|
|
65
|
-
"semver": "^7.8.
|
|
63
|
+
"node-opcua-variant": "2.174.0",
|
|
64
|
+
"node-opcua-vendor-diagnostic": "2.174.0",
|
|
65
|
+
"semver": "^7.8.5"
|
|
66
66
|
},
|
|
67
67
|
"author": "Etienne Rossignon",
|
|
68
68
|
"license": "MIT",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"url": "https://github.com/sponsors/erossignon"
|
|
83
83
|
},
|
|
84
84
|
"homepage": "http://node-opcua.github.io/",
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "011657a3a4805ad106df7381c24ed84e2a18d8f1",
|
|
86
86
|
"files": [
|
|
87
87
|
"dist",
|
|
88
88
|
"source"
|