node-red-contrib-ccu 4.17.1 → 4.18.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 CHANGED
@@ -5,6 +5,21 @@ 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.18.0 (2026-11-30)
9
+
10
+ ### Added
11
+
12
+ - **The alarm node for openccu-lite's alarm system.** `ccu-alarm` follows one
13
+ area of the alarm system addon: its state as Home Assistant names it
14
+ (`disarmed`, `arming`, `armed_home`, `armed_away`, `pending`, `triggered`)
15
+ in `msg.payload`, with `msg.alarm` (active, kind, sensor), `ready`,
16
+ `openSensors`, `delay` and `prealarm`, one message per change; and it takes
17
+ `arm_home`, `arm_away`, `disarm`, `silence`, `acknowledge` and `panic` (Home
18
+ Assistant's service names as well). The editor lists only the system's
19
+ alarm areas. A command the area refuses because its switch _Scharf/Unscharf
20
+ über lite-rpc erlauben_ is off shows on the node and in an error that names
21
+ the switch and where to set it; a panic alarm needs no switch.
22
+
8
23
  ## 4.17.1 (2026-11-29)
9
24
 
10
25
  ### Fixed
package/README.md CHANGED
@@ -67,6 +67,16 @@ CCU-Jack keep their own connections.
67
67
  on the system, or a paired connection); without the addon the nodes show _Logic addon not installed_ and a write
68
68
  is refused with that reason. `ccu-poll` has nothing to poll there (the values are events). **HM-Script does not
69
69
  exist there**: the `ccu-script` node stays in the flows and answers every message with an error.
70
+ - **Alarm areas come from the alarm system addon.** It offers each area as a device `area-<key>` (type `ALARM-AREA`)
71
+ of its interface `Alarm`, followed like Logic's without a checkbox, so the value and event nodes reach an area like
72
+ any device. The `ccu-alarm` node is made for it: pick an area (the editor lists only alarm areas), and it emits the
73
+ area's state as Home Assistant names it (`disarmed`, `arming`, `armed_home`, `armed_away`, `pending`, `triggered`)
74
+ with the alarm (kind, sensor), readiness, open sensors, delay and pre-alarm in one message per change; it takes
75
+ `arm_home`, `arm_away`, `disarm`, `silence`, `acknowledge` and `panic` in `msg.payload`. The alarm system decides
76
+ what a command may do: arming, disarming, silencing and acknowledging are refused until the area's switch
77
+ _Scharf/Unscharf über lite-rpc erlauben_ (_Allow arming and disarming over lite-rpc_) is on - the node shows
78
+ _refused: lite-rpc switch off_ and its error names the switch -, arming is refused while sensors are open, and a
79
+ panic alarm always works.
70
80
 
71
81
  ## Topics
72
82
 
@@ -79,12 +89,13 @@ Every node that emits messages builds `msg.topic` from the same template, config
79
89
  | get value | _(empty: `msg.topic` stays as it came in)_ |
80
90
  | sysvar | `hm/status/sysvar/${Name}` |
81
91
  | program | `hm/status/program/${Name}` |
92
+ | alarm | `hm/status/alarm/${Name}` |
82
93
  | rpc | `${CCU}/${Interface}/${Method}` |
83
94
  | script | `${CCU}/${Interface}` |
84
95
 
85
96
  Placeholders are the message's properties, matched case-insensitively: `${CCU}`, `${Interface}`, `${device}`,
86
97
  `${deviceName}`, `${deviceType}`, `${channel}`, `${channelName}`, `${channelType}`, `${channelIndex}`, `${datapoint}`,
87
- `${datapointName}`; `${Name}` for a variable or program, `${Method}` for an RPC call. To get one scheme everywhere -
98
+ `${datapointName}`; `${Name}` for a variable, program or alarm area, `${Method}` for an RPC call. To get one scheme everywhere -
88
99
  `hm/<interface>/<channel>/<datapoint>`, say - enter `hm/${Interface}/${channel}/${datapoint}` in each node. A default
