@t0a5tbr0t/node-red-contrib-opcua 0.1.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/CHANGELOG.md +6 -0
- package/LICENSE +20 -0
- package/Readme.md +239 -0
- package/images/PROSYS-OPC-UA-EXAMPLE2.png +0 -0
- package/images/nodeopcua64.png +0 -0
- package/images/opcuanode.png +0 -0
- package/images/opcuanodeLogo64.png +0 -0
- package/opcua/101-opcuaitem.html +106 -0
- package/opcua/101-opcuaitem.js +82 -0
- package/opcua/102-opcuaclient.html +274 -0
- package/opcua/102-opcuaclient.js +2741 -0
- package/opcua/103-opcuabrowser.html +71 -0
- package/opcua/103-opcuabrowser.js +230 -0
- package/opcua/104-opcuaserver.html +261 -0
- package/opcua/104-opcuaserver.js +1844 -0
- package/opcua/105-opcuaendpoint.html +224 -0
- package/opcua/105-opcuaendpoint.js +64 -0
- package/opcua/106-opcuaevent.html +110 -0
- package/opcua/106-opcuaevent.js +50 -0
- package/opcua/107-opcuamethod.html +244 -0
- package/opcua/107-opcuamethod.js +521 -0
- package/opcua/108-opcuarights.html +223 -0
- package/opcua/108-opcuarights.js +156 -0
- package/opcua/109-opcuadiscovery.html +51 -0
- package/opcua/109-opcuadiscovery.js +180 -0
- package/opcua/dump_certificates.js +55 -0
- package/opcua/icons/opcuanode.png +0 -0
- package/opcua/icons/opcuanodeLogo.png +0 -0
- package/opcua/opcua-basics.js +1061 -0
- package/opcua/public/vendor/opc-foundation/binary/OPC.ISA95.Types.bsd.xml +141 -0
- package/opcua/public/vendor/opc-foundation/binary/Opc.Ua.Adi.Types.bsd.xml +76 -0
- package/opcua/public/vendor/opc-foundation/binary/Opc.Ua.Di.Types.bsd.xml +11 -0
- package/opcua/public/vendor/opc-foundation/binary/Opc.Ua.Gds.Types.bsd.xml +25 -0
- package/opcua/public/vendor/opc-foundation/binary/Opc.Ua.Types.bsd.xml +2391 -0
- package/opcua/public/vendor/opc-foundation/csv/AttributeIds.csv +22 -0
- package/opcua/public/vendor/opc-foundation/csv/NodeIds.csv +5746 -0
- package/opcua/public/vendor/opc-foundation/csv/Opc.Ua.StatusCodes.csv +227 -0
- package/opcua/public/vendor/opc-foundation/csv/OpcUaDiModel.csv +1523 -0
- package/opcua/public/vendor/opc-foundation/csv/OpcUaGdsModel.csv +400 -0
- package/opcua/public/vendor/opc-foundation/csv/ServerCapabilities.csv +13 -0
- package/opcua/public/vendor/opc-foundation/csv/ServerCapabilityIdentifiers.csv +13 -0
- package/opcua/public/vendor/opc-foundation/csv/StatusCode.csv +227 -0
- package/opcua/public/vendor/opc-foundation/csv/StatusCodes.csv +227 -0
- package/opcua/public/vendor/opc-foundation/schema/OPC.ISA95.Types.xsd +163 -0
- package/opcua/public/vendor/opc-foundation/schema/OPCBinarySchema.xsd +119 -0
- package/opcua/public/vendor/opc-foundation/schema/Opc.Ua.Types.xsd +3938 -0
- package/opcua/public/vendor/opc-foundation/schema/SecuredApplication.xsd +106 -0
- package/opcua/public/vendor/opc-foundation/schema/UANodeSet.xsd +420 -0
- package/opcua/public/vendor/opc-foundation/xml/OPC.ISA95.NodeSet2.Nov52013.xml +3293 -0
- package/opcua/public/vendor/opc-foundation/xml/Opc.ISA95.NodeSet2.xml +3589 -0
- package/opcua/public/vendor/opc-foundation/xml/Opc.Ua.Adi.NodeSet2.xml +8301 -0
- package/opcua/public/vendor/opc-foundation/xml/Opc.Ua.Adi.Types.bsd.xml +76 -0
- package/opcua/public/vendor/opc-foundation/xml/Opc.Ua.Adi.Types.xsd +157 -0
- package/opcua/public/vendor/opc-foundation/xml/Opc.Ua.AutoID.NodeSet2.xml +6062 -0
- package/opcua/public/vendor/opc-foundation/xml/Opc.Ua.Di.NodeSet2.xml +5066 -0
- package/opcua/public/vendor/opc-foundation/xml/Opc.Ua.Di.PredefinedNodes.xml +11495 -0
- package/opcua/public/vendor/opc-foundation/xml/Opc.Ua.Di.Types.bsd +86 -0
- package/opcua/public/vendor/opc-foundation/xml/Opc.Ua.Di.Types.bsd.xml +11 -0
- package/opcua/public/vendor/opc-foundation/xml/Opc.Ua.Di.Types.xsd +155 -0
- package/opcua/public/vendor/opc-foundation/xml/Opc.Ua.Gds.NodeSet.xml +15226 -0
- package/opcua/public/vendor/opc-foundation/xml/Opc.Ua.Gds.NodeSet2.xml +6214 -0
- package/opcua/public/vendor/opc-foundation/xml/Opc.Ua.Gds.Types.bsd.xml +25 -0
- package/opcua/public/vendor/opc-foundation/xml/Opc.Ua.Gds.Types.xsd +30 -0
- package/opcua/public/vendor/opc-foundation/xml/Opc.Ua.NodeSet-2.xml +134881 -0
- package/opcua/public/vendor/opc-foundation/xml/Opc.Ua.NodeSet-3.xml +134881 -0
- package/opcua/public/vendor/opc-foundation/xml/Opc.Ua.NodeSet.xml +134881 -0
- package/opcua/public/vendor/opc-foundation/xml/Opc.Ua.NodeSet2.Part10.xml +832 -0
- package/opcua/public/vendor/opc-foundation/xml/Opc.Ua.NodeSet2.Part11.xml +793 -0
- package/opcua/public/vendor/opc-foundation/xml/Opc.Ua.NodeSet2.Part12.xml +3877 -0
- package/opcua/public/vendor/opc-foundation/xml/Opc.Ua.NodeSet2.Part13.xml +344 -0
- package/opcua/public/vendor/opc-foundation/xml/Opc.Ua.NodeSet2.Part3.xml +1103 -0
- package/opcua/public/vendor/opc-foundation/xml/Opc.Ua.NodeSet2.Part4.xml +3091 -0
- package/opcua/public/vendor/opc-foundation/xml/Opc.Ua.NodeSet2.Part5.xml +17092 -0
- package/opcua/public/vendor/opc-foundation/xml/Opc.Ua.NodeSet2.Part8.xml +525 -0
- package/opcua/public/vendor/opc-foundation/xml/Opc.Ua.NodeSet2.Part9.xml +2049 -0
- package/opcua/public/vendor/opc-foundation/xml/Opc.Ua.NodeSet2.Part999.xml +134 -0
- package/opcua/public/vendor/opc-foundation/xml/Opc.Ua.NodeSet2.xml +67169 -0
- package/opcua/public/vendor/opc-foundation/xml/Opc.Ua.PredefinedNodes.xml +64500 -0
- package/opcua/public/vendor/opc-foundation/xml/OpcUaDiModel.xml +1239 -0
- package/opcua/utils.js +55 -0
- package/package.json +68 -0
- package/users.json +22 -0
package/opcua/utils.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
|
|
2
|
+
const opcua = require("node-opcua");
|
|
3
|
+
const path = require("path");
|
|
4
|
+
const envPaths = require("env-paths");
|
|
5
|
+
const config = envPaths("node-red-opcua").config;
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
let _g_CertificateManager = null; // For all clients
|
|
9
|
+
|
|
10
|
+
function createCertificateManager() {
|
|
11
|
+
if (_g_CertificateManager) return _g_CertificateManager;
|
|
12
|
+
let folder = config;
|
|
13
|
+
_g_CertificateManager = new opcua.OPCUACertificateManager({
|
|
14
|
+
name: "PKI",
|
|
15
|
+
rootFolder: path.join(folder, "PKI"),
|
|
16
|
+
automaticallyAcceptUnknownCertificate: true
|
|
17
|
+
});
|
|
18
|
+
return _g_CertificateManager;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function createClientCertificateManager() {
|
|
22
|
+
return createCertificateManager();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function createServerCertificateManager() {
|
|
26
|
+
return createServerCertificateManager();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
let _g_userCertificateManager = null;
|
|
31
|
+
function createUserCertificateManager() {
|
|
32
|
+
if (_g_userCertificateManager) return _g_userCertificateManager;
|
|
33
|
+
let folder = config;
|
|
34
|
+
_g_userCertificateManager = new opcua.OPCUACertificateManager({
|
|
35
|
+
name: "UserPKI",
|
|
36
|
+
rootFolder: path.join(folder, "UserPKI"),
|
|
37
|
+
automaticallyAcceptUnknownCertificate: true
|
|
38
|
+
});
|
|
39
|
+
return _g_userCertificateManager;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
let _g_ServerCertificateManager = null; // For all servers
|
|
43
|
+
function createServerCertificateManager(autoAcceptUnknownCertificate = true) {
|
|
44
|
+
if (_g_ServerCertificateManager) return _g_ServerCertificateManager;
|
|
45
|
+
let folder = config;
|
|
46
|
+
_g_ServerCertificateManager = new opcua.OPCUACertificateManager({
|
|
47
|
+
name: "ServerPKI",
|
|
48
|
+
rootFolder: path.join(folder, "ServerPKI"),
|
|
49
|
+
automaticallyAcceptUnknownCertificate: autoAcceptUnknownCertificate
|
|
50
|
+
});
|
|
51
|
+
return _g_ServerCertificateManager;
|
|
52
|
+
}
|
|
53
|
+
exports.createClientCertificateManager = createClientCertificateManager;
|
|
54
|
+
exports.createServerCertificateManager = createServerCertificateManager;
|
|
55
|
+
exports.createUserCertificateManager = createUserCertificateManager;
|
package/package.json
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@t0a5tbr0t/node-red-contrib-opcua",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "A forked Node-RED node to communicate via OPC UA based on node-opcua library to change hardcoded values. The repository still references the original code.",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/mikakaraila/node-red-contrib-opcua.git"
|
|
8
|
+
},
|
|
9
|
+
"keywords": [
|
|
10
|
+
"node-red",
|
|
11
|
+
"OPC UA",
|
|
12
|
+
"opc-ua",
|
|
13
|
+
"unified automation",
|
|
14
|
+
"opc foundation",
|
|
15
|
+
"node-opcua"
|
|
16
|
+
],
|
|
17
|
+
"author": {
|
|
18
|
+
"name": "t0a5tbr0t",
|
|
19
|
+
"email": "toastbrot.angebrannt@t-online.de"
|
|
20
|
+
},
|
|
21
|
+
"license": "Apache-2.0",
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/mikakaraila/node-red-contrib-opcua/issues"
|
|
24
|
+
},
|
|
25
|
+
"node-red": {
|
|
26
|
+
"version": ">=1.3",
|
|
27
|
+
"nodes": {
|
|
28
|
+
"OpcUa-Item": "opcua/101-opcuaitem.js",
|
|
29
|
+
"OpcUa-Client": "opcua/102-opcuaclient.js",
|
|
30
|
+
"OpcUa-Browser": "opcua/103-opcuabrowser.js",
|
|
31
|
+
"OpcUa-Server": "opcua/104-opcuaserver.js",
|
|
32
|
+
"OpcUa-Endpoint": "opcua/105-opcuaendpoint.js",
|
|
33
|
+
"OpcUa-Event": "opcua/106-opcuaevent.js",
|
|
34
|
+
"OpcUa-Method": "opcua/107-opcuamethod.js",
|
|
35
|
+
"OpcUa-Rights": "opcua/108-opcuarights.js",
|
|
36
|
+
"OpcUa-Discovery": "opcua/109-opcuadiscovery.js"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=15"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"async": "3.2.1",
|
|
44
|
+
"chalk": "4.1.2",
|
|
45
|
+
"env-paths": "2.2.1",
|
|
46
|
+
"flatted": "3.2.2",
|
|
47
|
+
"get-user-locale": "2.3.0",
|
|
48
|
+
"lodash.clonedeep": "4.5.0",
|
|
49
|
+
"node-opcua": "2.160.0",
|
|
50
|
+
"node-opcua-client-crawler": "2.127.1",
|
|
51
|
+
"node-opcua-file-transfer": "2.160.0",
|
|
52
|
+
"node-opcua-crypto": "4.16.0",
|
|
53
|
+
"os-locale": "6.0.2"
|
|
54
|
+
},
|
|
55
|
+
"directories": {
|
|
56
|
+
"example": "examples"
|
|
57
|
+
},
|
|
58
|
+
"homepage": "https://github.com/mikakaraila/node-red-contrib-opcua#readme",
|
|
59
|
+
"scripts": {
|
|
60
|
+
"test": "karma start opcua.conf.js --log-level debug --single-run"
|
|
61
|
+
},
|
|
62
|
+
"devDependencies": {
|
|
63
|
+
"jasmine-core": "^3.8.0",
|
|
64
|
+
"karma": "^6.3.4",
|
|
65
|
+
"karma-chrome-launcher": "^3.1.0",
|
|
66
|
+
"karma-jasmine": "^4.0.1"
|
|
67
|
+
}
|
|
68
|
+
}
|
package/users.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"username": "visitor",
|
|
4
|
+
"password": "qwerty",
|
|
5
|
+
"roles": "Guest"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"username": "JohnSmith",
|
|
9
|
+
"password": "1234",
|
|
10
|
+
"roles": "Operator"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"username": "James",
|
|
14
|
+
"password": "Bond",
|
|
15
|
+
"roles": "Observer"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"username": "Administrator",
|
|
19
|
+
"password": "HardPassword!",
|
|
20
|
+
"roles": "Supervisor;ConfigureAdmin;SecurityAdmin"
|
|
21
|
+
}
|
|
22
|
+
]
|