node-red-contrib-ccu 4.4.5 → 4.5.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 +175 -0
- package/README.md +22 -0
- package/nodes/ccu-alexa.html +12 -14
- package/nodes/ccu-connection.html +63 -95
- package/nodes/ccu-connection.js +1009 -127
- package/nodes/ccu-get-value.html +18 -15
- package/nodes/ccu-get-value.js +16 -0
- package/nodes/ccu-homeassistant.html +0 -48
- package/nodes/ccu-mqtt.html +0 -8
- package/nodes/ccu-poll.html +0 -17
- package/nodes/ccu-program.html +0 -53
- package/nodes/ccu-rpc-event.html +0 -34
- package/nodes/ccu-rpc.html +0 -64
- package/nodes/ccu-script.html +0 -8
- package/nodes/ccu-set-value.html +0 -62
- package/nodes/ccu-set-value.js +6 -11
- package/nodes/ccu-signal.html +0 -64
- package/nodes/ccu-switch.html +12 -24
- package/nodes/ccu-sysvar.html +0 -64
- package/nodes/ccu-value.html +23 -95
- package/nodes/ccu-value.js +8 -2
- package/nodes/lib/initretry.js +11 -0
- package/nodes/lib/metaprovider.js +47 -19
- package/nodes/lib/party.js +103 -0
- package/nodes/lib/topic.js +22 -1
- package/nodes/lib/transport.js +80 -0
- package/nodes/locales/de/ccu-alexa.html +4 -0
- package/nodes/locales/de/ccu-connection.html +103 -0
- package/nodes/locales/de/ccu-get-value.html +16 -0
- package/nodes/locales/de/ccu-homeassistant.html +23 -0
- package/nodes/locales/de/ccu-mqtt.html +21 -0
- package/nodes/locales/de/ccu-poll.html +8 -0
- package/nodes/locales/de/ccu-program.html +26 -0
- package/nodes/locales/de/ccu-rpc-event.html +32 -0
- package/nodes/locales/de/ccu-rpc.html +31 -0
- package/nodes/locales/de/ccu-script.html +13 -0
- package/nodes/locales/de/ccu-set-value.html +46 -0
- package/nodes/locales/de/ccu-signal.html +29 -0
- package/nodes/locales/de/ccu-switch.html +18 -0
- package/nodes/locales/de/ccu-sysvar.html +43 -0
- package/nodes/locales/de/ccu-value.html +98 -0
- package/nodes/locales/de/ccu-value.json +1 -0
- package/nodes/locales/en-US/ccu-alexa.html +4 -0
- package/nodes/locales/en-US/ccu-connection.html +41 -0
- package/nodes/locales/en-US/ccu-get-value.html +13 -0
- package/nodes/locales/en-US/ccu-homeassistant.html +23 -0
- package/nodes/locales/en-US/ccu-mqtt.html +21 -0
- package/nodes/locales/en-US/ccu-poll.html +7 -0
- package/nodes/locales/en-US/ccu-program.html +25 -0
- package/nodes/locales/en-US/ccu-rpc-event.html +31 -0
- package/nodes/locales/en-US/ccu-rpc.html +30 -0
- package/nodes/locales/en-US/ccu-script.html +13 -0
- package/nodes/locales/en-US/ccu-set-value.html +45 -0
- package/nodes/locales/en-US/ccu-signal.html +29 -0
- package/nodes/locales/en-US/ccu-switch.html +6 -0
- package/nodes/locales/en-US/ccu-sysvar.html +42 -0
- package/nodes/locales/en-US/ccu-value.html +81 -0
- package/nodes/locales/en-US/ccu-value.json +1 -0
- package/package.json +2 -8
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,181 @@ 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.5.1 (2026-10-02)
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **A burst of `getParamsetDescription Error: XML-RPC fault: Invalid device`
|
|
13
|
+
at the first start after an update** (B-36). A device deleted from the CCU
|
|
14
|
+
while Node-RED was not running stayed in the cached device table
|
|
15
|
+
(`ccu_<host>.json`) and in the values cache (`ccu_values_<host>.json`).
|
|
16
|
+
At the start its paramset descriptions were queued from the cached table;
|
|
17
|
+
hmipserver answered `-2 Invalid device`, a failed description was never
|
|
18
|
+
remembered, so every lookup queued it again (one item per channel and
|
|
19
|
+
paramset, duplicates included), each fault was logged twice without the
|
|
20
|
+
address, and each one threw away and rebuilt the interface's RPC client.
|
|
21
|
+
Seen on a CCU3 after a remote had been replaced: 150 failed calls in 40 s.
|
|
22
|
+
Now a description the interface refuses with a fault is asked for once
|
|
23
|
+
per address and paramset in a run, with one warning that names the
|
|
24
|
+
address, the paramset and the fault (a device paired anew is asked
|
|
25
|
+
again); the queue holds each description key once; `deleteDevices` drops
|
|
26
|
+
the device's queued fetches and its address from the type lists, and the
|
|
27
|
+
values cache is pruned against the device table at the start and a few
|
|
28
|
+
seconds after a `deleteDevices` or the ReGa's value read (the ReGa keeps
|
|
29
|
+
reporting the datapoints of a deleted device). An XML-RPC fault no longer
|
|
30
|
+
closes and recreates the RPC client: only a transport error does; the
|
|
31
|
+
fault is logged once, with the arguments of the call.
|
|
32
|
+
|
|
33
|
+
## 4.5.0 (2026-09-29)
|
|
34
|
+
|
|
35
|
+
### Added
|
|
36
|
+
|
|
37
|
+
- **TLS and authentication for every connection to a CCU on the network**
|
|
38
|
+
(task 5, #27). With _TLS/SSL_ on, all XML-RPC interfaces are reached over
|
|
39
|
+
the CCU's TLS ports (42000, 42001, 42010, 49292; CCU-Jack 2122), the ReGaHSS
|
|
40
|
+
over 48181 and openccu-lite's metadata api over 443; with _Authentication_
|
|
41
|
+
on, the username and password go out as HTTP basic auth on every call, the
|
|
42
|
+
`init` included, to every XML-RPC interface and the ReGaHSS. Both are the
|
|
43
|
+
CCU's web server's - a CCU3 switches them on in its firewall settings,
|
|
44
|
+
openccu-lite under remote access. A local connection (Node-RED on the
|
|
45
|
+
system, `localhost` / `127.0.0.1`) reaches the interface processes directly
|
|
46
|
+
on the loopback and uses neither, whatever the dialog says: https to a plain
|
|
47
|
+
port or credentials in a BIN-RPC frame only broke the connection before;
|
|
48
|
+
the dialog hides the fields for a loopback address and says so. BIN-RPC has
|
|
49
|
+
neither: with TLS on, BidCos-RF goes XML-RPC over TLS even when the hidden
|
|
50
|
+
`bcrfBinRpc` property asked for BIN-RPC (a warning names it); CUxD's BIN-RPC
|
|
51
|
+
never has them. Node-RED's own callback server for the CCU's events stays
|
|
52
|
+
plain HTTP - the CCU presents no credentials and cannot verify our
|
|
53
|
+
certificate; the help text says so and asks for a firewall rule on the
|
|
54
|
+
Node-RED host. Ticking _Authentication_ ticks _TLS/SSL_ with a notice in the
|
|
55
|
+
editor instead of a browser alert. Without _Ignore invalid TLS
|
|
56
|
+
certificates_, the CCU's self-signed certificate is refused, as before.
|
|
57
|
+
|
|
58
|
+
- **One topic template in every node that emits, the value node's input
|
|
59
|
+
takes the emitted shape** (task 6, #39 @psi-4ward). The `get value` node has a _Topic_
|
|
60
|
+
field now, the same `${…}` template as rpc-event, value, sysvar, program,
|
|
61
|
+
rpc and script; empty (the default, and every existing flow) leaves
|
|
62
|
+
`msg.topic` as it came in. The value node's input accepts a datapoint
|
|
63
|
+
address in `msg.topic` in the shape the nodes emit
|
|
64
|
+
(`ccu3/BidCos-RF/OEQ1868878:1/STATE`, `hm/BidCos-RF/OEQ1868878:1/STATE`: the
|
|
65
|
+
last three slash-separated segments) besides the old
|
|
66
|
+
`BidCos-RF.OEQ1868878:1.STATE`, so an event's topic can be fed straight back.
|
|
67
|
+
No default changed: whoever wants one scheme everywhere enters e.g.
|
|
68
|
+
`hm/${Interface}/${channel}/${datapoint}` in each node; the README's _Topics_
|
|
69
|
+
section lists the defaults and the placeholders, the help texts of
|
|
70
|
+
rpc-event, value and get value the placeholders.
|
|
71
|
+
|
|
72
|
+
- **Help texts for every node in German and English, as locale files**
|
|
73
|
+
(task 7, #58). The help moved from inline blocks in the node files into
|
|
74
|
+
`nodes/locales/de/` and `nodes/locales/en-US/`, the layout Node-RED
|
|
75
|
+
documents for node help: the runtime serves one language's text per
|
|
76
|
+
request through the same lookup as its own nodes (`de` and `de-DE` both
|
|
77
|
+
get the German text, everything else the English one) instead of shipping
|
|
78
|
+
every language's block with the node. German is the source; the English texts of the connection,
|
|
79
|
+
value, rpc-event, set-value, sysvar and switch nodes, which were missing or
|
|
80
|
+
one-line stubs, are complete now, the mqtt node's help describes its topics,
|
|
81
|
+
commands and payload formats in both languages, the set-value node's German
|
|
82
|
+
configuration list (empty bullets since 3.x) and the rpc-event node's output
|
|
83
|
+
section are written, and the value nodes link the eQ-3 HmIP device
|
|
84
|
+
documentation for what a datapoint means (@lolli78). A unit test guards
|
|
85
|
+
that every node has both files, that neither is a stub, and that no inline
|
|
86
|
+
help is left.
|
|
87
|
+
|
|
88
|
+
### Fixed
|
|
89
|
+
|
|
90
|
+
- **Writing one party-mode datapoint of an HmIP thermostat reset the other
|
|
91
|
+
two** (task 2, #156 @ben-5555, #161 @lolli78). An HmIP eTRV/WTH takes
|
|
92
|
+
`PARTY_TIME_START`, `PARTY_TIME_END` and `PARTY_SET_POINT_TEMPERATURE` only
|
|
93
|
+
together: a `setValue` of one of them put the others back to
|
|
94
|
+
`1999_11_30 00:00`, so party or holiday mode could not be set from the
|
|
95
|
+
value nodes at all. A write to one of the three through the value or
|
|
96
|
+
set-value node now goes out as one `putParamset` on `VALUES` with all
|
|
97
|
+
three, the other two taken from our own last write, the value cache or a
|
|
98
|
+
`getParamset` read of the channel - the way the WebUI writes them. The two
|
|
99
|
+
times may be given as the device's `YYYY_MM_DD HH:MM` string, a JavaScript
|
|
100
|
+
Date, an ISO string or epoch milliseconds; they are formatted for the device
|
|
101
|
+
in local time. Any other datapoint of the channel is written as before. The
|
|
102
|
+
older HM thermostats (`PARTY_MODE_SUBMIT`) are not covered.
|
|
103
|
+
- **A callback call with an unknown interface id ended Node-RED** (B-32).
|
|
104
|
+
Anything on the system can connect to the connection's callback ports on
|
|
105
|
+
the loopback; a `system.listMethods` without parameters, an `event` with an
|
|
106
|
+
id that is not one of ours, or a `newDevices` list with a malformed entry
|
|
107
|
+
threw inside the RPC server's handler, which runs from an event emitter -
|
|
108
|
+
an uncaught `TypeError`, and the whole Node-RED process exited. Such a call
|
|
109
|
+
is now answered with an empty result (the method list for
|
|
110
|
+
`system.listMethods`) and logged at debug; a throw inside a handler is
|
|
111
|
+
logged as an error and answered instead of ending the process.
|
|
112
|
+
- **A metadata api detection that timed out at start left the connection in
|
|
113
|
+
ReGa mode for good** (B-28). On openccu-lite the connection asks
|
|
114
|
+
`GET /api/meta/v1/version` once at start; when that probe ran into its 5 s
|
|
115
|
+
timeout - on a Raspberry Pi 3 Node-RED's own start blocks the event loop
|
|
116
|
+
long enough for that at every start, on a busy system now and then - the
|
|
117
|
+
connection settled for the ReGaHSS, the ReGa polls failed every 30 s and
|
|
118
|
+
names, rooms and functions stayed empty; the only re-detection ran from rare
|
|
119
|
+
error paths, at most every five minutes. A timeout, a refused connection or
|
|
120
|
+
a 502/503/504 is now taken as "not decided": the ReGa path starts as before,
|
|
121
|
+
the detection is repeated after 1, 2, 4, 8 s and then every 15 s (up to 20
|
|
122
|
+
times, then the five-minute rule again), and the failing ReGa poll asks for
|
|
123
|
+
a re-detection too. A CCU's 404 is still a conclusive "no".
|
|
124
|
+
- **After an hmipserver restart HmIP-RF events stopped for up to ten minutes**
|
|
125
|
+
(B-29). hmipserver forgets its clients when it restarts and does not tell
|
|
126
|
+
them: the `init` had succeeded, nothing failed, and the events simply stopped
|
|
127
|
+
until the 600 s silence timeout called `init` again. The connection now
|
|
128
|
+
pings HmIP-RF after 30 s without an event and, when no event (the PONG)
|
|
129
|
+
arrives within 10 s, subscribes again at once - the interface shows
|
|
130
|
+
_waiting_ meanwhile, one warning names the reason, and the retry of 4.4.4
|
|
131
|
+
covers the time the process is down. A `newDevices` from the restarted
|
|
132
|
+
hmipserver (it sends one about 16 s in) triggers the ping right away, so
|
|
133
|
+
events are back well within a minute. An interface that never delivered an
|
|
134
|
+
event since its `init` is not re-subscribed on a missing PONG alone.
|
|
135
|
+
- **A queued write of the same set point was dropped after the actuator had
|
|
136
|
+
been operated by hand** (B-19, #151 @vigeland). The value node's _Queue_ compared the
|
|
137
|
+
new value with the value cache, and the cache of a control channel
|
|
138
|
+
(HmIP-FROLL/BROLL `:4`, the status lives in `:3`) holds the echo of our own
|
|
139
|
+
last write for good - a blind moved by hand reports no new set point there,
|
|
140
|
+
so the same `1` could never be sent again while Homematic Manager moved the
|
|
141
|
+
blind at once. A cached value that is the echo of our own last write no
|
|
142
|
+
longer dedupes; only a value from another source does. The value node has a
|
|
143
|
+
_Force_ option (and `msg.config.force`), as set-value has it; set-value's
|
|
144
|
+
own pre-check no longer drops a forced write when the cache already holds
|
|
145
|
+
the value.
|
|
146
|
+
|
|
147
|
+
### Security
|
|
148
|
+
|
|
149
|
+
- **The CCU password and the openccu-lite token were stored in plain text in
|
|
150
|
+
`flows.json`** and went out with every exported flow (B-31). Both are
|
|
151
|
+
Node-RED credentials now (`flows_cred.json`, encrypted, never exported).
|
|
152
|
+
A flow written before this version still carries them as plain properties:
|
|
153
|
+
the connection uses them once, moves them into the credentials and warns;
|
|
154
|
+
the editor no longer knows the two properties, so the next deploy removes
|
|
155
|
+
them from `flows.json`. Nothing to do by hand.
|
|
156
|
+
|
|
157
|
+
### Changed
|
|
158
|
+
|
|
159
|
+
- **The device table follows the CCU, and can be re-read by hand** (task 9,
|
|
160
|
+
#146 @guny74, #181 @vore). A device or channel the CCU reports with another TYPE,
|
|
161
|
+
VERSION or FIRMWARE than the cache holds replaces the cached entry, leaves
|
|
162
|
+
its old type list and gets its datapoints fetched again - a channel whose
|
|
163
|
+
type changed in place kept its old datapoints before, until the cache file
|
|
164
|
+
was deleted. The connection node's dialog has a _Re-read device data_
|
|
165
|
+
button that asks every connected interface for its device list again
|
|
166
|
+
(new and changed devices get their datapoints, removed ones go) and
|
|
167
|
+
reports what changed. The editor's channel pickers no longer empty the
|
|
168
|
+
configured channel when the connection is still initialising: they show
|
|
169
|
+
_loading device data_ and ask again.
|
|
170
|
+
- **An interface without devices is watched too** (task 9, old B-11). The
|
|
171
|
+
ping watchdog returned early for an interface with no devices in the
|
|
172
|
+
cache, so such an interface never pinged and never re-initialised after a
|
|
173
|
+
CCU reboot. It pings now, and re-initialises after the ping timeout once
|
|
174
|
+
it has ever delivered an event (a PONG counts) - a process that answers no
|
|
175
|
+
ping at all is not asked to `init` every timeout.
|
|
176
|
+
- **The `listDevices` answer to hmipserver lists the CCU's virtual remote
|
|
177
|
+
control (HmIP-RCV-1) again** (task 13). It was left out since CCU3 firmware
|
|
178
|
+
3.43.15 (2019), whose hmipserver failed on an answer that held it; current
|
|
179
|
+
hmipservers take it, and without it every `init` made hmipserver log a
|
|
180
|
+
_handleIDMigration_ warning and send the whole virtual remote (52
|
|
181
|
+
descriptions) again with `newDevices`.
|
|
182
|
+
|
|
8
183
|
## 4.4.5 (2026-09-26)
|
|
9
184
|
|
|
10
185
|
### Fixed
|
package/README.md
CHANGED
|
@@ -41,6 +41,28 @@ ReGaHSS; the connection node detects this at start (`GET /api/meta/v1/version`),
|
|
|
41
41
|
- **System variables, programs and HM-Script do not exist there.** The `ccu-sysvar`, `ccu-program`, `ccu-script` and
|
|
42
42
|
`ccu-poll` nodes stay in the flows and answer every message with an error.
|
|
43
43
|
|
|
44
|
+
## Topics
|
|
45
|
+
|
|
46
|
+
Every node that emits messages builds `msg.topic` from the same template, configurable per node, with these defaults:
|
|
47
|
+
|
|
48
|
+
| Node | Default topic |
|
|
49
|
+
| --------------- | ------------------------------------------------- |
|
|
50
|
+
| rpc-event | `${CCU}/${Interface}/${channelName}/${datapoint}` |
|
|
51
|
+
| value | `${CCU}/${Interface}/${channel}/${datapoint}` |
|
|
52
|
+
| get value | _(empty: `msg.topic` stays as it came in)_ |
|
|
53
|
+
| sysvar, program | `ReGaHSS/${Name}` |
|
|
54
|
+
| rpc | `${CCU}/${Interface}/${Method}` |
|
|
55
|
+
| script | `${CCU}/${Interface}` |
|
|
56
|
+
|
|
57
|
+
Placeholders are the message's properties, matched case-insensitively: `${CCU}`, `${Interface}`, `${device}`,
|
|
58
|
+
`${deviceName}`, `${deviceType}`, `${channel}`, `${channelName}`, `${channelType}`, `${channelIndex}`, `${datapoint}`,
|
|
59
|
+
`${datapointName}`; `${Name}` for a variable or program, `${Method}` for an RPC call. To get one scheme everywhere -
|
|
60
|
+
`hm/<interface>/<channel>/<datapoint>`, say - enter `hm/${Interface}/${channel}/${datapoint}` in each node; the defaults
|
|
61
|
+
stay as they are so existing flows and subscriptions keep working. The value node's input accepts a datapoint address in
|
|
62
|
+
`msg.topic` either as `iface.channel.datapoint` or in the emitted shape (`ccu3/BidCos-RF/OEQ1868878:1/STATE`,
|
|
63
|
+
`hm/BidCos-RF/OEQ1868878:1/STATE`: the last three segments count), so an event's topic can be fed straight back. The
|
|
64
|
+
`ccu-mqtt` node has its own templates for its MQTT topics.
|
|
65
|
+
|
|
44
66
|
## Home Assistant
|
|
45
67
|
|
|
46
68
|
The `ccu-homeassistant` node publishes
|
package/nodes/ccu-alexa.html
CHANGED
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
let ifacesLoaded = false;
|
|
31
31
|
let ifacesPending = false;
|
|
32
32
|
let ifaceLoadRetries = 5;
|
|
33
|
+
let channelLoadRetries = 30;
|
|
33
34
|
|
|
34
35
|
function loadIfaces(iface, cb) {
|
|
35
36
|
if (ifacesPending) {
|
|
@@ -73,7 +74,16 @@
|
|
|
73
74
|
|
|
74
75
|
const nodeId = $nodeInputCcuConfig.val();
|
|
75
76
|
const url = 'ccu?config=' + nodeId + '&type=channels&iface=' + $nodeInputIface.val();
|
|
76
|
-
$.getJSON(url, d => {
|
|
77
|
+
$.getJSON(url, (d, _status, xhr) => {
|
|
78
|
+
// task 9: an empty list while the connection is still initialising is "not yet",
|
|
79
|
+
// not "nothing" - keep what is configured, say so, and ask again
|
|
80
|
+
if (Object.keys(d).length === 0 && xhr.getResponseHeader('X-CCU-Loading') && channelLoadRetries-- > 0) {
|
|
81
|
+
$nodeInputChannel.attr('placeholder', 'loading device data ...');
|
|
82
|
+
setTimeout(loadConfig, 2000);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
$nodeInputChannel.removeAttr('placeholder');
|
|
77
87
|
data = d;
|
|
78
88
|
autocompleteChannel();
|
|
79
89
|
});
|
|
@@ -124,7 +134,7 @@
|
|
|
124
134
|
|
|
125
135
|
// ${ENV} placeholders are substituted by Node-RED before the node is
|
|
126
136
|
// constructed (subflow parameters, #158) - do not clear them
|
|
127
|
-
if (!/^\$\{[^}]+\}$/.test($nodeInputChannel.val()) && !data[$nodeInputChannel.val().split(' ')[0]]) {
|
|
137
|
+
if (Object.keys(data).length > 0 && !/^\$\{[^}]+\}$/.test($nodeInputChannel.val()) && !data[$nodeInputChannel.val().split(' ')[0]]) {
|
|
128
138
|
$nodeInputChannel.val('');
|
|
129
139
|
}
|
|
130
140
|
}
|
|
@@ -170,21 +180,9 @@
|
|
|
170
180
|
<input type="text" id="node-input-channel">
|
|
171
181
|
</div>
|
|
172
182
|
|
|
173
|
-
|
|
174
183
|
<div class="form-row">
|
|
175
184
|
<label for="node-input-name"><i class="icon-bookmark"></i> Name</label>
|
|
176
185
|
<input type="text" id="node-input-name">
|
|
177
186
|
</div>
|
|
178
187
|
|
|
179
|
-
|
|
180
|
-
</script>
|
|
181
|
-
|
|
182
|
-
<script type="text/x-red" data-help-name="ccu-alexa" lang="de">
|
|
183
|
-
<p>Homematic Geräte mit node-red-contrib-alexa-smart-home verbinden. Am Eingang den Node "alexa smart home v3"
|
|
184
|
-
anschließen, am Ausgang "alexa smart home v3 state".</p>
|
|
185
|
-
</script>
|
|
186
|
-
|
|
187
|
-
<script type="text/x-red" data-help-name="ccu-alexa" lang="en-US">
|
|
188
|
-
<p>Connect Homematic Devices with node-red-contrib-alexa-smart-home. Connect a Node "alexa smart home v3" to the
|
|
189
|
-
input and "alexa smart home v3 state" to the output.</p>
|
|
190
188
|
</script>
|
|
@@ -29,9 +29,7 @@
|
|
|
29
29
|
inSecure: {value: false},
|
|
30
30
|
authentication: {value: false},
|
|
31
31
|
username: {value: ''},
|
|
32
|
-
password: {value: ''},
|
|
33
32
|
|
|
34
|
-
metaToken: {value: ''},
|
|
35
33
|
metaPort: {value: ''},
|
|
36
34
|
|
|
37
35
|
queueTimeout: {value: 5000, required: true},
|
|
@@ -39,6 +37,12 @@
|
|
|
39
37
|
|
|
40
38
|
contextStore: {value: ''}
|
|
41
39
|
},
|
|
40
|
+
// B-31: the CCU password and the openccu-lite token live in Node-RED's
|
|
41
|
+
// credentials (flows_cred.json, encrypted, never exported), not in the flow
|
|
42
|
+
credentials: {
|
|
43
|
+
password: {type: 'password'},
|
|
44
|
+
metaToken: {type: 'password'}
|
|
45
|
+
},
|
|
42
46
|
label() {
|
|
43
47
|
return this.name || this.host;
|
|
44
48
|
},
|
|
@@ -133,17 +137,51 @@
|
|
|
133
137
|
$nodeConfigInputHost.focus();
|
|
134
138
|
}
|
|
135
139
|
}, 250);
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
140
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
141
|
+
// task 5 (#27): credentials without TLS travel in plain text - turning
|
|
142
|
+
// authentication on turns TLS on too (it can be unticked again)
|
|
143
|
+
const $auth = $('#node-config-input-authentication');
|
|
144
|
+
const $tls = $('#node-config-input-tls');
|
|
145
|
+
$auth.on('change', () => {
|
|
146
|
+
if ($auth.is(':checked') && !$tls.is(':checked')) {
|
|
147
|
+
$tls.prop('checked', true);
|
|
148
|
+
RED.notify('TLS/SSL switched on: without it the credentials would be sent in plain text.', {type: 'warning', timeout: 6000});
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
// a loopback address is Node-RED on the system: the interface processes are
|
|
153
|
+
// reached directly, TLS and credentials are not used (lib/localccu.js)
|
|
154
|
+
const isLoopback = host => /^(127\.|localhost$|::1$)/.test(String(host || '').trim());
|
|
155
|
+
const showAuthRows = () => {
|
|
156
|
+
const local = isLoopback($nodeConfigInputHost.val());
|
|
157
|
+
$('#node-config-auth-fields, #node-config-auth-hint').toggle(!local);
|
|
158
|
+
$('#node-config-input-username, #node-config-input-password').closest('.form-row').toggle(!local);
|
|
159
|
+
$('#node-config-auth-local').toggle(local);
|
|
160
|
+
};
|
|
161
|
+
$nodeConfigInputHost.on('change keyup', showAuthRows);
|
|
162
|
+
showAuthRows();
|
|
163
|
+
|
|
164
|
+
// task 9: re-read the device table of the deployed connection
|
|
165
|
+
const $reread = $('#node-config-reread');
|
|
166
|
+
const $rereadStatus = $('#node-config-reread-status');
|
|
167
|
+
$reread.on('click', () => {
|
|
168
|
+
$reread.prop('disabled', true);
|
|
169
|
+
$rereadStatus.text('Re-reading ...');
|
|
170
|
+
$.ajax({url: 'ccu/' + this.id + '/reread', type: 'POST', dataType: 'json'})
|
|
171
|
+
.done(summary => {
|
|
172
|
+
const parts = Object.keys(summary).map(iface => {
|
|
173
|
+
const s = summary[iface];
|
|
174
|
+
return iface + ': ' + (s.error ? s.error : s.total + ' entries (' + s.added + ' new, ' + s.changed + ' changed, ' + s.removed + ' removed)');
|
|
175
|
+
});
|
|
176
|
+
$rereadStatus.text(parts.length > 0 ? parts.join('; ') : 'no interface connected');
|
|
177
|
+
})
|
|
178
|
+
.fail(xhr => {
|
|
179
|
+
$rereadStatus.text(xhr.status === 404 ? 'Deploy this connection first.' : 'Failed: ' + (xhr.responseJSON && xhr.responseJSON.error || xhr.statusText));
|
|
180
|
+
})
|
|
181
|
+
.always(() => $reread.prop('disabled', false));
|
|
182
|
+
});
|
|
145
183
|
}
|
|
146
|
-
}
|
|
184
|
+
});
|
|
147
185
|
|
|
148
186
|
</script>
|
|
149
187
|
|
|
@@ -206,6 +244,13 @@
|
|
|
206
244
|
<label for="node-config-input-rpcPingTimeout"><i class="icon-tag"></i> RPC ping timeout (s)</label>
|
|
207
245
|
<input type="text" id="node-config-input-rpcPingTimeout">
|
|
208
246
|
</div>
|
|
247
|
+
<div class="form-row">
|
|
248
|
+
<label for="node-config-reread"><i class="icon-tag"></i> Device data</label>
|
|
249
|
+
<div style="width: 70%; display: inline-block; vertical-align: text-top;">
|
|
250
|
+
<button type="button" class="red-ui-button" id="node-config-reread">Re-read device data</button><br>
|
|
251
|
+
<small id="node-config-reread-status">Asks every connected interface for its device list again; new and changed devices get their datapoints fetched, removed ones go.</small>
|
|
252
|
+
</div>
|
|
253
|
+
</div>
|
|
209
254
|
<div class="form-row">
|
|
210
255
|
<label for="node-config-input-regaPoll"><i class="icon-tag"></i> Rega poll</label>
|
|
211
256
|
<div style="width: 70%; display: inline-block; vertical-align: text-top;">
|
|
@@ -238,9 +283,13 @@
|
|
|
238
283
|
<div class="form-row">
|
|
239
284
|
<label for="node-config-input-authentication"><i class="icon-tag"></i> Authentication</label>
|
|
240
285
|
<div style="width: 70%; display: inline-block; vertical-align: text-top;">
|
|
241
|
-
<
|
|
242
|
-
|
|
243
|
-
|
|
286
|
+
<span id="node-config-auth-fields">
|
|
287
|
+
<label class="ccu-checkbox"><input type="checkbox" id="node-config-input-authentication"> Enabled</label><br>
|
|
288
|
+
<label class="ccu-checkbox"><input type="checkbox" id="node-config-input-tls"> TLS/SSL</label><br>
|
|
289
|
+
<label class="ccu-checkbox"><input type="checkbox" id="node-config-input-inSecure"> Ignore invalid TLS Certificates</label><br>
|
|
290
|
+
</span>
|
|
291
|
+
<small id="node-config-auth-hint">For a CCU on the network: TLS uses the CCU's 4xxxx ports, the credentials are sent as HTTP basic auth (switch both on in the CCU's firewall settings, on openccu-lite under remote access). Node-RED's own callback server for the CCU's events stays plain HTTP.</small>
|
|
292
|
+
<small id="node-config-auth-local" style="display: none;">Node-RED runs on the system itself: the interface processes are reached directly on the loopback (BIN-RPC for BidCos), without TLS and without credentials. These settings are not used.</small>
|
|
244
293
|
</div>
|
|
245
294
|
</div>
|
|
246
295
|
<div class="form-row">
|
|
@@ -262,84 +311,3 @@
|
|
|
262
311
|
<small>Only needed when the box's web server is not on the default port.</small>
|
|
263
312
|
</div>
|
|
264
313
|
</script>
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
<script type="text/x-red" data-help-name="ccu-connection" lang="de-DE">
|
|
270
|
-
<p>Im Connection Node wird die Verbindung zu den CCU Schnittstellenprozessen und zur Logikschicht verwaltet.</p>
|
|
271
|
-
<h3>Konfiguration</h3>
|
|
272
|
-
<ul>
|
|
273
|
-
<li><b>Name</b>: Frei wählbarer Name für die aktuelle CCU-Konfiguration. Er dient zur Unterscheidung falls mehrere CCUs an RedMatic angebunden werden und erscheint in allen anderen CCU Nodes.</li>
|
|
274
|
-
</ul>
|
|
275
|
-
<ul>
|
|
276
|
-
<li><b>CCU Address</b>: Die IP-Adresse oder der Hostname der CCU. Wird das CCU-Addon RedMatic genutzt, läuft Node-RED auf dem selben Server weshalb die Loopback-Adresse <code>localhost</code> bzw. <code>127.0.0.1</code> gewählt werden kann.</li>
|
|
277
|
-
</ul>
|
|
278
|
-
<ul>
|
|
279
|
-
<li><b>Listen Address</b>: Die IP-Adresse des Netzwerk-Interfaces auf welchem die RedMatic RPC Server "lauschen" sollen. Läuft RedMatic auf der CCU wird hier ebenfalls <code>localhost</code> bzw. <code>127.0.0.1</code> verwendet. Um auf allen Interfaces zu lauschen kann <code>0.0.0.0</code> verwendet werden.</li>
|
|
280
|
-
</ul>
|
|
281
|
-
<ul>
|
|
282
|
-
<li><b>Init Address</b>: entspricht normalerweise <i>Listen address</i>, Die Adresse unter der Node-RED von der
|
|
283
|
-
CCU aus erreichbar ist. Das Eingabefeld kann leer gelassen werden.</p>
|
|
284
|
-
<p>Für fortgeschrittene User: Wenn auf allen Interfaces gelauscht wird (Adresse 0.0.0.0) oder wenn Node-RED in
|
|
285
|
-
einem Container (z.B. Docker) mit NAT-Netzwerk läuft oder in anderen spezielleren Netzwerkumgebungen kann es
|
|
286
|
-
notwendig sein <i>Init address</i> und <i>Listen Address</i> auf unterschiedliche Werte zu setzen.</li>
|
|
287
|
-
</ul>
|
|
288
|
-
<ul>
|
|
289
|
-
<li><b>BinRPC Port</b>: Der Port des RedMatic BinRPC Dienstes an den die CCU Events schickt. Werden Verbindungen zu mehreren CCUs hergestellt (mehrere instanzen des ccu-configuration Node) braucht jede Verbindung einen exklusiven Port.</li>
|
|
290
|
-
</ul>
|
|
291
|
-
<ul>
|
|
292
|
-
<li><b>XMLRPC Port</b>: Der Port des RedMatic XMLRPC Dienstes an den die CCU Events schickt. Werden Verbindungen zu mehreren CCUs hergestellt braucht jede Verbindung einen exklusiven Port.</li>
|
|
293
|
-
</ul>
|
|
294
|
-
<ul>
|
|
295
|
-
<li><b>Interfaces</b>: Hier können die zu verwendenden Schnittstellen angegeben werden. Nutzt man Beispielsweise keinen CUxD oder HmIP Geräte, kann der Haken entfernt werden was die entsprechenden ungenutzten Komponenten deaktiviert.
|
|
296
|
-
<ul>
|
|
297
|
-
<li>ReGaHSS: Die Logikschicht der CCU, verwaltet CCU-Programme und CCU-Systemvariablen</li>
|
|
298
|
-
<li>BidCos-RF: Homematic Funk</li>
|
|
299
|
-
<li>BidCos-Wired: Homematic Wired</li>
|
|
300
|
-
<li>HmIP-RF: Homematic-IP Funk</li>
|
|
301
|
-
<li>VirtualDevices: Heizungsgruppen, in CCU eingebundene Systeme wie Osram Lightify</li>
|
|
302
|
-
<li>CUxD</li>
|
|
303
|
-
<li>CCU-Jack: XMLRPC-Schnittstelle des <a href="https://github.com/mdzio/ccu-jack" target="_blank">CCU-Jack</a> Addons (Port konfigurierbar, Standard 2121 bzw. 2122 mit TLS)</li>
|
|
304
|
-
</ul>
|
|
305
|
-
|
|
306
|
-
</li>
|
|
307
|
-
</ul>
|
|
308
|
-
<ul>
|
|
309
|
-
<li><b>RPC Ping-Timeout</b>: Zeitinterval in Sekunden in dem die Verbindung zu den Schnittstellenprozessen geprüft wird.</li>
|
|
310
|
-
</ul>
|
|
311
|
-
<ul>
|
|
312
|
-
<li><b>ReGaHSS Polling</b>: Änderungen von CCU-Systemvariablen werden nicht automatisch an RedMatic übermittelt. Mit aktiviertem Polling fragt RedMatic die Variablen und deren Werte in den per Poll-Interval eingestellten Zeitintervallen ab.</li>
|
|
313
|
-
</ul>
|
|
314
|
-
<ul>
|
|
315
|
-
<li><b>ReGaHSS Poll-Interval</b>:
|
|
316
|
-
Das Zeitintervall in Sekunden in dem Systemvariablen von der CCU abgefragt werden.</li>
|
|
317
|
-
</ul>
|
|
318
|
-
<ul>
|
|
319
|
-
<li><b>Context-Store</b>: Hier wird der Node-RED Context-Store festgelegt in dem RedMatic die Zustände aller Geräte/Variablen vorhält.
|
|
320
|
-
|
|
321
|
-
Weiteres unter <a target="_blank" href="https://nodered.org/docs/user-guide/context">Working</a> with context in der Node-RED Dokumentation.</li>
|
|
322
|
-
</ul>
|
|
323
|
-
<ul>
|
|
324
|
-
<li><b>openccu-lite Token</b>: Nur für <a href="https://github.com/hobbyquaker/openccu-lite" target="_blank">openccu-lite</a>,
|
|
325
|
-
eine CCU-Firmware ohne ReGaHSS. Namen, Räume und Gewerke kommen dort aus der Metadaten-API der Box;
|
|
326
|
-
dafür wird ein Token benötigt, das auf der Box unter <i>Benutzer</i> erzeugt wird. Läuft Node-RED
|
|
327
|
-
auf der Box selbst (RedMatic), bleibt das Feld leer – das lokale Token wird dann automatisch gelesen.
|
|
328
|
-
Eine CCU/RaspberryMatic/OpenCCU ignoriert das Feld vollständig. Systemvariablen, Programme und
|
|
329
|
-
HM-Scripte gibt es auf openccu-lite nicht; die entsprechenden Nodes bleiben im Flow, melden aber pro
|
|
330
|
-
Nachricht einen Fehler.</li>
|
|
331
|
-
</ul>
|
|
332
|
-
<ul>
|
|
333
|
-
<li><b>openccu-lite Port</b>: Nur nötig, wenn der Webserver der Box nicht auf Port 80 bzw. 443 (TLS) läuft.</li>
|
|
334
|
-
</ul>
|
|
335
|
-
<ul>
|
|
336
|
-
<li><b>Authentication</b>: Hier kann angegeben werden wie mit der CCU Kommuniziert werden soll.</li>
|
|
337
|
-
<ul>
|
|
338
|
-
<li>Enabled: Es soll via Benutzer/Passwort kommuniziert werden</li>
|
|
339
|
-
<li>TLS/SSL: Aktiviert die Transportverschlüsselung</li>
|
|
340
|
-
<li>Ignore invalid TLS Certificates: Node-RED akzeptiert nicht vertrauenswürdige Zertifikate. Notwendig wenn die CCU kein vertrauenswürdiges Zertifikat hat.</li>
|
|
341
|
-
<li>Username: Ein Benutzer der sich an der CCU anmelden darf.</li>
|
|
342
|
-
<li>Password: Das Passwort des Benutzers.</li>
|
|
343
|
-
</ul>
|
|
344
|
-
</ul>
|
|
345
|
-
</script>
|