node-red-contrib-alarm-ultimate 0.1.0 → 0.1.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/README.md +76 -13
- package/docs/images/alarm-panel-mock.svg +114 -0
- package/docs/images/banner.svg +63 -0
- package/docs/images/flow-overview.svg +85 -0
- package/examples/README.md +19 -11
- package/examples/alarm-ultimate-dashboard-controls.json +574 -0
- package/nodes/AlarmSystemUltimate.html +3 -3
- package/nodes/AlarmUltimateSiren.html +3 -3
- package/nodes/AlarmUltimateSiren.js +6 -2
- package/nodes/AlarmUltimateState.html +3 -3
- package/nodes/AlarmUltimateState.js +6 -2
- package/nodes/AlarmUltimateZone.html +9 -4
- package/nodes/AlarmUltimateZone.js +21 -3
- package/nodes/icons/alarm-ultimate-siren.svg +6 -0
- package/nodes/icons/alarm-ultimate-state.svg +5 -0
- package/nodes/icons/alarm-ultimate-zone.svg +5 -0
- package/nodes/icons/alarm-ultimate.svg +6 -0
- package/package.json +2 -2
- package/tools/alarm-json-mapper.html +1118 -465
|
@@ -0,0 +1,574 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "b81f9a4b2f9c1a10",
|
|
4
|
+
"type": "tab",
|
|
5
|
+
"label": "Alarm Ultimate - Dashboard (Panel + Controls)",
|
|
6
|
+
"disabled": false,
|
|
7
|
+
"info": ""
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"id": "2f9d4c2b8a1c9b70",
|
|
11
|
+
"type": "comment",
|
|
12
|
+
"z": "b81f9a4b2f9c1a10",
|
|
13
|
+
"name": "Requires node-red-dashboard",
|
|
14
|
+
"info": "Install `node-red-dashboard`, then import this flow.\n\nThe iframe uses a *relative* URL so it works even if Node-RED is hosted under a path prefix (eg Home Assistant Ingress).\nIf you changed `httpAdminRoot` / `httpRoot`, adjust the iframe URL accordingly.\n\nTip: Open the panel directly at `alarm-ultimate/alarm-panel?id=<alarmNodeId>` to test outside Dashboard.",
|
|
15
|
+
"x": 250,
|
|
16
|
+
"y": 60,
|
|
17
|
+
"wires": []
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"id": "d9078c5d2b1a4f30",
|
|
21
|
+
"type": "ui_tab",
|
|
22
|
+
"name": "Alarm Ultimate",
|
|
23
|
+
"icon": "dashboard",
|
|
24
|
+
"disabled": false,
|
|
25
|
+
"hidden": false
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "a1a3c4e5f6078890",
|
|
29
|
+
"type": "ui_group",
|
|
30
|
+
"name": "Panel",
|
|
31
|
+
"tab": "d9078c5d2b1a4f30",
|
|
32
|
+
"order": 1,
|
|
33
|
+
"disp": true,
|
|
34
|
+
"width": "12",
|
|
35
|
+
"collapse": false,
|
|
36
|
+
"className": ""
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"id": "b2b3c4e5f6078891",
|
|
40
|
+
"type": "ui_group",
|
|
41
|
+
"name": "Controls",
|
|
42
|
+
"tab": "d9078c5d2b1a4f30",
|
|
43
|
+
"order": 2,
|
|
44
|
+
"disp": true,
|
|
45
|
+
"width": "12",
|
|
46
|
+
"collapse": false,
|
|
47
|
+
"className": ""
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"id": "c3c3c4e5f6078892",
|
|
51
|
+
"type": "ui_group",
|
|
52
|
+
"name": "Sensor simulator",
|
|
53
|
+
"tab": "d9078c5d2b1a4f30",
|
|
54
|
+
"order": 3,
|
|
55
|
+
"disp": true,
|
|
56
|
+
"width": "12",
|
|
57
|
+
"collapse": false,
|
|
58
|
+
"className": ""
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"id": "d0c1b2a3f4e50617",
|
|
62
|
+
"type": "AlarmSystemUltimate",
|
|
63
|
+
"z": "b81f9a4b2f9c1a10",
|
|
64
|
+
"name": "Home Alarm",
|
|
65
|
+
"controlTopic": "alarm",
|
|
66
|
+
"payloadPropName": "payload",
|
|
67
|
+
"translatorConfig": "",
|
|
68
|
+
"persistState": true,
|
|
69
|
+
"requireCodeForArm": false,
|
|
70
|
+
"requireCodeForDisarm": false,
|
|
71
|
+
"armCode": "",
|
|
72
|
+
"duressCode": "",
|
|
73
|
+
"blockArmOnViolations": true,
|
|
74
|
+
"exitDelaySeconds": 10,
|
|
75
|
+
"entryDelaySeconds": 30,
|
|
76
|
+
"emitOpenZonesDuringArming": false,
|
|
77
|
+
"openZonesArmingIntervalSeconds": 1,
|
|
78
|
+
"openZonesRequestTopic": "alarm/listOpenZones",
|
|
79
|
+
"openZonesRequestIntervalSeconds": 0,
|
|
80
|
+
"sirenDurationSeconds": 180,
|
|
81
|
+
"sirenLatchUntilDisarm": false,
|
|
82
|
+
"sirenTopic": "alarm/siren",
|
|
83
|
+
"sirenOnPayload": true,
|
|
84
|
+
"sirenOnPayloadType": "bool",
|
|
85
|
+
"sirenOffPayload": false,
|
|
86
|
+
"sirenOffPayloadType": "bool",
|
|
87
|
+
"emitRestoreEvents": false,
|
|
88
|
+
"maxLogEntries": 50,
|
|
89
|
+
"zones": "[\n {\n \"id\": \"front_door\",\n \"name\": \"Front door\",\n \"topic\": \"sensor/frontdoor\",\n \"type\": \"perimeter\",\n \"entry\": true,\n \"bypassable\": true,\n \"chime\": true\n },\n {\n \"id\": \"living_pir\",\n \"name\": \"Living PIR\",\n \"topic\": \"sensor/living_pir\",\n \"type\": \"motion\",\n \"entry\": false,\n \"bypassable\": true,\n \"cooldownSeconds\": 10\n }\n]",
|
|
90
|
+
"x": 220,
|
|
91
|
+
"y": 180,
|
|
92
|
+
"wires": [
|
|
93
|
+
[
|
|
94
|
+
"f50b6a7c1c8b3d10"
|
|
95
|
+
],
|
|
96
|
+
[
|
|
97
|
+
"f50b6a7c1c8b3d11"
|
|
98
|
+
],
|
|
99
|
+
[],
|
|
100
|
+
[],
|
|
101
|
+
[],
|
|
102
|
+
[
|
|
103
|
+
"f50b6a7c1c8b3d12"
|
|
104
|
+
],
|
|
105
|
+
[],
|
|
106
|
+
[],
|
|
107
|
+
[]
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"id": "e1f2a3b4c5d60718",
|
|
112
|
+
"type": "ui_template",
|
|
113
|
+
"z": "b81f9a4b2f9c1a10",
|
|
114
|
+
"group": "a1a3c4e5f6078890",
|
|
115
|
+
"name": "Alarm Panel (embed)",
|
|
116
|
+
"order": 1,
|
|
117
|
+
"width": "12",
|
|
118
|
+
"height": "18",
|
|
119
|
+
"format": "<iframe src=\"alarm-ultimate/alarm-panel?embed=1&id=d0c1b2a3f4e50617\" style=\"width:100%; height:720px; border:0; border-radius:10px;\"></iframe>",
|
|
120
|
+
"storeOutMessages": false,
|
|
121
|
+
"fwdInMessages": false,
|
|
122
|
+
"resendOnRefresh": true,
|
|
123
|
+
"templateScope": "local",
|
|
124
|
+
"className": ""
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"id": "c44ac2b6af1a1e20",
|
|
128
|
+
"type": "ui_button",
|
|
129
|
+
"z": "b81f9a4b2f9c1a10",
|
|
130
|
+
"name": "Arm",
|
|
131
|
+
"group": "b2b3c4e5f6078891",
|
|
132
|
+
"order": 1,
|
|
133
|
+
"width": "3",
|
|
134
|
+
"height": "1",
|
|
135
|
+
"passthru": false,
|
|
136
|
+
"label": "Arm",
|
|
137
|
+
"tooltip": "",
|
|
138
|
+
"color": "white",
|
|
139
|
+
"bgcolor": "#ff375f",
|
|
140
|
+
"icon": "fa-lock",
|
|
141
|
+
"payload": "arm",
|
|
142
|
+
"payloadType": "str",
|
|
143
|
+
"topic": "",
|
|
144
|
+
"topicType": "str",
|
|
145
|
+
"x": 160,
|
|
146
|
+
"y": 320,
|
|
147
|
+
"wires": [
|
|
148
|
+
[
|
|
149
|
+
"c44ac2b6af1a1e2a"
|
|
150
|
+
]
|
|
151
|
+
]
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"id": "c44ac2b6af1a1e21",
|
|
155
|
+
"type": "ui_button",
|
|
156
|
+
"z": "b81f9a4b2f9c1a10",
|
|
157
|
+
"name": "Disarm",
|
|
158
|
+
"group": "b2b3c4e5f6078891",
|
|
159
|
+
"order": 2,
|
|
160
|
+
"width": "3",
|
|
161
|
+
"height": "1",
|
|
162
|
+
"passthru": false,
|
|
163
|
+
"label": "Disarm",
|
|
164
|
+
"tooltip": "",
|
|
165
|
+
"color": "white",
|
|
166
|
+
"bgcolor": "#1f6feb",
|
|
167
|
+
"icon": "fa-unlock",
|
|
168
|
+
"payload": "disarm",
|
|
169
|
+
"payloadType": "str",
|
|
170
|
+
"topic": "",
|
|
171
|
+
"topicType": "str",
|
|
172
|
+
"x": 160,
|
|
173
|
+
"y": 360,
|
|
174
|
+
"wires": [
|
|
175
|
+
[
|
|
176
|
+
"c44ac2b6af1a1e2a"
|
|
177
|
+
]
|
|
178
|
+
]
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"id": "c44ac2b6af1a1e22",
|
|
182
|
+
"type": "ui_button",
|
|
183
|
+
"z": "b81f9a4b2f9c1a10",
|
|
184
|
+
"name": "Status",
|
|
185
|
+
"group": "b2b3c4e5f6078891",
|
|
186
|
+
"order": 3,
|
|
187
|
+
"width": "3",
|
|
188
|
+
"height": "1",
|
|
189
|
+
"passthru": false,
|
|
190
|
+
"label": "Status",
|
|
191
|
+
"tooltip": "Emits a full snapshot on output 1",
|
|
192
|
+
"color": "white",
|
|
193
|
+
"bgcolor": "#6e7681",
|
|
194
|
+
"icon": "fa-info-circle",
|
|
195
|
+
"payload": "status",
|
|
196
|
+
"payloadType": "str",
|
|
197
|
+
"topic": "",
|
|
198
|
+
"topicType": "str",
|
|
199
|
+
"x": 160,
|
|
200
|
+
"y": 400,
|
|
201
|
+
"wires": [
|
|
202
|
+
[
|
|
203
|
+
"c44ac2b6af1a1e2a"
|
|
204
|
+
]
|
|
205
|
+
]
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"id": "c44ac2b6af1a1e23",
|
|
209
|
+
"type": "ui_button",
|
|
210
|
+
"z": "b81f9a4b2f9c1a10",
|
|
211
|
+
"name": "List open zones",
|
|
212
|
+
"group": "b2b3c4e5f6078891",
|
|
213
|
+
"order": 4,
|
|
214
|
+
"width": "6",
|
|
215
|
+
"height": "1",
|
|
216
|
+
"passthru": false,
|
|
217
|
+
"label": "List open zones",
|
|
218
|
+
"tooltip": "Emits one message per open zone on output 9",
|
|
219
|
+
"color": "white",
|
|
220
|
+
"bgcolor": "#6e7681",
|
|
221
|
+
"icon": "fa-list",
|
|
222
|
+
"payload": "list_open_zones",
|
|
223
|
+
"payloadType": "str",
|
|
224
|
+
"topic": "",
|
|
225
|
+
"topicType": "str",
|
|
226
|
+
"x": 170,
|
|
227
|
+
"y": 440,
|
|
228
|
+
"wires": [
|
|
229
|
+
[
|
|
230
|
+
"c44ac2b6af1a1e2a"
|
|
231
|
+
]
|
|
232
|
+
]
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"id": "c44ac2b6af1a1e24",
|
|
236
|
+
"type": "ui_button",
|
|
237
|
+
"z": "b81f9a4b2f9c1a10",
|
|
238
|
+
"name": "Siren on",
|
|
239
|
+
"group": "b2b3c4e5f6078891",
|
|
240
|
+
"order": 5,
|
|
241
|
+
"width": "3",
|
|
242
|
+
"height": "1",
|
|
243
|
+
"passthru": false,
|
|
244
|
+
"label": "Siren ON",
|
|
245
|
+
"tooltip": "",
|
|
246
|
+
"color": "white",
|
|
247
|
+
"bgcolor": "#ff9f0a",
|
|
248
|
+
"icon": "fa-bullhorn",
|
|
249
|
+
"payload": "siren_on",
|
|
250
|
+
"payloadType": "str",
|
|
251
|
+
"topic": "",
|
|
252
|
+
"topicType": "str",
|
|
253
|
+
"x": 160,
|
|
254
|
+
"y": 480,
|
|
255
|
+
"wires": [
|
|
256
|
+
[
|
|
257
|
+
"c44ac2b6af1a1e2a"
|
|
258
|
+
]
|
|
259
|
+
]
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"id": "c44ac2b6af1a1e25",
|
|
263
|
+
"type": "ui_button",
|
|
264
|
+
"z": "b81f9a4b2f9c1a10",
|
|
265
|
+
"name": "Siren off",
|
|
266
|
+
"group": "b2b3c4e5f6078891",
|
|
267
|
+
"order": 6,
|
|
268
|
+
"width": "3",
|
|
269
|
+
"height": "1",
|
|
270
|
+
"passthru": false,
|
|
271
|
+
"label": "Siren OFF",
|
|
272
|
+
"tooltip": "",
|
|
273
|
+
"color": "white",
|
|
274
|
+
"bgcolor": "#6e7681",
|
|
275
|
+
"icon": "fa-bullhorn",
|
|
276
|
+
"payload": "siren_off",
|
|
277
|
+
"payloadType": "str",
|
|
278
|
+
"topic": "",
|
|
279
|
+
"topicType": "str",
|
|
280
|
+
"x": 160,
|
|
281
|
+
"y": 520,
|
|
282
|
+
"wires": [
|
|
283
|
+
[
|
|
284
|
+
"c44ac2b6af1a1e2a"
|
|
285
|
+
]
|
|
286
|
+
]
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"id": "c44ac2b6af1a1e26",
|
|
290
|
+
"type": "ui_button",
|
|
291
|
+
"z": "b81f9a4b2f9c1a10",
|
|
292
|
+
"name": "Panic",
|
|
293
|
+
"group": "b2b3c4e5f6078891",
|
|
294
|
+
"order": 7,
|
|
295
|
+
"width": "3",
|
|
296
|
+
"height": "1",
|
|
297
|
+
"passthru": false,
|
|
298
|
+
"label": "Panic",
|
|
299
|
+
"tooltip": "",
|
|
300
|
+
"color": "white",
|
|
301
|
+
"bgcolor": "#d1242f",
|
|
302
|
+
"icon": "fa-exclamation-triangle",
|
|
303
|
+
"payload": "panic",
|
|
304
|
+
"payloadType": "str",
|
|
305
|
+
"topic": "",
|
|
306
|
+
"topicType": "str",
|
|
307
|
+
"x": 150,
|
|
308
|
+
"y": 560,
|
|
309
|
+
"wires": [
|
|
310
|
+
[
|
|
311
|
+
"c44ac2b6af1a1e2a"
|
|
312
|
+
]
|
|
313
|
+
]
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"id": "c44ac2b6af1a1e27",
|
|
317
|
+
"type": "ui_button",
|
|
318
|
+
"z": "b81f9a4b2f9c1a10",
|
|
319
|
+
"name": "Silent panic",
|
|
320
|
+
"group": "b2b3c4e5f6078891",
|
|
321
|
+
"order": 8,
|
|
322
|
+
"width": "3",
|
|
323
|
+
"height": "1",
|
|
324
|
+
"passthru": false,
|
|
325
|
+
"label": "Silent panic",
|
|
326
|
+
"tooltip": "",
|
|
327
|
+
"color": "white",
|
|
328
|
+
"bgcolor": "#6e7681",
|
|
329
|
+
"icon": "fa-eye-slash",
|
|
330
|
+
"payload": "panic_silent",
|
|
331
|
+
"payloadType": "str",
|
|
332
|
+
"topic": "",
|
|
333
|
+
"topicType": "str",
|
|
334
|
+
"x": 170,
|
|
335
|
+
"y": 600,
|
|
336
|
+
"wires": [
|
|
337
|
+
[
|
|
338
|
+
"c44ac2b6af1a1e2a"
|
|
339
|
+
]
|
|
340
|
+
]
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"id": "c44ac2b6af1a1e28",
|
|
344
|
+
"type": "ui_button",
|
|
345
|
+
"z": "b81f9a4b2f9c1a10",
|
|
346
|
+
"name": "Bypass front door",
|
|
347
|
+
"group": "b2b3c4e5f6078891",
|
|
348
|
+
"order": 9,
|
|
349
|
+
"width": "6",
|
|
350
|
+
"height": "1",
|
|
351
|
+
"passthru": false,
|
|
352
|
+
"label": "Bypass: front_door",
|
|
353
|
+
"tooltip": "",
|
|
354
|
+
"color": "white",
|
|
355
|
+
"bgcolor": "#6e7681",
|
|
356
|
+
"icon": "fa-ban",
|
|
357
|
+
"payload": "{\"command\":\"bypass\",\"zone\":\"front_door\"}",
|
|
358
|
+
"payloadType": "json",
|
|
359
|
+
"topic": "",
|
|
360
|
+
"topicType": "str",
|
|
361
|
+
"x": 180,
|
|
362
|
+
"y": 640,
|
|
363
|
+
"wires": [
|
|
364
|
+
[
|
|
365
|
+
"c44ac2b6af1a1e2a"
|
|
366
|
+
]
|
|
367
|
+
]
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
"id": "c44ac2b6af1a1e29",
|
|
371
|
+
"type": "ui_button",
|
|
372
|
+
"z": "b81f9a4b2f9c1a10",
|
|
373
|
+
"name": "Unbypass front door",
|
|
374
|
+
"group": "b2b3c4e5f6078891",
|
|
375
|
+
"order": 10,
|
|
376
|
+
"width": "6",
|
|
377
|
+
"height": "1",
|
|
378
|
+
"passthru": false,
|
|
379
|
+
"label": "Unbypass: front_door",
|
|
380
|
+
"tooltip": "",
|
|
381
|
+
"color": "white",
|
|
382
|
+
"bgcolor": "#6e7681",
|
|
383
|
+
"icon": "fa-check",
|
|
384
|
+
"payload": "{\"command\":\"unbypass\",\"zone\":\"front_door\"}",
|
|
385
|
+
"payloadType": "json",
|
|
386
|
+
"topic": "",
|
|
387
|
+
"topicType": "str",
|
|
388
|
+
"x": 190,
|
|
389
|
+
"y": 680,
|
|
390
|
+
"wires": [
|
|
391
|
+
[
|
|
392
|
+
"c44ac2b6af1a1e2a"
|
|
393
|
+
]
|
|
394
|
+
]
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
"id": "c44ac2b6af1a1e2a",
|
|
398
|
+
"type": "function",
|
|
399
|
+
"z": "b81f9a4b2f9c1a10",
|
|
400
|
+
"name": "Build control msg",
|
|
401
|
+
"func": "const payload = msg.payload;\n\nmsg.topic = \"alarm\";\n\nif (payload && typeof payload === \"object\") {\n if (typeof payload.command === \"string\") msg.command = payload.command;\n if (payload.zone != null) msg.zone = payload.zone;\n if (payload.code != null) msg.code = payload.code;\n} else if (typeof payload === \"string\") {\n msg.command = payload;\n}\n\nreturn msg;",
|
|
402
|
+
"outputs": 1,
|
|
403
|
+
"noerr": 0,
|
|
404
|
+
"initialize": "",
|
|
405
|
+
"finalize": "",
|
|
406
|
+
"libs": [],
|
|
407
|
+
"x": 450,
|
|
408
|
+
"y": 460,
|
|
409
|
+
"wires": [
|
|
410
|
+
[
|
|
411
|
+
"d0c1b2a3f4e50617"
|
|
412
|
+
]
|
|
413
|
+
]
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
"id": "d2e3f4a5b6c7d801",
|
|
417
|
+
"type": "ui_button",
|
|
418
|
+
"z": "b81f9a4b2f9c1a10",
|
|
419
|
+
"name": "Front door OPEN",
|
|
420
|
+
"group": "c3c3c4e5f6078892",
|
|
421
|
+
"order": 1,
|
|
422
|
+
"width": "6",
|
|
423
|
+
"height": "1",
|
|
424
|
+
"passthru": false,
|
|
425
|
+
"label": "Front door: OPEN",
|
|
426
|
+
"tooltip": "Sends topic sensor/frontdoor payload true",
|
|
427
|
+
"color": "white",
|
|
428
|
+
"bgcolor": "#d1242f",
|
|
429
|
+
"icon": "fa-door-open",
|
|
430
|
+
"payload": "true",
|
|
431
|
+
"payloadType": "bool",
|
|
432
|
+
"topic": "sensor/frontdoor",
|
|
433
|
+
"topicType": "str",
|
|
434
|
+
"x": 190,
|
|
435
|
+
"y": 760,
|
|
436
|
+
"wires": [
|
|
437
|
+
[
|
|
438
|
+
"d0c1b2a3f4e50617"
|
|
439
|
+
]
|
|
440
|
+
]
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
"id": "d2e3f4a5b6c7d802",
|
|
444
|
+
"type": "ui_button",
|
|
445
|
+
"z": "b81f9a4b2f9c1a10",
|
|
446
|
+
"name": "Front door CLOSED",
|
|
447
|
+
"group": "c3c3c4e5f6078892",
|
|
448
|
+
"order": 2,
|
|
449
|
+
"width": "6",
|
|
450
|
+
"height": "1",
|
|
451
|
+
"passthru": false,
|
|
452
|
+
"label": "Front door: CLOSED",
|
|
453
|
+
"tooltip": "Sends topic sensor/frontdoor payload false",
|
|
454
|
+
"color": "white",
|
|
455
|
+
"bgcolor": "#2ea043",
|
|
456
|
+
"icon": "fa-door-closed",
|
|
457
|
+
"payload": "false",
|
|
458
|
+
"payloadType": "bool",
|
|
459
|
+
"topic": "sensor/frontdoor",
|
|
460
|
+
"topicType": "str",
|
|
461
|
+
"x": 200,
|
|
462
|
+
"y": 800,
|
|
463
|
+
"wires": [
|
|
464
|
+
[
|
|
465
|
+
"d0c1b2a3f4e50617"
|
|
466
|
+
]
|
|
467
|
+
]
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
"id": "d2e3f4a5b6c7d803",
|
|
471
|
+
"type": "ui_button",
|
|
472
|
+
"z": "b81f9a4b2f9c1a10",
|
|
473
|
+
"name": "Living PIR MOTION",
|
|
474
|
+
"group": "c3c3c4e5f6078892",
|
|
475
|
+
"order": 3,
|
|
476
|
+
"width": "6",
|
|
477
|
+
"height": "1",
|
|
478
|
+
"passthru": false,
|
|
479
|
+
"label": "Living PIR: MOTION",
|
|
480
|
+
"tooltip": "Sends topic sensor/living_pir payload true",
|
|
481
|
+
"color": "white",
|
|
482
|
+
"bgcolor": "#ff9f0a",
|
|
483
|
+
"icon": "fa-walking",
|
|
484
|
+
"payload": "true",
|
|
485
|
+
"payloadType": "bool",
|
|
486
|
+
"topic": "sensor/living_pir",
|
|
487
|
+
"topicType": "str",
|
|
488
|
+
"x": 200,
|
|
489
|
+
"y": 840,
|
|
490
|
+
"wires": [
|
|
491
|
+
[
|
|
492
|
+
"d0c1b2a3f4e50617"
|
|
493
|
+
]
|
|
494
|
+
]
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
"id": "d2e3f4a5b6c7d804",
|
|
498
|
+
"type": "ui_button",
|
|
499
|
+
"z": "b81f9a4b2f9c1a10",
|
|
500
|
+
"name": "Living PIR CLEAR",
|
|
501
|
+
"group": "c3c3c4e5f6078892",
|
|
502
|
+
"order": 4,
|
|
503
|
+
"width": "6",
|
|
504
|
+
"height": "1",
|
|
505
|
+
"passthru": false,
|
|
506
|
+
"label": "Living PIR: CLEAR",
|
|
507
|
+
"tooltip": "Sends topic sensor/living_pir payload false",
|
|
508
|
+
"color": "white",
|
|
509
|
+
"bgcolor": "#6e7681",
|
|
510
|
+
"icon": "fa-pause",
|
|
511
|
+
"payload": "false",
|
|
512
|
+
"payloadType": "bool",
|
|
513
|
+
"topic": "sensor/living_pir",
|
|
514
|
+
"topicType": "str",
|
|
515
|
+
"x": 190,
|
|
516
|
+
"y": 880,
|
|
517
|
+
"wires": [
|
|
518
|
+
[
|
|
519
|
+
"d0c1b2a3f4e50617"
|
|
520
|
+
]
|
|
521
|
+
]
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
"id": "f50b6a7c1c8b3d10",
|
|
525
|
+
"type": "debug",
|
|
526
|
+
"z": "b81f9a4b2f9c1a10",
|
|
527
|
+
"name": "All events",
|
|
528
|
+
"active": true,
|
|
529
|
+
"tosidebar": true,
|
|
530
|
+
"console": false,
|
|
531
|
+
"tostatus": false,
|
|
532
|
+
"complete": "true",
|
|
533
|
+
"targetType": "full",
|
|
534
|
+
"statusVal": "",
|
|
535
|
+
"statusType": "auto",
|
|
536
|
+
"x": 520,
|
|
537
|
+
"y": 160,
|
|
538
|
+
"wires": []
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
"id": "f50b6a7c1c8b3d11",
|
|
542
|
+
"type": "debug",
|
|
543
|
+
"z": "b81f9a4b2f9c1a10",
|
|
544
|
+
"name": "Siren output",
|
|
545
|
+
"active": true,
|
|
546
|
+
"tosidebar": true,
|
|
547
|
+
"console": false,
|
|
548
|
+
"tostatus": false,
|
|
549
|
+
"complete": "true",
|
|
550
|
+
"targetType": "full",
|
|
551
|
+
"statusVal": "",
|
|
552
|
+
"statusType": "auto",
|
|
553
|
+
"x": 530,
|
|
554
|
+
"y": 200,
|
|
555
|
+
"wires": []
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
"id": "f50b6a7c1c8b3d12",
|
|
559
|
+
"type": "debug",
|
|
560
|
+
"z": "b81f9a4b2f9c1a10",
|
|
561
|
+
"name": "Errors / denied",
|
|
562
|
+
"active": true,
|
|
563
|
+
"tosidebar": true,
|
|
564
|
+
"console": false,
|
|
565
|
+
"tostatus": false,
|
|
566
|
+
"complete": "true",
|
|
567
|
+
"targetType": "full",
|
|
568
|
+
"statusVal": "",
|
|
569
|
+
"statusType": "auto",
|
|
570
|
+
"x": 550,
|
|
571
|
+
"y": 240,
|
|
572
|
+
"wires": []
|
|
573
|
+
}
|
|
574
|
+
]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script type="text/javascript">
|
|
2
2
|
RED.nodes.registerType("AlarmSystemUltimate", {
|
|
3
3
|
category: "Alarm Ultimate",
|
|
4
|
-
color: "#
|
|
4
|
+
color: "#A8DADC",
|
|
5
5
|
defaults: {
|
|
6
6
|
name: { value: "" },
|
|
7
7
|
controlTopic: { value: "alarm" },
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"Open Zones (Arming)",
|
|
50
50
|
"Open Zones (On Request)",
|
|
51
51
|
],
|
|
52
|
-
icon: "
|
|
52
|
+
icon: "alarm-ultimate.svg",
|
|
53
53
|
label: function () {
|
|
54
54
|
return this.name || "Alarm System (BETA)";
|
|
55
55
|
},
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
</div>
|
|
190
190
|
|
|
191
191
|
<div class="form-row">
|
|
192
|
-
<label
|
|
192
|
+
<label>WEB PAGE</label>
|
|
193
193
|
<button type="button" class="red-ui-button" id="node-input-zones-panel">
|
|
194
194
|
<i class="fa fa-keyboard-o"></i> Panel
|
|
195
195
|
</button>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script type="text/javascript">
|
|
2
2
|
RED.nodes.registerType("AlarmUltimateSiren", {
|
|
3
3
|
category: "Alarm Ultimate",
|
|
4
|
-
color: "#
|
|
4
|
+
color: "#CFEFF0",
|
|
5
5
|
defaults: {
|
|
6
6
|
name: { value: "" },
|
|
7
7
|
alarmId: { value: "", required: true },
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
inputs: 0,
|
|
12
12
|
outputs: 1,
|
|
13
|
-
icon: "
|
|
13
|
+
icon: "alarm-ultimate-siren.svg",
|
|
14
14
|
label: function () {
|
|
15
15
|
return this.name || "Alarm Siren";
|
|
16
16
|
},
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
|
|
56
56
|
<script type="text/html" data-template-name="AlarmUltimateSiren">
|
|
57
57
|
<div class="form-row">
|
|
58
|
-
<label
|
|
58
|
+
<label>WEB PAGE</label>
|
|
59
59
|
<button type="button" class="red-ui-button" id="node-input-alarm-panel">
|
|
60
60
|
<i class="fa fa-keyboard-o"></i> Panel
|
|
61
61
|
</button>
|
|
@@ -28,6 +28,12 @@ module.exports = function (RED) {
|
|
|
28
28
|
if (lastActive === active && reason !== 'init') return;
|
|
29
29
|
lastActive = active;
|
|
30
30
|
|
|
31
|
+
setNodeStatus({
|
|
32
|
+
fill: active ? 'red' : 'green',
|
|
33
|
+
shape: 'dot',
|
|
34
|
+
text: active ? 'Siren on' : 'Siren off',
|
|
35
|
+
});
|
|
36
|
+
|
|
31
37
|
const msg = {
|
|
32
38
|
topic: buildTopic(evt && evt.controlTopic),
|
|
33
39
|
payload: active,
|
|
@@ -52,7 +58,6 @@ module.exports = function (RED) {
|
|
|
52
58
|
const ui = api.getState && typeof api.getState === 'function' ? api.getState() : null;
|
|
53
59
|
const state = ui && ui.state ? ui.state : null;
|
|
54
60
|
const active = state ? Boolean(state.sirenActive) : null;
|
|
55
|
-
setNodeStatus({ fill: 'green', shape: 'dot', text: `Connected (${active ? 'on' : 'off'})` });
|
|
56
61
|
emitSiren(active, { alarmId, controlTopic: ui.controlTopic, name: ui.name }, reason);
|
|
57
62
|
}
|
|
58
63
|
|
|
@@ -80,4 +85,3 @@ module.exports = function (RED) {
|
|
|
80
85
|
|
|
81
86
|
RED.nodes.registerType('AlarmUltimateSiren', AlarmUltimateSiren);
|
|
82
87
|
};
|
|
83
|
-
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script type="text/javascript">
|
|
2
2
|
RED.nodes.registerType("AlarmUltimateState", {
|
|
3
3
|
category: "Alarm Ultimate",
|
|
4
|
-
color: "#
|
|
4
|
+
color: "#CFEFF0",
|
|
5
5
|
defaults: {
|
|
6
6
|
name: { value: "" },
|
|
7
7
|
alarmId: { value: "", required: true },
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
inputs: 0,
|
|
12
12
|
outputs: 1,
|
|
13
|
-
icon: "
|
|
13
|
+
icon: "alarm-ultimate-state.svg",
|
|
14
14
|
label: function () {
|
|
15
15
|
return this.name || "Alarm State";
|
|
16
16
|
},
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
|
|
56
56
|
<script type="text/html" data-template-name="AlarmUltimateState">
|
|
57
57
|
<div class="form-row">
|
|
58
|
-
<label
|
|
58
|
+
<label>WEB PAGE</label>
|
|
59
59
|
<button type="button" class="red-ui-button" id="node-input-alarm-panel">
|
|
60
60
|
<i class="fa fa-keyboard-o"></i> Panel
|
|
61
61
|
</button>
|