89
100
  applies to newly placed nodes only: existing nodes keep the topic they were saved with (the default of the sysvar
90
101
  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
@@ -0,0 +1,124 @@
1
+ <script type="text/javascript">
2
+ RED.nodes.registerType('ccu-alarm', {
3
+
4
+ category: 'ccu',
5
+ defaults: {
6
+ name: {value: ''},
7
+ ccuConfig: {value: 'localhost', type: 'ccu-connection', required: true},
8
+ area: {value: '', required: true, validate: RED.validators.regex(/^area-[^:\s]+$/)},
9
+ topic: {value: 'hm/status/alarm/${Name}'},
10
+ cache: {value: true}
11
+ },
12
+ inputs: 1,
13
+ outputs: 1,
14
+ icon: 'ccu.png',
15
+ color: '#E2A3A3',
16
+ paletteLabel: 'alarm',
17
+ align: 'left',
18
+ label() {
19
+ return this.name || this.area || 'alarm';
20
+ },
21
+ labelStyle() {
22
+ return this.name ? 'node_label_italic' : '';
23
+ },
24
+ oneditprepare() {
25
+ const $area = $('#node-input-area');
26
+ const $select = $('#select-input-area');
27
+ const $tip = $('#ccu-alarm-none');
28
+ const current = this.area;
29
+ let request = 0;
30
+
31
+ function load(nodeId) {
32
+ // the dialog's own change event of the CCU field loads a second time: only the last
33
+ // answer fills the list
34
+ const mine = ++request;
35
+ if (!nodeId || nodeId === '_ADD_') {
36
+ $select.html('').hide();
37
+ $tip.hide();
38
+ $area.show();
39
+ return;
40
+ }
41
+
42
+ // task 38: only the alarm addon's areas (devices of the type ALARM-AREA)
43
+ $.getJSON('ccu?type=alarm&config=' + nodeId, data => {
44
+ if (mine !== request) {
45
+ return;
46
+ }
47
+
48
+ const want = $select.is(':visible') ? $select.val() : $area.val() || current;
49
+ $select.html('');
50
+ const addresses = Object.keys(data || {}).sort((a, b) =>
51
+ String(data[a].name).localeCompare(String(data[b].name)));
52
+ if (addresses.length === 0) {
53
+ $select.hide();
54
+ $area.show();
55
+ $tip.show();
56
+ return;
57
+ }
58
+
59
+ $tip.hide();
60
+ if (want && !addresses.includes(want)) {
61
+ $select.append($('<option>').val(want).text(want + ' (not on the system)'));
62
+ }
63
+
64
+ addresses.forEach(address => {
65
+ $select.append($('<option>').val(address).text(data[address].name + ' (' + address + ')'));
66
+ });
67
+ $select.val(want || addresses[0]);
68
+ $area.hide();
69
+ $select.show();
70
+ }).fail(() => {
71
+ if (mine === request) {
72
+ $tip.show();
73
+ }
74
+ });
75
+ }
76
+
77
+ load(this.ccuConfig);
78
+ $('#node-input-ccuConfig').change(() => load($('#node-input-ccuConfig').val()));
79
+ },
80
+ oneditsave() {
81
+ const $select = $('#select-input-area');
82
+ if ($select.is(':visible')) {
83
+ $('#node-input-area').val($select.val());
84
+ }
85
+ }
86
+ });
87
+ </script>
88
+
89
+ <script type="text/html" data-template-name="ccu-alarm">
90
+ <style>
91
+ label.ccu-checkbox {
92
+ display: block !important;
93
+ width: auto !important;
94
+ }
95
+ label.ccu-checkbox input {
96
+ width: auto !important;
97
+ margin-top: -3px !important;
98
+ }
99
+ select.ccu-dropdown {
100
+ width: 70%;
101
+ }
102
+ </style>
103
+ <div class="form-row">
104
+ <label for="node-input-ccuConfig"><i class="icon-globe"></i> CCU</label>
105
+ <input type="text" id="node-input-ccuConfig">
106
+ </div>
107
+ <div class="form-row">
108
+ <label for="node-input-area"><i class="fa fa-shield"></i> <span data-i18n="ccu-alarm.area"></span></label>
109
+ <input type="text" id="node-input-area" placeholder="area-…">
110
+ <select id="select-input-area" style="display:none" class="ccu-dropdown"></select>
111
+ </div>
112
+ <div class="form-tips" id="ccu-alarm-none" style="display:none" data-i18n="ccu-alarm.none"></div>
113
+ <div class="form-row">
114
+ <label class="ccu-checkbox" for="node-input-cache"><input type="checkbox" id="node-input-cache"> <span data-i18n="ccu-alarm.cache"></span></label>
115
+ </div>
116
+ <div class="form-row">
117
+ <label for="node-input-topic"><i class="icon-tasks"></i> Topic</label>
118
+ <input type="text" id="node-input-topic">
119
+ </div>
120
+ <div class="form-row">
121
+ <label for="node-input-name"><i class="icon-bookmark"></i> Name</label>
122
+ <input type="text" id="node-input-name">
123
+ </div>
124
+ </script>
@@ -0,0 +1,301 @@
1
+ /*
2
+ * task 38: an alarm area of openccu-lite's alarm addon as one node - its state and alarm out,
3
+ * arm/disarm/silence/acknowledge/panic in. The area is a device of the addon's interface (see
4
+ * lib/alarm.js); the node follows its value channel like a value node would, folds the datapoints
5
+ * into one message and writes the commands with setValue.
6
+ */
7
+
8
+ const path = require('path');
9
+
10
+ const statusHelper = require(path.join(__dirname, '/lib/status.js'));
11
+ const alarm = require(path.join(__dirname, '/lib/alarm.js'));
12
+
13
+ /** events of one change come in one multicall; they are folded into one message */
14
+ const FOLD_MS = 25;
15
+
16
+ module.exports = function (RED) {
17
+ class CcuAlarm {
18
+ constructor(config) {
19
+ RED.nodes.createNode(this, config);
20
+
21
+ this.config = config;
22
+ this.ccu = RED.nodes.getNode(config.ccuConfig);
23
+ this.iface = alarm.ALARM_IFACE;
24
+
25
+ if (!this.ccu) {
26
+ return;
27
+ }
28
+
29
+ this.area = alarm.parseArea(config.area);
30
+ this.values = {};
31
+ this.changed = new Set();
32
+ this.foldCache = true;
33
+ this.foldTimer = null;
34
+ this.sent = false;
35
+ this.lastPayload = undefined;
36
+ this.refused = null;
37
+
38
+ this.ccu.register(this);
39
+
40
+ if (this.area) {
41
+ this.idSubscription = this.ccu.subscribe({cache: true, channel: this.area.channel}, (message) =>
42
+ this.take(message),
43
+ );
44
+ }
45
+
46
+ this.on('input', (message, send, done) => {
47
+ this.command(message)
48
+ .then(() => done())
49
+ .catch((error) => done(error));
50
+ });
51
+ this.on('close', this._destructor);
52
+ }
53
+
54
+ /** the area's name on the system: the channel's, else the device's, else its key */
55
+ areaName() {
56
+ const names = this.ccu.channelNames || {};
57
+ return names[this.area.channel] || names[this.area.device] || this.area.key;
58
+ }
59
+
60
+ /**
61
+ * One datapoint of the area: kept, and put out with the others of the same change.
62
+ * @param {object} message as the connection makes it
63
+ */
64
+ take(message) {
65
+ if (!alarm.DATAPOINTS.includes(message.datapoint)) {
66
+ return;
67
+ }
68
+
69
+ this.values[message.datapoint] = message.value;
70
+ if (!message.cache) {
71
+ this.foldCache = false;
72
+ this.changed.add(message.datapoint);
73
+ }
74
+
75
+ if (message.datapoint === 'STATE' || message.datapoint === 'ALARM') {
76
+ // a new state or alarm ends what a refused command said
77
+ this.refused = null;
78
+ }
79
+
80
+ if (!this.foldTimer) {
81
+ this.foldTimer = setTimeout(() => this.flush(), FOLD_MS);
82
+ }
83
+ }
84
+
85
+ /** the folded change as one message */
86
+ flush() {
87
+ this.foldTimer = null;
88
+ const cache = this.foldCache;
89
+ const changed = [...this.changed];
90
+ this.foldCache = true;
91
+ this.changed = new Set();
92
+
93
+ const state = alarm.areaState(this.values);
94
+ this.showState();
95
+ if (cache && (this.sent || !this.config.cache)) {
96
+ return;
97
+ }
98
+
99
+ const message = {
100
+ ...state,
101
+ payloadPrevious: this.lastPayload,
102
+ area: {key: this.area.key, address: this.area.device, name: this.areaName()},
103
+ iface: this.ccu.alarmIface() || alarm.ALARM_IFACE,
104
+ channel: this.area.channel,
105
+ changed,
106
+ cache,
107
+ ts: Date.now(),
108
+ };
109
+ message.name = message.area.name;
110
+ message.topic = this.ccu.topicReplace(this.config.topic, message);
111
+ this.lastPayload = state.payload;
112
+ this.sent = true;
113
+ this.send(message);
114
+ }
115
+
116
+ /**
117
+ * A command in msg.payload: written to the area, or refused with the reason.
118
+ * @param {object} message
119
+ * @returns {Promise<void>}
120
+ */
121
+ async command(message) {
122
+ const command = alarm.parseCommand(message.payload);
123
+ if (!command) {
124
+ throw new Error(
125
+ 'unknown command ' +
126
+ JSON.stringify(message.payload) +
127
+ ' - one of ' +
128
+ Object.keys(alarm.COMMANDS).join(', '),
129
+ );
130
+ }
131
+
132
+ if (!this.area) {
133
+ throw new Error('no alarm area chosen');
134
+ }
135
+
136
+ let source = this.ccu.alarmSource();
137
+ if (source.waiting && typeof this.ccu.whenLogicKnown === 'function') {
138
+ // the system's list of interfaces is read at connect; a command right after a deploy waits for it
139
+ await this.ccu.whenLogicKnown();
140
+ source = this.ccu.alarmSource();
141
+ }
142
+
143
+ if (source.error || source.waiting) {
144
+ throw new Error(
145
+ command.command + ': the alarm area cannot be reached - ' + (source.error || 'not connected yet'),
146
+ );
147
+ }
148
+
149
+ try {
150
+ await this.ccu.methodCall(source.iface, 'setValue', [
151
+ this.area.channel,
152
+ command.datapoint,
153
+ command.value,
154
+ ]);
155
+ } catch (error) {
156
+ const refused = alarm.refusal(error);
157
+ const name = this.areaName();
158
+ let text;
159
+ switch (refused.reason) {
160
+ case 'switch':
161
+ this.refused = 'refused: lite-rpc switch off';
162
+ text = alarm.switchMessage(command.command, name);
163
+ break;
164
+ case 'not-ready':
165
+ this.refused = refused.text;
166
+ text = command.command + ' refused: the alarm area "' + name + '" is ' + refused.text;
167
+ break;
168
+ case 'armed':
169
+ this.refused = 'refused: armed at the other level';
170
+ text = command.command + ' refused: the alarm area "' + name + '" ' + refused.text;
171
+ break;
172
+ case 'unknown-area':
173
+ this.refused = 'area not found';
174
+ text = command.command + ': the alarm area ' + this.area.device + ' is not on the system';
175
+ break;
176
+ default:
177
+ this.refused = 'error';
178
+ text = command.command + ' failed for the alarm area "' + name + '": ' + refused.text;
179
+ }
180
+
181
+ this.showState();
182
+ const failure = new Error(text);
183
+ failure.reason = refused.reason;
184
+ throw failure;
185
+ }
186
+
187
+ this.refused = null;
188
+ this.showState();
189
+ }
190
+
191
+ /**
192
+ * The status: why the area cannot be reached, a refusal, or the area's state.
193
+ * @param {object} [data] what the connection pushed last
194
+ */
195
+ showState(data) {
196
+ if (data) {
197
+ this.lastData = data;
198
+ }
199
+
200
+ const source = this.ccu.alarmSource();
201
+ if (source.iface) {
202
+ this.iface = source.iface;
203
+ }
204
+
205
+ const set = (status) => {
206
+ const key = JSON.stringify(status);
207
+ if (this.currentStatus !== key) {
208
+ this.status(status);
209
+ this.currentStatus = key;
210
+ }
211
+ };
212
+
213
+ if (source.error) {
214
+ set({fill: 'red', shape: 'ring', text: source.error});
215
+ return;
216
+ }
217
+
218
+ if (source.waiting) {
219
+ set({fill: 'yellow', shape: 'ring', text: 'waiting'});
220
+ return;
221
+ }
222
+
223
+ if (!this.area) {
224
+ set({fill: 'red', shape: 'ring', text: 'no area chosen'});
225
+ return;
226
+ }
227
+
228
+ const connected = this.lastData && this.lastData.ifaceStatus && this.lastData.ifaceStatus[this.iface];
229
+ if (!connected) {
230
+ this.currentStatus = null;
231
+ statusHelper(this, this.lastData);
232
+ this.currentStatus = 'iface';
233
+ return;
234
+ }
235
+
236
+ if (this.refused) {
237
+ set({fill: 'red', shape: 'ring', text: this.refused.slice(0, 60)});
238
+ return;
239
+ }
240
+
241
+ const devices = this.ccu.metadata && this.ccu.metadata.devices && this.ccu.metadata.devices[this.iface];
242
+ if (this.ccu.litePictured && devices && !devices[this.area.device]) {
243
+ set({fill: 'red', shape: 'ring', text: 'area not found'});
244
+ return;
245
+ }
246
+
247
+ const state = alarm.areaState(this.values);
248
+ if (!state.payload) {
249
+ set({fill: 'green', shape: 'ring', text: 'connected'});
250
+ return;
251
+ }
252
+
253
+ let text = state.payload;
254
+ let fill = 'green';
255
+ let shape = 'dot';
256
+ if (state.payload === 'disarmed') {
257
+ shape = 'ring';
258
+ if (state.ready === false) {
259
+ text += ', not ready' + (state.openSensors ? ' (' + state.openSensors + ')' : '');
260
+ }
261
+ } else if (state.payload === 'arming' || state.payload === 'pending') {
262
+ fill = 'yellow';
263
+ if (state.delay) {
264
+ text += ' ' + state.delay + ' s';
265
+ }
266
+ } else if (state.payload === 'triggered') {
267
+ fill = 'red';
268
+ }
269
+
270
+ if (state.alarm.active && state.payload !== 'triggered') {
271
+ fill = 'red';
272
+ shape = 'ring';
273
+ text += ', alarm' + (state.alarm.kind ? ': ' + state.alarm.kind : '');
274
+ } else if (state.alarm.active && state.alarm.kind) {
275
+ text += ': ' + state.alarm.kind;
276
+ }
277
+
278
+ if (state.prealarm) {
279
+ fill = fill === 'red' ? fill : 'yellow';
280
+ text += ', pre-alarm';
281
+ }
282
+
283
+ set({fill, shape, text});
284
+ }
285
+
286
+ setStatus(data) {
287
+ this.showState(data);
288
+ }
289
+
290
+ _destructor(done) {
291
+ clearTimeout(this.foldTimer);
292
+ if (this.idSubscription) {
293
+ this.ccu.unsubscribe(this.idSubscription);
294
+ }
295
+
296
+ done();
297
+ }
298
+ }
299
+
300
+ RED.nodes.registerType('ccu-alarm', CcuAlarm);
301
+ };
@@ -20,6 +20,7 @@ const metaProvider = require('./lib/metaprovider.js');
20
20
  const {InitRetry, retryDelay, RETRY_INTERVAL} = require('./lib/initretry.js');
21
21
  const lite = require('./lib/lite.js');
22
22
  const logic = require('./lib/logic.js');
23
+ const alarm = require('./lib/alarm.js');
23
24
  const {Pairings} = require('./lib/pairing.js');
24
25
  const {
25
26
  writeJsonAtomic,
@@ -424,6 +425,25 @@ module.exports = function (RED) {
424
425
  res.status(200).send(JSON.stringify(config.program));
425
426
  break;
426
427
 
428
+ case 'alarm': {
429
+ // task 38: the alarm addon's areas - only devices of the type ALARM-AREA
430
+ const all = (config.metadata && config.metadata.devices) || {};
431
+ Object.keys(all).forEach((iface) => {
432
+ const devices = all[iface] || {};
433
+ Object.keys(devices).forEach((addr) => {
434
+ const device = devices[addr];
435
+ if (device && !device.PARENT && device.TYPE === alarm.AREA_TYPE) {
436
+ object[addr] = {
437
+ name: config.channelNames[addr + ':1'] || config.channelNames[addr] || addr,
438
+ iface,
439
+ };
440
+ }
441
+ });
442
+ });
443
+ res.status(200).send(JSON.stringify(object));
444
+ break;
445
+ }
446
+
427
447
  case 'signal': {
428
448
  const devices = config.metadata.devices[request.query.iface];
429
449
  if (devices) {
@@ -3213,12 +3233,14 @@ module.exports = function (RED) {
3213
3233
  this.logicIface = iface;
3214
3234
  }
3215
3235
 
3236
+ const isAlarm = !isLogic && alarm.isAlarmIface(iface, info);
3216
3237
  this.logger.info(
3217
3238
  'lite-rpc: the interface ' +
3218
3239
  iface +
3219
3240
  (info.addon ? ' of the addon ' + info.addon : '') +
3220
3241
  ' is followed as well' +
3221
- (isLogic ? ' - the system variables and programs' : ''),
3242
+ (isLogic ? ' - the system variables and programs' : '') +
3243
+ (isAlarm ? ' - the alarm areas' : ''),
3222
3244
  );
3223
3245
  this.pushStatus();
3224
3246
  return true;
@@ -3336,6 +3358,50 @@ module.exports = function (RED) {
3336
3358
  return {iface: logic.LOGIC_IFACE, waiting: true};
3337
3359
  }
3338
3360
 
3361
+ /**
3362
+ * task 38: the alarm addon's interface this connection follows, else null.
3363
+ * @returns {string|null}
3364
+ */
3365
+ alarmIface() {
3366
+ const found = Object.keys(this.ifaceTypes).find(
3367
+ (iface) =>
3368
+ this.ifaceTypes[iface].addonIface &&
3369
+ !logic.isLogicIface(iface, {addon: this.ifaceTypes[iface].addon}) &&
3370
+ alarm.isAlarmIface(iface, {addon: this.ifaceTypes[iface].addon}),
3371
+ );
3372
+ return found || null;
3373
+ }
3374
+
3375
+ /**
3376
+ * task 38: what the alarm node shows: the alarm interface, or why there is none (a CCU, a
3377
+ * connection without lite-rpc, the addon not installed), or that it is not known yet.
3378
+ * @returns {{iface: string, error?: string, waiting?: boolean}}
3379
+ */
3380
+ alarmSource() {
3381
+ const iface = this.alarmIface();
3382
+ if (iface) {
3383
+ return {iface};
3384
+ }
3385
+
3386
+ if (!this.metaMode) {
3387
+ // a CCU once its interfaces answer; until then it may still turn out to be openccu-lite
3388
+ const ccuUp = Object.keys(this.ifaceStatus).some((name) => this.ifaceStatus[name]);
3389
+ return ccuUp
3390
+ ? {iface: alarm.ALARM_IFACE, error: 'needs openccu-lite'}
3391
+ : {iface: alarm.ALARM_IFACE, waiting: true};
3392
+ }
3393
+
3394
+ if (!this.lite) {
3395
+ return {iface: alarm.ALARM_IFACE, error: 'needs lite-rpc'};
3396
+ }
3397
+
3398
+ if (this.liteListed) {
3399
+ return {iface: alarm.ALARM_IFACE, error: 'alarm addon not installed'};
3400
+ }
3401
+
3402
+ return {iface: alarm.ALARM_IFACE, waiting: true};
3403
+ }
3404
+
3339
3405
  /**
3340
3406
  * task 32: the description of a datapoint of a Logic channel, where it was fetched.
3341
3407
  * @param {string} channel
@@ -0,0 +1,246 @@
1
+ /*
2
+ * task 38: the alarm areas of openccu-lite's alarm addon (lite-addon-alarm). The addon offers each
3
+ * area as a device of an interface of its own, which the system's lite-rpc carries like the radio
4
+ * interfaces (and like the Logic addon's):
5
+ *
6
+ * area `haus` device area-haus (ALARM-AREA), channel area-haus:1
7
+ * read/event STATE (ENUM: DISARMED, ARMING, ARMED_PERIMETER, ARMED_FULL, ENTRY_DELAY,
8
+ * TRIGGERED - Home Assistant's alarm_control_panel states disarmed, arming,
9
+ * armed_home, armed_away, pending, triggered, in this order), ALARM, ALARM_KIND
10
+ * (NONE, INTRUSION, TAMPER, PANIC, HAZARD), ALARM_SENSOR, READY, OPEN_SENSORS,
11
+ * DELAY (s), PREALARM
12
+ * write ARM (ENUM: DISARMED, PERIMETER, FULL), SILENCE, ACKNOWLEDGE, PANIC (ACTION)
13
+ *
14
+ * The addon decides what a write may do: arming, disarming, silencing and acknowledging are refused
15
+ * (fault -6, "... not allowed for this source") unless the area's switch "Scharf/Unscharf über
16
+ * lite-rpc erlauben" is on - off for a new area; arming is refused over sensors that are not in
17
+ * order ("not ready: ..."); a panic alarm is always taken.
18
+ *
19
+ * Pure helpers, no connection state: the node (ccu-alarm.js) keeps the area's values.
20
+ */
21
+
22
+ /** the interface's name as lite-addon-alarm registers it */
23
+ const ALARM_IFACE = 'Alarm';
24
+
25
+ /** the addon's id, `addon` in GET /api/rpc/v1/interfaces */
26
+ const ALARM_ADDON = 'alarm';
27
+
28
+ /** an area's device type */
29
+ const AREA_TYPE = 'ALARM-AREA';
30
+
31
+ /** STATE's entries, by index, and Home Assistant's state for each */
32
+ const STATES = ['DISARMED', 'ARMING', 'ARMED_PERIMETER', 'ARMED_FULL', 'ENTRY_DELAY', 'TRIGGERED'];
33
+ const HA_STATES = ['disarmed', 'arming', 'armed_home', 'armed_away', 'pending', 'triggered'];
34
+
35
+ /** ALARM_KIND's entries, by index */
36
+ const ALARM_KINDS = ['NONE', 'INTRUSION', 'TAMPER', 'PANIC', 'HAZARD'];
37
+
38
+ /** ARM's entries, by index */
39
+ const ARM_TARGETS = ['DISARMED', 'PERIMETER', 'FULL'];
40
+
41
+ /** the datapoints of an area's value channel the node follows */
42
+ const DATAPOINTS = ['STATE', 'ALARM', 'ALARM_KIND', 'ALARM_SENSOR', 'READY', 'OPEN_SENSORS', 'DELAY', 'PREALARM'];
43
+
44
+ /** the switch a refused command needs, as the addon names it (de, en) */
45
+ const SWITCH_DE = 'Scharf/Unscharf über lite-rpc erlauben';
46
+ const SWITCH_EN = 'Allow arming and disarming over lite-rpc';
47
+
48
+ /**
49
+ * The commands msg.payload may carry: each to a write of the area's value channel. Home
50
+ * Assistant's service names (alarm_arm_home, ...) and its states (armed_home, ...) are taken as
51
+ * well, so a payload from HA needs no change node.
52
+ */
53
+ const COMMANDS = {
54
+ arm_home: {command: 'arm_home', datapoint: 'ARM', value: 1},
55
+ arm_away: {command: 'arm_away', datapoint: 'ARM', value: 2},
56
+ disarm: {command: 'disarm', datapoint: 'ARM', value: 0},
57
+ silence: {command: 'silence', datapoint: 'SILENCE', value: true},
58
+ acknowledge: {command: 'acknowledge', datapoint: 'ACKNOWLEDGE', value: true},
59
+ panic: {command: 'panic', datapoint: 'PANIC', value: true},
60
+ };
61
+
62
+ const ALIASES = {
63
+ armed_home: 'arm_home',
64
+ alarm_arm_home: 'arm_home',
65
+ perimeter: 'arm_home',
66
+ armed_perimeter: 'arm_home',
67
+ armed_away: 'arm_away',
68
+ alarm_arm_away: 'arm_away',
69
+ full: 'arm_away',
70
+ armed_full: 'arm_away',
71
+ disarmed: 'disarm',
72
+ alarm_disarm: 'disarm',
73
+ ack: 'acknowledge',
74
+ alarm_trigger: 'panic',
75
+ trigger: 'panic',
76
+ };
77
+
78
+ /**
79
+ * Whether an interface the system lists is the alarm addon's: by its addon id, else by its name.
80
+ * @param {string} name
81
+ * @param {{addon?: string}} [info] the entry of GET /api/rpc/v1/interfaces
82
+ * @returns {boolean}
83
+ */
84
+ function isAlarmIface(name, info) {
85
+ if (info && info.addon) {
86
+ return info.addon === ALARM_ADDON;
87
+ }
88
+
89
+ return name === ALARM_IFACE;
90
+ }
91
+
92
+ /**
93
+ * An area's device address and value channel from what the editor stored (the device address, or
94
+ * its channel), else null.
95
+ * @param {string} area e.g. area-haus, area-haus:1
96
+ * @returns {{key: string, device: string, channel: string}|null}
97
+ */
98
+ function parseArea(area) {
99
+ const match = /^area-([^:\s]+)(?::1)?$/.exec(String(area || '').trim());
100
+ if (!match) {
101
+ return null;
102
+ }
103
+
104
+ return {key: match[1], device: 'area-' + match[1], channel: 'area-' + match[1] + ':1'};
105
+ }
106
+
107
+ /**
108
+ * The command a payload stands for, else null.
109
+ * @param {*} payload
110
+ * @returns {{command: string, datapoint: string, value: *}|null}
111
+ */
112
+ function parseCommand(payload) {
113
+ if (typeof payload !== 'string') {
114
+ return null;
115
+ }
116
+
117
+ const word = payload.trim().toLowerCase();
118
+ const own = (table, key) => Object.prototype.hasOwnProperty.call(table, key);
119
+ const name = own(COMMANDS, word) ? word : own(ALIASES, word) ? ALIASES[word] : null;
120
+ return name ? {...COMMANDS[name]} : null;
121
+ }
122
+
123
+ /**
124
+ * An ENUM value as its index: the number, or the entry's name.
125
+ * @param {*} value
126
+ * @param {string[]} list
127
+ * @returns {number} -1 when it is none of them
128
+ */
129
+ function enumIndex(value, list) {
130
+ if (typeof value === 'number' && Number.isInteger(value) && value >= 0 && value < list.length) {
131
+ return value;
132
+ }
133
+
134
+ if (typeof value === 'string') {
135
+ const index = list.indexOf(value.toUpperCase());
136
+ if (index !== -1) {
137
+ return index;
138
+ }
139
+
140
+ if (/^\d+$/.test(value)) {
141
+ return enumIndex(Number(value), list);
142
+ }
143
+ }
144
+
145
+ return -1;
146
+ }
147
+
148
+ /**
149
+ * The area as the node puts it out, from the values of its datapoints.
150
+ * @param {object} values STATE, ALARM, ... as the interface sent them (missing ones are not known yet)
151
+ * @returns {{payload: string|undefined, state: string|undefined, alarm: object, ready: boolean|undefined,
152
+ * openSensors: number|undefined, delay: number|undefined, prealarm: boolean|undefined}}
153
+ */
154
+ function areaState(values) {
155
+ const v = values || {};
156
+ const state = enumIndex(v.STATE, STATES);
157
+ const kind = enumIndex(v.ALARM_KIND, ALARM_KINDS);
158
+ const bool = (x) => (x === undefined || x === null ? undefined : Boolean(x));
159
+ const number = (x) => (x === undefined || x === null || Number.isNaN(Number(x)) ? undefined : Number(x));
160
+ return {
161
+ payload: state === -1 ? undefined : HA_STATES[state],
162
+ state: state === -1 ? undefined : STATES[state],
163
+ alarm: {
164
+ active: bool(v.ALARM),
165
+ kind: kind > 0 ? ALARM_KINDS[kind].toLowerCase() : null,
166
+ sensor: typeof v.ALARM_SENSOR === 'string' && v.ALARM_SENSOR !== '' ? v.ALARM_SENSOR : null,
167
+ },
168
+ ready: bool(v.READY),
169
+ openSensors: number(v.OPEN_SENSORS),
170
+ delay: number(v.DELAY),
171
+ prealarm: bool(v.PREALARM),
172
+ };
173
+ }
174
+
175
+ /**
176
+ * What a refused write means, from the interface's fault: the area's switch is off, it is not
177
+ * ready (the sensors in the way), it is armed at the other level, or it is gone.
178
+ * @param {Error} error with faultCode/faultString where the interface answered
179
+ * @returns {{reason: 'switch'|'not-ready'|'armed'|'unknown-area'|'other', text: string}}
180
+ */
181
+ function refusal(error) {
182
+ const text = String((error && (error.faultString || error.message)) || error || '');
183
+ // the interface's words: "<DATAPOINT> of <address>: <the engine's refusal>"
184
+ const reason = text.replace(/^[A-Z_]+ of area-\S+: /, '');
185
+ if (/not allowed for this source/.test(text)) {
186
+ return {reason: 'switch', text: reason};
187
+ }
188
+
189
+ if (/not ready/.test(text)) {
190
+ return {reason: 'not-ready', text: reason};
191
+ }
192
+
193
+ if (/armed at another level|armed at the other level/.test(text)) {
194
+ return {reason: 'armed', text: reason};
195
+ }
196
+
197
+ if ((error && error.faultCode === -2) || /no such area|unknown (device|channel)|is gone/.test(text)) {
198
+ return {reason: 'unknown-area', text: reason};
199
+ }
200
+
201
+ return {reason: 'other', text: reason};
202
+ }
203
+
204
+ /**
205
+ * The log line for a command the area's switch refused: what to switch on, and where.
206
+ * @param {string} command e.g. arm_away
207
+ * @param {string} areaName
208
+ * @returns {string}
209
+ */
210
+ function switchMessage(command, areaName) {
211
+ return (
212
+ command +
213
+ ' refused: the alarm area "' +
214
+ areaName +
215
+ '" does not let lite-rpc clients arm, disarm, silence or acknowledge. Switch on "' +
216
+ SWITCH_DE +
217
+ '" (' +
218
+ SWITCH_EN +
219
+ ') in the alarm addon: Bereiche → ' +
220
+ areaName +
221
+ ' → ' +
222
+ SWITCH_DE +
223
+ '. A panic alarm needs no switch.'
224
+ );
225
+ }
226
+
227
+ module.exports = {
228
+ ALARM_IFACE,
229
+ ALARM_ADDON,
230
+ AREA_TYPE,
231
+ STATES,
232
+ HA_STATES,
233
+ ALARM_KINDS,
234
+ ARM_TARGETS,
235
+ DATAPOINTS,
236
+ SWITCH_DE,
237
+ SWITCH_EN,
238
+ COMMANDS,
239
+ isAlarmIface,
240
+ parseArea,
241
+ parseCommand,
242
+ enumIndex,
243
+ areaState,
244
+ refusal,
245
+ switchMessage,
246
+ };
@@ -0,0 +1,74 @@
1
+ <script type="text/html" data-help-name="ccu-alarm">
2
+ <p>Ein Bereich der Alarmanlage von openccu-lite (das Addon <i>Alarmanlage</i>): sein Zustand und seine Alarme
3
+ am Ausgang, Scharf- und Unscharfschalten, Stummschalten, Bestätigen und Panik am Eingang.</p>
4
+ <p>Die Alarmanlage ist eine Schnittstelle des Systems mit dem Namen <code>Alarm</code>; jeder Bereich ist dort
5
+ ein Gerät <code>area-&lt;Schlüssel&gt;</code> vom Typ <code>ALARM-AREA</code>. Die Verbindung folgt ihr über
6
+ die lite-rpc des Systems, ohne Häkchen. Die Auswahl <i>Bereich</i> zeigt nur diese Geräte. Auf einer CCU, ohne
7
+ lite-rpc (die Verbindung nimmt sie für die angehakten Schnittstellen, mindestens eine muss es sein) oder ohne das Addon sagt der Node es (<i>needs openccu-lite</i>, <i>needs lite-rpc</i>, <i>alarm addon
8
+ not installed</i>).</p>
9
+
10
+ <h3>Eingang</h3>
11
+ <dl class="message-properties">
12
+ <dt>payload <span class="property-type">string</span></dt>
13
+ <dd>Der Befehl:
14
+ <ul>
15
+ <li><code>arm_home</code> - im Hüllschutz scharf schalten (<code>ARM</code> = <code>PERIMETER</code>)</li>
16
+ <li><code>arm_away</code> - im Vollschutz scharf schalten (<code>ARM</code> = <code>FULL</code>)</li>
17
+ <li><code>disarm</code> - unscharf schalten (<code>ARM</code> = <code>DISARMED</code>)</li>
18
+ <li><code>silence</code> - die Sirene stummschalten (<code>SILENCE</code>)</li>
19
+ <li><code>acknowledge</code> - den Alarm bestätigen (<code>ACKNOWLEDGE</code>)</li>
20
+ <li><code>panic</code> - einen Panikalarm auslösen (<code>PANIC</code>)</li>
21
+ </ul>
22
+ Groß- und Kleinschreibung zählt nicht. Die Dienste und Zustände von Home Assistant werden ebenso
23
+ verstanden: <code>alarm_arm_home</code>/<code>armed_home</code>, <code>alarm_arm_away</code>/<code>armed_away</code>,
24
+ <code>alarm_disarm</code>/<code>disarmed</code>, <code>alarm_trigger</code>.
25
+ </dd>
26
+ </dl>
27
+ <p><b>Was ein Befehl darf, entscheidet die Alarmanlage.</b> Scharf schalten, unscharf schalten, stummschalten
28
+ und bestätigen werden abgelehnt, solange der Schalter <i>Scharf/Unscharf über lite-rpc erlauben</i> des Bereichs
29
+ aus ist - bei einem neuen Bereich ist er aus. Einzuschalten ist er in der Alarmanlage unter
30
+ <i>Bereiche → (der Bereich) → Scharf/Unscharf über lite-rpc erlauben</i>. Der Node zeigt dann
31
+ <i>refused: lite-rpc switch off</i> und meldet einen Fehler (für einen <i>catch</i>-Node), der den Schalter
32
+ nennt. Scharf schalten wird auch mit dem Schalter abgelehnt, solange Melder nicht in Ordnung sind; der Fehler
33
+ nennt sie (<i>not ready: Fenster Küche (open)</i>), <code>msg.ready</code> sagt es vorher.
34
+ <b>Ein Panikalarm geht immer</b>, ohne den Schalter.</p>
35
+
36
+ <h3>Ausgang</h3>
37
+ <p>Eine Nachricht bei jeder Änderung des Bereichs; was in einem Schritt zusammen geändert wird (Zustand, Alarm,
38
+ Melder), kommt in einer Nachricht.</p>
39
+ <dl class="message-properties">
40
+ <dt>payload <span class="property-type">string</span></dt>
41
+ <dd>Der Zustand, wie Home Assistant ihn nennt: <code>disarmed</code>, <code>arming</code> (Ausgangsverzögerung),
42
+ <code>armed_home</code> (Hüllschutz), <code>armed_away</code> (Vollschutz), <code>pending</code>
43
+ (Eingangsverzögerung), <code>triggered</code> (Alarm).</dd>
44
+ <dt>state <span class="property-type">string</span></dt>
45
+ <dd>Derselbe Zustand mit dem Namen des Datenpunkts <code>STATE</code>: <code>DISARMED</code>, <code>ARMING</code>,
46
+ <code>ARMED_PERIMETER</code>, <code>ARMED_FULL</code>, <code>ENTRY_DELAY</code>, <code>TRIGGERED</code>.</dd>
47
+ <dt>payloadPrevious <span class="property-type">string</span></dt>
48
+ <dd>Der Zustand der vorigen Nachricht.</dd>
49
+ <dt>alarm <span class="property-type">object</span></dt>
50
+ <dd><code>active</code>: ein Alarm läuft oder ist vermerkt und nicht bestätigt; <code>kind</code>:
51
+ <code>intrusion</code>, <code>tamper</code>, <code>panic</code>, <code>hazard</code> oder <code>null</code>;
52
+ <code>sensor</code>: der Name des Melders, der ihn zuerst ausgelöst hat, oder <code>null</code>.</dd>
53
+ <dt>ready <span class="property-type">boolean</span></dt>
54
+ <dd>Nichts hindert den Bereich daran, im Vollschutz scharf zu schalten.</dd>
55
+ <dt>openSensors <span class="property-type">number</span></dt>
56
+ <dd>Wie viele Melder ihn daran hindern.</dd>
57
+ <dt>delay <span class="property-type">number</span></dt>
58
+ <dd>Die Länge der laufenden Ausgangs- oder Eingangsverzögerung in Sekunden, 0, wenn keine läuft.</dd>
59
+ <dt>prealarm <span class="property-type">boolean</span></dt>
60
+ <dd>Ein Voralarm läuft.</dd>
61
+ <dt>area <span class="property-type">object</span></dt>
62
+ <dd><code>key</code>, <code>address</code> (<code>area-&lt;Schlüssel&gt;</code>) und <code>name</code> des Bereichs.</dd>
63
+ <dt>changed <span class="property-type">array</span></dt>
64
+ <dd>Die Datenpunkte, die sich geändert haben; leer bei der Nachricht beim Start.</dd>
65
+ <dt>cache <span class="property-type">boolean</span></dt>
66
+ <dd><code>true</code> bei der Nachricht beim Start (<i>Zustand beim Start ausgeben</i>).</dd>
67
+ </dl>
68
+ <p>Der Status des Nodes zeigt den Zustand, einen Alarm, einen Voralarm, einen nicht bereiten Bereich und eine
69
+ Ablehnung.</p>
70
+
71
+ <h3>Topic</h3>
72
+ <p><code>msg.topic</code> wird aus dem Feld <i>Topic</i> gebildet; <code>${Name}</code> steht für den Namen des
73
+ Bereichs (Vorgabe <code>hm/status/alarm/${Name}</code>).</p>
74
+ </script>
@@ -0,0 +1,7 @@
1
+ {
2
+ "ccu-alarm": {
3
+ "area": "Bereich",
4
+ "cache": "Zustand beim Start ausgeben",
5
+ "none": "Keine Alarmbereiche gefunden. Die Bereiche kommen vom Alarmanlagen-Addon auf openccu-lite über die lite-rpc des Systems."
6
+ }
7
+ }
@@ -0,0 +1,72 @@
1
+ <script type="text/html" data-help-name="ccu-alarm">
2
+ <p>An area of openccu-lite's alarm system (the <i>alarm system</i> addon): its state and its alarms at the
3
+ output; arming, disarming, silencing, acknowledging and panic at the input.</p>
4
+ <p>The alarm system is an interface of the system called <code>Alarm</code>; every area is a device
5
+ <code>area-&lt;key&gt;</code> of the type <code>ALARM-AREA</code> there. The connection follows it through the
6
+ system's lite-rpc, without a checkbox. The <i>Area</i> picker shows only these devices. On a CCU, without
7
+ lite-rpc (the connection uses it for its ticked interfaces, at least one has to be) or without the addon the node says so (<i>needs openccu-lite</i>, <i>needs lite-rpc</i>, <i>alarm addon
8
+ not installed</i>).</p>
9
+
10
+ <h3>Input</h3>
11
+ <dl class="message-properties">
12
+ <dt>payload <span class="property-type">string</span></dt>
13
+ <dd>The command:
14
+ <ul>
15
+ <li><code>arm_home</code> - arm at perimeter protection (<code>ARM</code> = <code>PERIMETER</code>)</li>
16
+ <li><code>arm_away</code> - arm at full protection (<code>ARM</code> = <code>FULL</code>)</li>
17
+ <li><code>disarm</code> - disarm (<code>ARM</code> = <code>DISARMED</code>)</li>
18
+ <li><code>silence</code> - silence the siren (<code>SILENCE</code>)</li>
19
+ <li><code>acknowledge</code> - acknowledge the alarm (<code>ACKNOWLEDGE</code>)</li>
20
+ <li><code>panic</code> - raise a panic alarm (<code>PANIC</code>)</li>
21
+ </ul>
22
+ Case does not matter. Home Assistant's services and states are understood as well:
23
+ <code>alarm_arm_home</code>/<code>armed_home</code>, <code>alarm_arm_away</code>/<code>armed_away</code>,
24
+ <code>alarm_disarm</code>/<code>disarmed</code>, <code>alarm_trigger</code>.
25
+ </dd>
26
+ </dl>
27
+ <p><b>What a command may do is decided by the alarm system.</b> Arming, disarming, silencing and acknowledging
28
+ are refused unless the area's switch <i>Allow arming and disarming over lite-rpc</i> (German <i>Scharf/Unscharf
29
+ über lite-rpc erlauben</i>) is on - it is off for a new area. It is switched on in the alarm system under
30
+ <i>Areas → (the area) → Allow arming and disarming over lite-rpc</i>. The node then shows <i>refused: lite-rpc
31
+ switch off</i> and reports an error (for a <i>catch</i> node) that names the switch. Arming is refused, even with
32
+ the switch on, while sensors are not in order; the error names them (<i>not ready: Kitchen window (open)</i>),
33
+ and <code>msg.ready</code> says so beforehand. <b>A panic alarm always works</b>, without the switch.</p>
34
+
35
+ <h3>Output</h3>
36
+ <p>A message at every change of the area; what changes together in one step (state, alarm, sensors) comes in one
37
+ message.</p>
38
+ <dl class="message-properties">
39
+ <dt>payload <span class="property-type">string</span></dt>
40
+ <dd>The state as Home Assistant names it: <code>disarmed</code>, <code>arming</code> (exit delay),
41
+ <code>armed_home</code> (perimeter), <code>armed_away</code> (full protection), <code>pending</code> (entry
42
+ delay), <code>triggered</code> (alarm).</dd>
43
+ <dt>state <span class="property-type">string</span></dt>
44
+ <dd>The same state by the name of the datapoint <code>STATE</code>: <code>DISARMED</code>, <code>ARMING</code>,
45
+ <code>ARMED_PERIMETER</code>, <code>ARMED_FULL</code>, <code>ENTRY_DELAY</code>, <code>TRIGGERED</code>.</dd>
46
+ <dt>payloadPrevious <span class="property-type">string</span></dt>
47
+ <dd>The state of the message before.</dd>
48
+ <dt>alarm <span class="property-type">object</span></dt>
49
+ <dd><code>active</code>: an alarm is running or is noted and not acknowledged; <code>kind</code>:
50
+ <code>intrusion</code>, <code>tamper</code>, <code>panic</code>, <code>hazard</code> or <code>null</code>;
51
+ <code>sensor</code>: the name of the sensor that raised it first, or <code>null</code>.</dd>
52
+ <dt>ready <span class="property-type">boolean</span></dt>
53
+ <dd>Nothing keeps the area from arming at full protection.</dd>
54
+ <dt>openSensors <span class="property-type">number</span></dt>
55
+ <dd>How many sensors keep it from that.</dd>
56
+ <dt>delay <span class="property-type">number</span></dt>
57
+ <dd>The length of the exit or entry delay that is running, in seconds; 0 when none is.</dd>
58
+ <dt>prealarm <span class="property-type">boolean</span></dt>
59
+ <dd>A pre-alarm is running.</dd>
60
+ <dt>area <span class="property-type">object</span></dt>
61
+ <dd>The area's <code>key</code>, <code>address</code> (<code>area-&lt;key&gt;</code>) and <code>name</code>.</dd>
62
+ <dt>changed <span class="property-type">array</span></dt>
63
+ <dd>The datapoints that changed; empty for the message at start.</dd>
64
+ <dt>cache <span class="property-type">boolean</span></dt>
65
+ <dd><code>true</code> for the message at start (<i>Emit the state on start</i>).</dd>
66
+ </dl>
67
+ <p>The node's status shows the state, an alarm, a pre-alarm, an area that is not ready, and a refusal.</p>
68
+
69
+ <h3>Topic</h3>
70
+ <p><code>msg.topic</code> is built from the <i>Topic</i> field; <code>${Name}</code> stands for the area's name
71
+ (default <code>hm/status/alarm/${Name}</code>).</p>
72
+ </script>
@@ -0,0 +1,7 @@
1
+ {
2
+ "ccu-alarm": {
3
+ "area": "Area",
4
+ "cache": "Emit the state on start",
5
+ "none": "No alarm areas found. The areas come from the alarm system addon on openccu-lite, through the system's lite-rpc."
6
+ }
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-ccu",
3
- "version": "4.17.1",
3
+ "version": "4.18.0",
4
4
  "license": "MIT",
5
5
  "main": "none",
6
6
  "keywords": [
@@ -95,7 +95,8 @@
95
95
  "ccu-switch": "nodes/ccu-switch.js",
96
96
  "ccu-hm2mqtt": "nodes/ccu-mqtt.js",
97
97
  "ccu-homeassistant": "nodes/ccu-homeassistant.js",
98
- "ccu-alexa": "nodes/ccu-alexa.js"
98
+ "ccu-alexa": "nodes/ccu-alexa.js",
99
+ "ccu-alarm": "nodes/ccu-alarm.js"
99
100
  }
100
101
  },
101
102
  "repository": {