node-red-contrib-ccu 4.16.0 → 4.17.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 +20 -0
- package/README.md +12 -10
- package/nodes/ccu-connection.js +57 -0
- package/nodes/ccu-program.html +1 -1
- package/nodes/ccu-sysvar.html +1 -1
- package/nodes/locales/de/ccu-program.html +5 -0
- package/nodes/locales/de/ccu-sysvar.html +6 -1
- package/nodes/locales/en-US/ccu-program.html +5 -0
- package/nodes/locales/en-US/ccu-sysvar.html +6 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,26 @@ 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.17.0 (2026-11-28)
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- **sysvar and program: new default topics** `hm/status/sysvar/${Name}` and
|
|
13
|
+
`hm/status/program/${Name}` (both were `ReGaHSS/${Name}`). They apply to
|
|
14
|
+
newly placed nodes; nodes already in a flow keep the topic they were saved
|
|
15
|
+
with.
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- **openccu-lite: a system variable or program made in the Logic addon while
|
|
20
|
+
Node-RED runs was missing** from the sysvar and program nodes' lists, and
|
|
21
|
+
their nodes did not find it, until its value was first written (a computed
|
|
22
|
+
value: until its inputs changed) or Node-RED was restarted. The connection
|
|
23
|
+
took a Logic object only from a value event, and Logic announces a new one
|
|
24
|
+
without. Now its values are read as soon as Logic announces it, so it is
|
|
25
|
+
listed at once - first under its key if the name is not there yet, then
|
|
26
|
+
under its name, and after a rename under the new one.
|
|
27
|
+
|
|
8
28
|
## 4.16.0 (2026-11-28)
|
|
9
29
|
|
|
10
30
|
### Added
|
package/README.md
CHANGED
|
@@ -72,20 +72,22 @@ CCU-Jack keep their own connections.
|
|
|
72
72
|
|
|
73
73
|
Every node that emits messages builds `msg.topic` from the same template, configurable per node, with these defaults:
|
|
74
74
|
|
|
75
|
-
| Node
|
|
76
|
-
|
|
|
77
|
-
| rpc-event
|
|
78
|
-
| value
|
|
79
|
-
| get value
|
|
80
|
-
| sysvar
|
|
81
|
-
|
|
|
82
|
-
|
|
|
75
|
+
| Node | Default topic |
|
|
76
|
+
| --------- | ------------------------------------------------- |
|
|
77
|
+
| rpc-event | `${CCU}/${Interface}/${channelName}/${datapoint}` |
|
|
78
|
+
| value | `${CCU}/${Interface}/${channel}/${datapoint}` |
|
|
79
|
+
| get value | _(empty: `msg.topic` stays as it came in)_ |
|
|
80
|
+
| sysvar | `hm/status/sysvar/${Name}` |
|
|
81
|
+
| program | `hm/status/program/${Name}` |
|
|
82
|
+
| rpc | `${CCU}/${Interface}/${Method}` |
|
|
83
|
+
| script | `${CCU}/${Interface}` |
|
|
83
84
|
|
|
84
85
|
Placeholders are the message's properties, matched case-insensitively: `${CCU}`, `${Interface}`, `${device}`,
|
|
85
86
|
`${deviceName}`, `${deviceType}`, `${channel}`, `${channelName}`, `${channelType}`, `${channelIndex}`, `${datapoint}`,
|
|
86
87
|
`${datapointName}`; `${Name}` for a variable or program, `${Method}` for an RPC call. To get one scheme everywhere -
|
|
87
|
-
`hm/<interface>/<channel>/<datapoint>`, say - enter `hm/${Interface}/${channel}/${datapoint}` in each node
|
|
88
|
-
|
|
88
|
+
`hm/<interface>/<channel>/<datapoint>`, say - enter `hm/${Interface}/${channel}/${datapoint}` in each node. A default
|
|
89
|
+
applies to newly placed nodes only: existing nodes keep the topic they were saved with (the default of the sysvar
|
|
90
|
+
and program nodes was `ReGaHSS/${Name}` until 4.16.0), so existing flows and subscriptions keep working. The value node's input accepts a datapoint address in
|
|
89
91
|
`msg.topic` either as `iface.channel.datapoint` or in the emitted shape (`ccu3/BidCos-RF/OEQ1868878:1/STATE`,
|
|
90
92
|
`hm/BidCos-RF/OEQ1868878:1/STATE`: the last three segments count), so an event's topic can be fed straight back. The
|
|
91
93
|
`ccu-mqtt` node has its own templates for its MQTT topics.
|
package/nodes/ccu-connection.js
CHANGED
|
@@ -792,6 +792,8 @@ module.exports = function (RED) {
|
|
|
792
792
|
this.liteListed = false;
|
|
793
793
|
this.logicObjects = {};
|
|
794
794
|
this.logicWaiters = [];
|
|
795
|
+
// B-52: the state store's picture was taken - Logic objects announced after it are read
|
|
796
|
+
this.litePictured = false;
|
|
795
797
|
this.metaMode = false;
|
|
796
798
|
this.meta = null;
|
|
797
799
|
// #167: minutes between re-reads of channel names, rooms and
|
|
@@ -3126,6 +3128,7 @@ module.exports = function (RED) {
|
|
|
3126
3128
|
}
|
|
3127
3129
|
});
|
|
3128
3130
|
this.logicPictureDone();
|
|
3131
|
+
this.litePictured = true;
|
|
3129
3132
|
this.logger.debug('lite-rpc: ' + count + ' values from the state store');
|
|
3130
3133
|
this.cachedValuesReceived = true;
|
|
3131
3134
|
this.saveValues();
|
|
@@ -3413,6 +3416,56 @@ module.exports = function (RED) {
|
|
|
3413
3416
|
}
|
|
3414
3417
|
}
|
|
3415
3418
|
|
|
3419
|
+
/**
|
|
3420
|
+
* B-52: Logic announced variables or programs (newDevices): one made after the start has no
|
|
3421
|
+
* value event until it is written, so it would be missing from the editor's lists and from
|
|
3422
|
+
* its nodes until then. Its datapoints are read once, as the start's picture would have
|
|
3423
|
+
* given them. The objects of the connect itself come with the picture and are skipped.
|
|
3424
|
+
* @param {Array<object>} devices the descriptions of the newDevices call
|
|
3425
|
+
*/
|
|
3426
|
+
logicAnnounced(devices) {
|
|
3427
|
+
if (!this.litePictured || !this.logicIface || !Array.isArray(devices)) {
|
|
3428
|
+
return;
|
|
3429
|
+
}
|
|
3430
|
+
|
|
3431
|
+
const iface = this.logicIface;
|
|
3432
|
+
devices.forEach((device) => {
|
|
3433
|
+
const ref = logic.parseAddress(device && device.ADDRESS);
|
|
3434
|
+
if (!ref || this.logicObjects[ref.channel]) {
|
|
3435
|
+
return;
|
|
3436
|
+
}
|
|
3437
|
+
|
|
3438
|
+
this.methodCall(iface, 'getParamset', [ref.channel, 'VALUES'], {quiet: true})
|
|
3439
|
+
.then((values) => {
|
|
3440
|
+
if (iface !== this.logicIface || this.logicObjects[ref.channel]) {
|
|
3441
|
+
// an event came first, or the addon went
|
|
3442
|
+
return;
|
|
3443
|
+
}
|
|
3444
|
+
|
|
3445
|
+
const paramset = values && typeof values === 'object' ? values : {};
|
|
3446
|
+
const ts = now();
|
|
3447
|
+
if (ref.kind === 'variable') {
|
|
3448
|
+
this.logicValue(iface, ref.channel, 'VALUE', paramset.VALUE, {ts, picture: true});
|
|
3449
|
+
} else {
|
|
3450
|
+
this.updateLogicProgram(ref, {active: Boolean(paramset.ACTIVE)}, ts, true);
|
|
3451
|
+
this.logicPictureDone();
|
|
3452
|
+
}
|
|
3453
|
+
|
|
3454
|
+
this.logger.debug(
|
|
3455
|
+
'Logic',
|
|
3456
|
+
ref.channel,
|
|
3457
|
+
'announced:',
|
|
3458
|
+
JSON.stringify(this.logicObjects[ref.channel] && this.logicObjects[ref.channel].name),
|
|
3459
|
+
);
|
|
3460
|
+
})
|
|
3461
|
+
.catch((error) => {
|
|
3462
|
+
this.logger.warn(
|
|
3463
|
+
'Logic: ' + ref.channel + ' announced but not readable: ' + (error.message || error),
|
|
3464
|
+
);
|
|
3465
|
+
});
|
|
3466
|
+
});
|
|
3467
|
+
}
|
|
3468
|
+
|
|
3416
3469
|
/**
|
|
3417
3470
|
* task 32: the entry of a Logic object under its current name in `table` (this.sysvar or
|
|
3418
3471
|
* this.program): a rename moves it, a name another object holds is not taken over.
|
|
@@ -5010,6 +5063,10 @@ module.exports = function (RED) {
|
|
|
5010
5063
|
this.saveMetadata();
|
|
5011
5064
|
}
|
|
5012
5065
|
|
|
5066
|
+
if (iface && iface === this.logicIface) {
|
|
5067
|
+
this.logicAnnounced(devices);
|
|
5068
|
+
}
|
|
5069
|
+
|
|
5013
5070
|
// B-37: a restart that kept the subscription gets a fresh init, no ping
|
|
5014
5071
|
if (iface && !this.keptSubscription(iface, 'newDevices')) {
|
|
5015
5072
|
this.deviceCallback(iface);
|
package/nodes/ccu-program.html
CHANGED
package/nodes/ccu-sysvar.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
defaults: {
|
|
6
6
|
name: {value: ''},
|
|
7
7
|
ccuConfig: {value: 'localhost', type: 'ccu-connection', required: true},
|
|
8
|
-
topic: {value: '
|
|
8
|
+
topic: {value: 'hm/status/sysvar/${Name}'},
|
|
9
9
|
change: {value: true},
|
|
10
10
|
cache: {value: true},
|
|
11
11
|
property: {value: 'payload'},
|
|
@@ -28,4 +28,9 @@
|
|
|
28
28
|
</dl>
|
|
29
29
|
</li>
|
|
30
30
|
</ol>
|
|
31
|
+
|
|
32
|
+
<h3>Topic</h3>
|
|
33
|
+
<p><code>msg.topic</code> wird aus dem Feld <i>Topic</i> gebildet; <code>${Name}</code> steht für den Namen des Programms.
|
|
34
|
+
Ein neu platzierter Node hat <code>hm/status/program/${Name}</code>; ein schon vorhandener Node behält sein Topic
|
|
35
|
+
(<code>ReGaHSS/${Name}</code> bis 4.16.0).</p>
|
|
31
36
|
</script>
|
|
@@ -35,12 +35,17 @@
|
|
|
35
35
|
"lc": 1525197999611,
|
|
36
36
|
"enum": ["nicht anwesend", "anwesend"],
|
|
37
37
|
"id": 950,
|
|
38
|
-
"topic": "
|
|
38
|
+
"topic": "hm/status/sysvar/Anwesenheit"
|
|
39
39
|
}
|
|
40
40
|
</code></pre>
|
|
41
41
|
</li>
|
|
42
42
|
</ol>
|
|
43
43
|
|
|
44
|
+
<h3>Topic</h3>
|
|
45
|
+
<p><code>msg.topic</code> wird aus dem Feld <i>Topic</i> gebildet; <code>${Name}</code> steht für den Namen der Variable.
|
|
46
|
+
Ein neu platzierter Node hat <code>hm/status/sysvar/${Name}</code>; ein schon vorhandener Node behält sein Topic
|
|
47
|
+
(<code>ReGaHSS/${Name}</code> bis 4.16.0).</p>
|
|
48
|
+
|
|
44
49
|
<h3>Dynamische Konfiguration</h3>
|
|
45
50
|
<p><code>msg.config</code> ist ein Objekt, dessen Eigenschaften die Konfiguration dieses Nodes für genau diese Nachricht überschreiben. Die gespeicherte Konfiguration bleibt unverändert.</p>
|
|
46
51
|
<ul>
|
|
@@ -27,4 +27,9 @@
|
|
|
27
27
|
</dl>
|
|
28
28
|
</li>
|
|
29
29
|
</ol>
|
|
30
|
+
|
|
31
|
+
<h3>Topic</h3>
|
|
32
|
+
<p><code>msg.topic</code> is built from the <i>Topic</i> field; <code>${Name}</code> stands for the program's name.
|
|
33
|
+
A newly placed node has <code>hm/status/program/${Name}</code>; a node placed before keeps the topic it has
|
|
34
|
+
(<code>ReGaHSS/${Name}</code> until 4.16.0).</p>
|
|
30
35
|
</script>
|
|
@@ -34,12 +34,17 @@
|
|
|
34
34
|
"lc": 1525197999611,
|
|
35
35
|
"enum": ["absent", "present"],
|
|
36
36
|
"id": 950,
|
|
37
|
-
"topic": "
|
|
37
|
+
"topic": "hm/status/sysvar/Presence"
|
|
38
38
|
}
|
|
39
39
|
</code></pre>
|
|
40
40
|
</li>
|
|
41
41
|
</ol>
|
|
42
42
|
|
|
43
|
+
<h3>Topic</h3>
|
|
44
|
+
<p><code>msg.topic</code> is built from the <i>Topic</i> field; <code>${Name}</code> stands for the variable's name.
|
|
45
|
+
A newly placed node has <code>hm/status/sysvar/${Name}</code>; a node placed before keeps the topic it has
|
|
46
|
+
(<code>ReGaHSS/${Name}</code> until 4.16.0).</p>
|
|
47
|
+
|
|
43
48
|
<h3>Dynamic configuration</h3>
|
|
44
49
|
<p><code>msg.config</code> is an object whose properties override this node's configuration for that one message. The stored configuration is never modified.</p>
|
|
45
50
|
<ul>
|