node-red-contrib-ccu 4.10.0 → 4.10.1
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 +21 -0
- package/README.md +2 -1
- package/nodes/ccu-connection.js +104 -1
- package/nodes/lib/lite.js +122 -0
- package/nodes/lib/status.js +18 -2
- package/nodes/locales/de/ccu-connection.html +1 -1
- package/nodes/locales/en-US/ccu-connection.html +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,27 @@ Notable changes to node-red-contrib-ccu. Format follows
|
|
|
5
5
|
user-visible symptom and the cause, not the commit list (the release notes
|
|
6
6
|
append commits automatically).
|
|
7
7
|
|
|
8
|
+
## 4.10.1 (2026-11-10)
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **openccu-lite: a connection whose token reads only the names lost its
|
|
13
|
+
events and commands after the update to 4.7 or later, without a word.**
|
|
14
|
+
Since 4.7 a connection to openccu-lite with a token in the connection node
|
|
15
|
+
moves its interfaces to the system's lite-rpc. A token made for the names
|
|
16
|
+
alone (`meta:read`, all the direct connection needed before) may not use
|
|
17
|
+
lite-rpc: the system refused the interface list and the event stream, and
|
|
18
|
+
the log said only `lite-rpc connected: no interface running`. The
|
|
19
|
+
connection now asks the system what the token may do before it moves
|
|
20
|
+
anything. Without `rpc:read` the interfaces stay on the direct connection
|
|
21
|
+
with callbacks, as before the update, and the log says that lite-rpc needs
|
|
22
|
+
`rpc:read` (events and device lists) and `rpc:operate` (commands). Where
|
|
23
|
+
the connection type is set to _openccu-lite_, the log has an error naming
|
|
24
|
+
the missing scopes and the nodes show `token lacks rpc:read, rpc:operate`
|
|
25
|
+
instead of waiting. A token with `rpc:read` but without `rpc:operate`
|
|
26
|
+
connects through lite-rpc and gets a warning that commands are refused.
|
|
27
|
+
(#189, @reini12345)
|
|
28
|
+
|
|
8
29
|
## 4.10.0 (2026-11-09)
|
|
9
30
|
|
|
10
31
|
### Changed
|
package/README.md
CHANGED
|
@@ -57,7 +57,8 @@ CCU-Jack keep their own connections.
|
|
|
57
57
|
rpc node may call any method) and for reading the names. Alternatively an API token made on the system goes into
|
|
58
58
|
the **openccu-lite token** field by hand - for lite-rpc it needs the `rpc:*` scope of what the flow does
|
|
59
59
|
(`rpc:read` for events and reads, `rpc:operate` for `setValue`, `rpc:configure` for paramsets and links,
|
|
60
|
-
`rpc:admin` for the rest).
|
|
60
|
+
`rpc:admin` for the rest). A token without `rpc:read` (one made for the names alone) keeps the direct connection
|
|
61
|
+
with callbacks under _auto_, and the log says what lite-rpc would need.
|
|
61
62
|
- **System variables, programs and HM-Script do not exist there.** The `ccu-sysvar`, `ccu-program`, `ccu-script` and
|
|
62
63
|
`ccu-poll` nodes stay in the flows and answer every message with an error.
|
|
63
64
|
|
package/nodes/ccu-connection.js
CHANGED
|
@@ -736,6 +736,10 @@ module.exports = function (RED) {
|
|
|
736
736
|
this.liteConfig = config;
|
|
737
737
|
this.lite = null;
|
|
738
738
|
this.liteIfaces = [];
|
|
739
|
+
// B-44: the scopes the system lists for the lite-rpc credential (undefined: not known)
|
|
740
|
+
// and, per interface, why it cannot be reached (the nodes show it)
|
|
741
|
+
this.liteScopes = undefined;
|
|
742
|
+
this.ifaceError = {};
|
|
739
743
|
this.metaMode = false;
|
|
740
744
|
this.meta = null;
|
|
741
745
|
// #167: minutes between re-reads of channel names, rooms and
|
|
@@ -1058,6 +1062,11 @@ module.exports = function (RED) {
|
|
|
1058
1062
|
}
|
|
1059
1063
|
|
|
1060
1064
|
waiting = Boolean(waiting) && !connected;
|
|
1065
|
+
if (connected && this.ifaceError[iface]) {
|
|
1066
|
+
delete this.ifaceError[iface];
|
|
1067
|
+
this.ifaceStatus[iface] = null; // the nodes drop the error text
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1061
1070
|
const waitingChanged = Boolean(this.ifaceWaiting[iface]) !== waiting;
|
|
1062
1071
|
if (this.ifaceStatus[iface] !== connected || waitingChanged) {
|
|
1063
1072
|
if (this.ifaceStatus[iface] !== connected) {
|
|
@@ -1126,7 +1135,11 @@ module.exports = function (RED) {
|
|
|
1126
1135
|
pushStatus() {
|
|
1127
1136
|
Object.keys(this.users).forEach((id) => {
|
|
1128
1137
|
if (typeof this.users[id].setStatus === 'function') {
|
|
1129
|
-
this.users[id].setStatus({
|
|
1138
|
+
this.users[id].setStatus({
|
|
1139
|
+
ifaceStatus: this.ifaceStatus,
|
|
1140
|
+
ifaceWaiting: this.ifaceWaiting,
|
|
1141
|
+
ifaceError: this.ifaceError,
|
|
1142
|
+
});
|
|
1130
1143
|
}
|
|
1131
1144
|
});
|
|
1132
1145
|
}
|
|
@@ -1799,6 +1812,44 @@ module.exports = function (RED) {
|
|
|
1799
1812
|
);
|
|
1800
1813
|
}
|
|
1801
1814
|
|
|
1815
|
+
return this.checkLiteScopes().then(() => this.startMetaProvider());
|
|
1816
|
+
}
|
|
1817
|
+
|
|
1818
|
+
/**
|
|
1819
|
+
* B-44: what the lite-rpc credential may do, asked once before the interfaces are moved
|
|
1820
|
+
* there - a token made for the names alone (meta:read, enough for the CCU way up to 4.6)
|
|
1821
|
+
* cannot follow them to lite-rpc, and liteInterfaces() keeps them on the direct path then.
|
|
1822
|
+
* @returns {Promise<void>}
|
|
1823
|
+
*/
|
|
1824
|
+
checkLiteScopes() {
|
|
1825
|
+
if (
|
|
1826
|
+
this.connectionType === 'ccu' ||
|
|
1827
|
+
!this.liteToken ||
|
|
1828
|
+
!lite.LITE_INTERFACES.some((iface) => this.liteConfig[this.ifaceTypes[iface].conf + 'Enabled'])
|
|
1829
|
+
) {
|
|
1830
|
+
return Promise.resolve();
|
|
1831
|
+
}
|
|
1832
|
+
|
|
1833
|
+
return lite
|
|
1834
|
+
.tokenScopes({
|
|
1835
|
+
url: (this.tlsEnabled ? 'https' : 'http') + '://' + this.host + ':' + this.metaPort,
|
|
1836
|
+
token: this.liteToken,
|
|
1837
|
+
insecure: Boolean(this.inSecure),
|
|
1838
|
+
fingerprint256: this.fingerprint256,
|
|
1839
|
+
})
|
|
1840
|
+
.then((scopes) => {
|
|
1841
|
+
this.liteScopes = scopes;
|
|
1842
|
+
if (scopes) {
|
|
1843
|
+
this.logger.debug('openccu-lite: the lite-rpc credential holds ' + scopes.join(', '));
|
|
1844
|
+
}
|
|
1845
|
+
});
|
|
1846
|
+
}
|
|
1847
|
+
|
|
1848
|
+
/**
|
|
1849
|
+
* The names from the system's metadata api (startMeta's second half).
|
|
1850
|
+
* @returns {Promise<void>}
|
|
1851
|
+
*/
|
|
1852
|
+
startMetaProvider() {
|
|
1802
1853
|
// one client for names and interfaces where the lite-rpc credential reads the names too
|
|
1803
1854
|
// (the connection node's own token, as pairing makes it); a names-only client of its own
|
|
1804
1855
|
// where they differ (RedMatic: the system's local token for the names, the addon token
|
|
@@ -2620,6 +2671,24 @@ module.exports = function (RED) {
|
|
|
2620
2671
|
return [];
|
|
2621
2672
|
}
|
|
2622
2673
|
|
|
2674
|
+
// B-44: a token without rpc:read (one made for the names, as the CCU way needed up to
|
|
2675
|
+
// 4.6) cannot follow the interfaces to lite-rpc: `auto` keeps the direct connection that
|
|
2676
|
+
// worked with it; `openccu-lite` insists, and startLite() says what the token lacks
|
|
2677
|
+
const missing = lite.missingTiers(this.liteScopes);
|
|
2678
|
+
if (missing.includes('rpc:read') && this.connectionType === 'auto') {
|
|
2679
|
+
if (!quiet) {
|
|
2680
|
+
this.logger.warn(
|
|
2681
|
+
'openccu-lite: the token in the connection node holds ' +
|
|
2682
|
+
(this.liteScopes.join(', ') || 'no scope') +
|
|
2683
|
+
' - lite-rpc needs ' +
|
|
2684
|
+
lite.describeTiers(missing) +
|
|
2685
|
+
', so the interfaces stay on the direct connection with callbacks. To use lite-rpc, give the token these scopes on the system or pair the connection node with it',
|
|
2686
|
+
);
|
|
2687
|
+
}
|
|
2688
|
+
|
|
2689
|
+
return [];
|
|
2690
|
+
}
|
|
2691
|
+
|
|
2623
2692
|
return enabled;
|
|
2624
2693
|
}
|
|
2625
2694
|
|
|
@@ -2751,6 +2820,15 @@ module.exports = function (RED) {
|
|
|
2751
2820
|
|
|
2752
2821
|
const up = ifaces.filter((iface) => running(iface));
|
|
2753
2822
|
this.logger.info('lite-rpc connected: ' + (up.join(', ') || 'no interface running'));
|
|
2823
|
+
if (!this.lite.may('rpc:operate')) {
|
|
2824
|
+
// B-44: events and device lists, but every command refused
|
|
2825
|
+
this.logger.warn(
|
|
2826
|
+
'lite-rpc: the openccu-lite token lacks ' +
|
|
2827
|
+
lite.describeTiers(['rpc:operate']) +
|
|
2828
|
+
' - events arrive, but setValue, putParamset and the other commands are refused. Give the token rpc:operate on the system or pair the connection node with it',
|
|
2829
|
+
);
|
|
2830
|
+
}
|
|
2831
|
+
|
|
2754
2832
|
return Promise.all(
|
|
2755
2833
|
up.map((iface) =>
|
|
2756
2834
|
this.getDevices(iface)
|
|
@@ -2774,6 +2852,31 @@ module.exports = function (RED) {
|
|
|
2774
2852
|
return;
|
|
2775
2853
|
}
|
|
2776
2854
|
|
|
2855
|
+
if (error.kind === 'forbidden' || error.kind === 'unauthenticated') {
|
|
2856
|
+
// B-44: a refused credential is not tried again - said as an error, and
|
|
2857
|
+
// the nodes show what the token lacks instead of "waiting"
|
|
2858
|
+
const missing = error.missing || (error.scope ? [error.scope] : []);
|
|
2859
|
+
this.logger.error(
|
|
2860
|
+
'lite-rpc: ' +
|
|
2861
|
+
(error.message || error) +
|
|
2862
|
+
(error.kind === 'forbidden'
|
|
2863
|
+
? '. Give the token ' +
|
|
2864
|
+
(missing.join(' and ') || 'rpc:read and rpc:operate') +
|
|
2865
|
+
' on the system, pair the connection node with it, or set the connection type to CCU for the direct connection with callbacks'
|
|
2866
|
+
: ''),
|
|
2867
|
+
);
|
|
2868
|
+
const text =
|
|
2869
|
+
error.kind === 'forbidden'
|
|
2870
|
+
? 'token lacks ' + (missing.join(', ') || 'rpc:read')
|
|
2871
|
+
: 'token not accepted';
|
|
2872
|
+
ifaces.forEach((iface) => {
|
|
2873
|
+
this.ifaceError[iface] = text;
|
|
2874
|
+
this.ifaceStatus[iface] = null;
|
|
2875
|
+
this.setIfaceStatus(iface, false);
|
|
2876
|
+
});
|
|
2877
|
+
return;
|
|
2878
|
+
}
|
|
2879
|
+
|
|
2777
2880
|
this.logger.warn('lite-rpc: ' + (error.message || error) + ' - the client keeps trying');
|
|
2778
2881
|
ifaces.forEach((iface) => this.setIfaceStatus(iface, false, true));
|
|
2779
2882
|
});
|
package/nodes/lib/lite.js
CHANGED
|
@@ -34,6 +34,20 @@ const CALLBACK_METHODS = [
|
|
|
34
34
|
'readdedDevice',
|
|
35
35
|
];
|
|
36
36
|
|
|
37
|
+
/**
|
|
38
|
+
* B-44: the rpc tiers as the system reads them (occulited's scope table): each tier includes the
|
|
39
|
+
* ones before it, Full access (`*`) everything. The system lists only the highest tier a token
|
|
40
|
+
* holds (`rpc:operate`, no `rpc:read` beside it), so a tier is never looked up literally.
|
|
41
|
+
*/
|
|
42
|
+
const RPC_INCLUDES = {
|
|
43
|
+
'rpc:operate': ['rpc:read'],
|
|
44
|
+
'rpc:configure': ['rpc:operate', 'rpc:read'],
|
|
45
|
+
'rpc:admin': ['rpc:configure', 'rpc:operate', 'rpc:read'],
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/** what each tier the interfaces need is for, in the order they matter */
|
|
49
|
+
const RPC_TIERS = {'rpc:read': 'events and device lists', 'rpc:operate': 'commands'};
|
|
50
|
+
|
|
37
51
|
let modules = null;
|
|
38
52
|
|
|
39
53
|
/**
|
|
@@ -74,6 +88,81 @@ function readAddonToken(file = module.exports.ADDON_TOKEN_FILE) {
|
|
|
74
88
|
}
|
|
75
89
|
}
|
|
76
90
|
|
|
91
|
+
/**
|
|
92
|
+
* Whether a credential holding `scopes` may do what needs `want`.
|
|
93
|
+
* @param {string[]} scopes as the system lists them
|
|
94
|
+
* @param {string} want
|
|
95
|
+
* @returns {boolean}
|
|
96
|
+
*/
|
|
97
|
+
function covers(scopes, want) {
|
|
98
|
+
return scopes.some((have) => have === want || have === '*' || (RPC_INCLUDES[have] || []).includes(want));
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* B-44: the tiers lite-rpc needs that `scopes` lacks: `rpc:read` (events, device lists),
|
|
103
|
+
* `rpc:operate` (commands).
|
|
104
|
+
* @param {string[]|undefined} scopes undefined: not known, nothing is said to be missing
|
|
105
|
+
* @returns {string[]}
|
|
106
|
+
*/
|
|
107
|
+
function missingTiers(scopes) {
|
|
108
|
+
if (!Array.isArray(scopes)) {
|
|
109
|
+
return [];
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return Object.keys(RPC_TIERS).filter((tier) => !covers(scopes, tier));
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* B-44: what a token lacking these tiers cannot do, for the log.
|
|
117
|
+
* @param {string[]} missing from missingTiers()
|
|
118
|
+
* @returns {string} e.g. "rpc:read (events and device lists) and rpc:operate (commands)"
|
|
119
|
+
*/
|
|
120
|
+
function describeTiers(missing) {
|
|
121
|
+
return missing.map((tier) => tier + ' (' + RPC_TIERS[tier] + ')').join(' and ');
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* B-44: the scopes the system lists for a credential (GET /api/auth/v1/state), asked before the
|
|
126
|
+
* interfaces are moved to lite-rpc: a token made for the names (meta:read) cannot follow them
|
|
127
|
+
* there. Undefined where it cannot be told (no answer, a refused credential - the client says
|
|
128
|
+
* that itself -, an older system without the auth state): nothing is decided on it then.
|
|
129
|
+
* @param {object} options
|
|
130
|
+
* @param {string} options.url the system, scheme and authority
|
|
131
|
+
* @param {string} options.token
|
|
132
|
+
* @param {boolean} [options.insecure]
|
|
133
|
+
* @param {string} [options.fingerprint256]
|
|
134
|
+
* @param {number} [options.timeout] ms
|
|
135
|
+
* @returns {Promise<string[]|undefined>}
|
|
136
|
+
*/
|
|
137
|
+
async function tokenScopes({url, token, insecure, fingerprint256, timeout = 5000}) {
|
|
138
|
+
const controller = new AbortController();
|
|
139
|
+
const timer = setTimeout(() => controller.abort(), timeout);
|
|
140
|
+
try {
|
|
141
|
+
const transport = load().nodeTransport(trustOf({insecure, fingerprint256}));
|
|
142
|
+
const response = await transport.request(
|
|
143
|
+
'GET',
|
|
144
|
+
url + '/api/auth/v1/state',
|
|
145
|
+
{Accept: 'application/json', Authorization: 'Bearer ' + token, 'X-Occulite-Request': '1'},
|
|
146
|
+
undefined,
|
|
147
|
+
controller.signal,
|
|
148
|
+
);
|
|
149
|
+
if (response.status !== 200) {
|
|
150
|
+
return undefined;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
const state = JSON.parse(response.body);
|
|
154
|
+
if (!state || state.authenticated === false || !Array.isArray(state.scopes)) {
|
|
155
|
+
return undefined;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
return state.scopes.map(String);
|
|
159
|
+
} catch {
|
|
160
|
+
return undefined;
|
|
161
|
+
} finally {
|
|
162
|
+
clearTimeout(timer);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
77
166
|
/**
|
|
78
167
|
* Whether an error of the client is an RPC fault of the interface process (the process answered).
|
|
79
168
|
* @param {*} error
|
|
@@ -325,6 +414,22 @@ class LiteConnection {
|
|
|
325
414
|
return;
|
|
326
415
|
}
|
|
327
416
|
|
|
417
|
+
// B-44: occulite-client runs a credential without rpc:read names-only - no interface
|
|
418
|
+
// list, no stream, every call refused. Said as that, not as "no interface running";
|
|
419
|
+
// the client stays open (a shared names provider follows its copy).
|
|
420
|
+
if (box.mode === 'names-only') {
|
|
421
|
+
const missing = missingTiers(box.scopes);
|
|
422
|
+
const refused = new Error(
|
|
423
|
+
'the openccu-lite token lacks ' +
|
|
424
|
+
describeTiers(missing.length > 0 ? missing : ['rpc:read']) +
|
|
425
|
+
' - the system refuses the interfaces to it',
|
|
426
|
+
);
|
|
427
|
+
refused.kind = 'forbidden';
|
|
428
|
+
refused.scope = 'rpc:read';
|
|
429
|
+
refused.missing = missing.length > 0 ? missing : ['rpc:read'];
|
|
430
|
+
throw refused;
|
|
431
|
+
}
|
|
432
|
+
|
|
328
433
|
this.ready = true;
|
|
329
434
|
if (this.options.onValues) {
|
|
330
435
|
this.options.onValues(box.values);
|
|
@@ -353,6 +458,19 @@ class LiteConnection {
|
|
|
353
458
|
);
|
|
354
459
|
}
|
|
355
460
|
|
|
461
|
+
/**
|
|
462
|
+
* B-44: whether the credential may do what needs `scope`, as the system lists its scopes.
|
|
463
|
+
* @param {string} scope
|
|
464
|
+
* @returns {boolean} true while not known
|
|
465
|
+
*/
|
|
466
|
+
may(scope) {
|
|
467
|
+
if (!this.box || !Array.isArray(this.box.scopes) || this.box.scopes.length === 0) {
|
|
468
|
+
return true;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
return covers(this.box.scopes, scope);
|
|
472
|
+
}
|
|
473
|
+
|
|
356
474
|
/**
|
|
357
475
|
* Whether the system says this interface runs (the client's live list).
|
|
358
476
|
* @param {string} iface
|
|
@@ -386,6 +504,10 @@ module.exports = {
|
|
|
386
504
|
ADDON_TOKEN_FILE,
|
|
387
505
|
CALLBACK_METHODS,
|
|
388
506
|
readAddonToken,
|
|
507
|
+
covers,
|
|
508
|
+
missingTiers,
|
|
509
|
+
describeTiers,
|
|
510
|
+
tokenScopes,
|
|
389
511
|
liteValue,
|
|
390
512
|
trustOf,
|
|
391
513
|
translateError,
|
package/nodes/lib/status.js
CHANGED
|
@@ -5,6 +5,10 @@ module.exports = (that, data) => {
|
|
|
5
5
|
// task 11: an interface whose process does not answer yet is retried; the
|
|
6
6
|
// nodes show "waiting" (yellow ring) for it instead of "disconnected"
|
|
7
7
|
const waiting = data.ifaceWaiting || {};
|
|
8
|
+
// B-44: an interface the connection cannot reach for a reason the user has to fix (the
|
|
9
|
+
// openccu-lite token lacks a scope) shows that reason instead of "disconnected"
|
|
10
|
+
const errors = data.ifaceError || {};
|
|
11
|
+
const error = (text) => ({fill: 'red', shape: 'ring', text});
|
|
8
12
|
if (!that.iface) {
|
|
9
13
|
if (data.ifaceStatus) {
|
|
10
14
|
let status = 0;
|
|
@@ -14,7 +18,11 @@ module.exports = (that, data) => {
|
|
|
14
18
|
}
|
|
15
19
|
});
|
|
16
20
|
if (status < 1) {
|
|
17
|
-
|
|
21
|
+
const failed = Object.keys(errors).find((s) => errors[s]);
|
|
22
|
+
if (failed) {
|
|
23
|
+
that.status(error(errors[failed]));
|
|
24
|
+
that.currentStatus = 'error';
|
|
25
|
+
} else if (Object.keys(waiting).some((s) => waiting[s])) {
|
|
18
26
|
that.status(WAITING);
|
|
19
27
|
that.currentStatus = 'waiting';
|
|
20
28
|
} else {
|
|
@@ -27,7 +35,12 @@ module.exports = (that, data) => {
|
|
|
27
35
|
that.currentStatus = 'green';
|
|
28
36
|
}
|
|
29
37
|
} else {
|
|
30
|
-
|
|
38
|
+
const failed = Object.keys(errors).find((s) => errors[s] && !data.ifaceStatus[s]);
|
|
39
|
+
that.status({
|
|
40
|
+
fill: 'yellow',
|
|
41
|
+
shape: 'dot',
|
|
42
|
+
text: failed ? 'partly connected: ' + errors[failed] : 'partly connected',
|
|
43
|
+
});
|
|
31
44
|
that.currentStatus = 'yellow';
|
|
32
45
|
}
|
|
33
46
|
} else {
|
|
@@ -39,6 +52,9 @@ module.exports = (that, data) => {
|
|
|
39
52
|
that.status({fill: 'green', shape: 'dot', text: 'connected'});
|
|
40
53
|
that.currentStatus = 'green';
|
|
41
54
|
}
|
|
55
|
+
} else if (errors[that.iface]) {
|
|
56
|
+
that.status(error(errors[that.iface]));
|
|
57
|
+
that.currentStatus = 'error';
|
|
42
58
|
} else if (waiting[that.iface]) {
|
|
43
59
|
that.status(WAITING);
|
|
44
60
|
that.currentStatus = 'waiting';
|
|
@@ -66,7 +66,7 @@ Weiteres unter <a target="_blank" href="https://nodered.org/docs/user-guide/cont
|
|
|
66
66
|
</ul>
|
|
67
67
|
<ul>
|
|
68
68
|
<li><b>openccu-lite Port</b>: Nur nötig, wenn der Webserver des Systems nicht auf Port 80 bzw. 443 (TLS) läuft.</li>
|
|
69
|
-
<li><b>openccu-lite Schnittstellen</b>: Wie die Schnittstellenprozesse auf einem openccu-lite-System erreicht werden. <i>auto</i> (Voreinstellung) geht dort über das <b>lite-rpc</b> des Systems - die Aufrufe über seinen Webport, die Ereignisse aus einem Stream, den dieser Node öffnet; ein Abonnent an den Prozessen für alle Programme auf dem System, die Ereignisse werden nach einer Unterbrechung nachgeliefert, kein eigener Callback-Server und kein eigenes <code>init</code> - und auf einer CCU, RaspberryMatic oder OpenCCU den CCU-Weg. Das Zugangsmerkmal ist das openccu-lite-Token oben, auf dem System selbst das eigene Token von RedMatic, das das System dafür erzeugt; ohne eines wird die direkte Verbindung benutzt, das Log sagt es. <i>CCU</i> behält auch auf openccu-lite die direkte Verbindung mit Rückrufen (CUxD geht immer so; lite-rpc trägt es nicht). Ein Flow aus einer Version vor 4.7.0 wird beim ersten Start auf openccu-lite einmal auf lite-rpc umgestellt - das Log sagt es - und eine hier getroffene Wahl ändert keine spätere Version mehr. Die Nodes sysvar, program, script und poll bleiben auf openccu-lite so oder so ohne Funktion.</li>
|
|
69
|
+
<li><b>openccu-lite Schnittstellen</b>: Wie die Schnittstellenprozesse auf einem openccu-lite-System erreicht werden. <i>auto</i> (Voreinstellung) geht dort über das <b>lite-rpc</b> des Systems - die Aufrufe über seinen Webport, die Ereignisse aus einem Stream, den dieser Node öffnet; ein Abonnent an den Prozessen für alle Programme auf dem System, die Ereignisse werden nach einer Unterbrechung nachgeliefert, kein eigener Callback-Server und kein eigenes <code>init</code> - und auf einer CCU, RaspberryMatic oder OpenCCU den CCU-Weg. Das Zugangsmerkmal ist das openccu-lite-Token oben, auf dem System selbst das eigene Token von RedMatic, das das System dafür erzeugt; ohne eines, oder mit einem Token ohne <code>rpc:read</code> (eines nur für die Namen), wird die direkte Verbindung benutzt, das Log sagt es; lite-rpc braucht <code>rpc:read</code> für die Ereignisse und <code>rpc:operate</code> für Befehle. <i>CCU</i> behält auch auf openccu-lite die direkte Verbindung mit Rückrufen (CUxD geht immer so; lite-rpc trägt es nicht). Ein Flow aus einer Version vor 4.7.0 wird beim ersten Start auf openccu-lite einmal auf lite-rpc umgestellt - das Log sagt es - und eine hier getroffene Wahl ändert keine spätere Version mehr. Die Nodes sysvar, program, script und poll bleiben auf openccu-lite so oder so ohne Funktion.</li>
|
|
70
70
|
</ul>
|
|
71
71
|
<ul>
|
|
72
72
|
<li><b>Device data / Re-read device data</b>: Liest die Geräteliste jeder verbundenen Schnittstelle neu ein.
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
<li><b>Context Store</b>: The Node-RED context store the states of all devices and variables are kept in. See <a target="_blank" href="https://nodered.org/docs/user-guide/context">Working with context</a> in the Node-RED documentation.</li>
|
|
29
29
|
<li><b>openccu-lite token</b>: Only for <a href="https://github.com/hobbyquaker/openccu-lite" target="_blank">openccu-lite</a>, a CCU firmware without ReGaHSS. Names, rooms and functions come from the system's metadata API there, which needs a token made under <i>Users</i> on the system. When Node-RED runs on the system itself (RedMatic) the field stays empty: the local token is read automatically. The token is kept, like the password, in Node-RED's credentials (encrypted in <code>flows_cred.json</code>, never in the flow, never in an export). A CCU, RaspberryMatic or OpenCCU ignores the field. openccu-lite has no system variables, programs or HM-Script; those nodes stay in the flow and report an error per message.</li>
|
|
30
30
|
<li><b>openccu-lite port</b>: Only needed when the system's web server is not on port 80 (443 with TLS).</li>
|
|
31
|
-
<li><b>openccu-lite interfaces</b>: How the interface processes are reached on an openccu-lite system. <i>auto</i> (the default) goes through the system's <b>lite-rpc</b> there - the requests over its web port, the events from a stream this node opens, one subscriber at the processes for every program on the system, the events replayed after a break, no callback server and no <code>init</code> of its own - and the CCU way on a CCU, RaspberryMatic or OpenCCU. The credential is the openccu-lite token above, or on the system itself RedMatic's own token, which the system mints for it; without one the direct connection is used and the log says so. <i>CCU</i> keeps the direct connection with callbacks on openccu-lite as well (CUxD always goes that way; lite-rpc does not carry it). A flow from before 4.7.0 is moved to lite-rpc once at its first start on openccu-lite - the log says so - and a choice made here is never changed by a later version. The sysvar, program, script and poll nodes stay unavailable on openccu-lite either way.</li>
|
|
31
|
+
<li><b>openccu-lite interfaces</b>: How the interface processes are reached on an openccu-lite system. <i>auto</i> (the default) goes through the system's <b>lite-rpc</b> there - the requests over its web port, the events from a stream this node opens, one subscriber at the processes for every program on the system, the events replayed after a break, no callback server and no <code>init</code> of its own - and the CCU way on a CCU, RaspberryMatic or OpenCCU. The credential is the openccu-lite token above, or on the system itself RedMatic's own token, which the system mints for it; without one, or with a token that lacks <code>rpc:read</code> (one made for the names alone), the direct connection is used and the log says so; lite-rpc needs <code>rpc:read</code> for events and <code>rpc:operate</code> for commands. <i>CCU</i> keeps the direct connection with callbacks on openccu-lite as well (CUxD always goes that way; lite-rpc does not carry it). A flow from before 4.7.0 is moved to lite-rpc once at its first start on openccu-lite - the log says so - and a choice made here is never changed by a later version. The sysvar, program, script and poll nodes stay unavailable on openccu-lite either way.</li>
|
|
32
32
|
<li><b>Device data / Re-read device data</b>: Reads the device list of every connected interface again. New and changed devices (a channel whose type changed, say) get their datapoints fetched anew, removed ones leave the table. A device the CCU reports with a changed type or version is re-read without the button as well. The button needs a deployed connection.</li>
|
|
33
33
|
<li><b>Authentication</b>: Encryption and login for a CCU on the network (Node-RED not on the CCU). Both belong to the CCU's web server, which fronts the interface processes: on a CCU3 TLS and authentication are switched on in the firewall settings, on openccu-lite under <i>Remote access</i> (classic RPC). When Node-RED runs on the system itself (RedMatic; address <code>localhost</code> / <code>127.0.0.1</code>) the processes are reached directly on the loopback, BidCos over BIN-RPC, without TLS and without a login; these settings are then not used.
|
|
34
34
|
<ul>
|