homebridge-securitysystem 11.2.0 → 11.3.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "pluginAlias": "security-system",
3
3
  "pluginType": "accessory",
4
- "headerDisplay": "Create a security system accessory that can be triggered by HomeKit sensors.",
4
+ "headerDisplay": "Create a fully-featured security system accessory for HomeKit. Exposes switches, sensors, and interfaces that work with the four built-in Homekit security modes: 'Off', 'Home', 'Away', and 'Night'",
5
5
  "footerDisplay": "[Need help?](https://github.com/MiguelRipoll23/homebridge-securitysystem/issues) | [Donate](https://buymeacoffee.com/miguelripoll23)",
6
6
  "schema": {
7
7
  "title": "Security System",
@@ -9,7 +9,7 @@
9
9
  "properties": {
10
10
  "name": {
11
11
  "title": "Name",
12
- "description": "",
12
+ "description": "Name for your security system that shows up in Homekit.",
13
13
  "type": "string",
14
14
  "default": "Security System",
15
15
  "required": true
@@ -21,353 +21,162 @@
21
21
  "default": "S3CUR1TYSYST3M",
22
22
  "required": true
23
23
  },
24
+ "disabled_modes": {
25
+ "title": "Disabled Modes",
26
+ "description": "",
27
+ "type": "array",
28
+ "required": false,
29
+ "uniqueItems": true,
30
+ "items": {
31
+ "title": "Mode",
32
+ "type": "string",
33
+ "enum": ["Home", "Away", "Night"]
34
+ }
35
+ },
24
36
  "default_mode": {
25
37
  "title": "Default Mode",
26
38
  "description": "",
27
39
  "type": "string",
28
40
  "default": "Off",
29
41
  "required": true,
30
- "enum": ["Off", "Home", "Night", "Away"]
42
+ "enum": ["Off", "Home", "Away", "Night"]
31
43
  },
32
44
  "arm_seconds": {
33
- "title": "Arming Delay Seconds",
34
- "description": "",
45
+ "title": "Arming Delay (seconds)",
46
+ "description": "Give yourself time to leave before the system is armed.",
35
47
  "type": "integer",
36
48
  "default": 0,
37
49
  "required": false,
38
50
  "minimum": 0
39
51
  },
40
52
  "trigger_seconds": {
41
- "title": "Trigger Delay Seconds",
42
- "description": "",
53
+ "title": "Trigger Delay (seconds)",
54
+ "description": "Give yourself time to disable the system when you get home.",
43
55
  "type": "integer",
44
56
  "default": 0,
45
57
  "required": false,
46
58
  "minimum": 0
47
59
  },
48
60
  "reset_minutes": {
49
- "title": "Reset Delay Minutes",
50
- "description": "",
61
+ "title": "Reset Delay (minutes)",
62
+ "description": "The system will remain triggered for this long (unless otherwise reset).",
51
63
  "type": "integer",
52
64
  "default": 10,
53
65
  "required": false,
54
66
  "minimum": 1
55
67
  },
56
- "save_state": {
57
- "title": "Save Data Using Storage",
58
- "description": "Persists the previous state after shutdowns and reboots.",
59
- "type": "boolean",
60
- "default": false,
61
- "required": false
62
- },
63
- "proxy_mode": {
64
- "title": "Enable Proxy Mode",
65
- "description": "Ignores webhooks/commands for server requests.",
66
- "type": "boolean",
67
- "default": false,
68
- "required": false
69
- },
70
- "test_mode": {
71
- "title": "Enable Test Mode",
72
- "description": "Ignores the webhook and command when the security system triggers.",
68
+ "mode_switches": {
69
+ "title": "Show Mode Switches",
70
+ "description": "Adds switches for setting and reading the security system's active mode (bypassing HomeKit confirmations).",
73
71
  "type": "boolean",
74
72
  "default": false,
75
73
  "required": false
76
74
  },
77
- "trip_switch_name": {
78
- "title": "Trip Switch Name",
79
- "description": "",
80
- "type": "string",
81
- "default": "Trip",
82
- "required": false
83
- },
84
- "trip_home_switch_name": {
85
- "title": "Trip Home Switch Name",
86
- "description": "",
87
- "type": "string",
88
- "default": "Trip Home",
89
- "required": false
90
- },
91
- "trip_away_switch_name": {
92
- "title": "Trip Away Switch Name",
93
- "description": "",
94
- "type": "string",
95
- "default": "Trip Away",
96
- "required": false
97
- },
98
- "trip_night_switch_name": {
99
- "title": "Trip Night Switch Name",
100
- "description": "",
101
- "type": "string",
102
- "default": "Trip Night",
103
- "required": false
104
- },
105
- "trip_override_switch_name": {
106
- "title": "Trip Override Switch Name",
107
- "description": "",
108
- "type": "string",
109
- "default": "Trip Override",
110
- "required": false
111
- },
112
75
  "mode_home_switch_name": {
113
- "title": "Mode Home Switch Name",
114
- "description": "",
76
+ "title": "Home-Mode Switch Name",
77
+ "description": "\"Set-only\" switch; trying to turn it off does nothing.",
115
78
  "type": "string",
116
- "default": "Mode Home",
117
- "required": false
79
+ "default": "Set Home-Mode",
80
+ "required": false,
81
+ "condition": {
82
+ "functionBody": "return !(model.disabled_modes || []).includes('Home') && model.mode_switches === true;"
83
+ }
118
84
  },
119
85
  "mode_away_switch_name": {
120
- "title": "Mode Away Switch Name",
121
- "description": "",
86
+ "title": "Away-Mode Switch Name",
87
+ "description": "\"Set-only\" switch; trying to turn it off does nothing.",
122
88
  "type": "string",
123
- "default": "Mode Away",
124
- "required": false
89
+ "default": "Set Away-Mode",
90
+ "required": false,
91
+ "condition": {
92
+ "functionBody": "return !(model.disabled_modes || []).includes('Away') && model.mode_switches === true;"
93
+ }
125
94
  },
126
95
  "mode_night_switch_name": {
127
- "title": "Mode Night Switch Name",
128
- "description": "",
129
- "type": "string",
130
- "default": "Mode Night",
131
- "required": false
132
- },
133
- "mode_off_switch_name": {
134
- "title": "Mode Off Switch Name",
135
- "description": "",
136
- "type": "string",
137
- "default": "Mode Off",
138
- "required": false
139
- },
140
- "mode_away_extended_switch_name": {
141
- "title": "Mode Away Extended Switch Name",
142
- "description": "",
143
- "type": "string",
144
- "default": "Mode Away Extended",
145
- "required": false
146
- },
147
- "mode_pause_switch_name": {
148
- "title": "Mode Pause Name",
149
- "description": "",
150
- "type": "string",
151
- "default": "Mode Pause",
152
- "required": false
153
- },
154
- "audio_switch_name": {
155
- "title": "Audio Name",
156
- "description": "",
157
- "type": "string",
158
- "default": "Audio",
159
- "required": false
160
- },
161
- "log_directory": {
162
- "title": "Log Directory Path",
163
- "description": "",
96
+ "title": "Night-Mode Switch Name",
97
+ "description": "\"Set-only\" switch; trying to turn it off does nothing.",
164
98
  "type": "string",
99
+ "default": "Set Night-Mode",
165
100
  "required": false,
166
- "placeholder": "/home/user/logs"
167
- },
168
- "home_arm_seconds": {
169
- "title": "Home Arming Delay Seconds",
170
- "description": "",
171
- "type": "integer",
172
- "required": false,
173
- "minimum": 0
174
- },
175
- "night_arm_seconds": {
176
- "title": "Night Arming Delay Seconds",
177
- "description": "",
178
- "type": "integer",
179
- "required": false,
180
- "minimum": 0
181
- },
182
- "away_arm_seconds": {
183
- "title": "Away Arming Delay Seconds",
184
- "description": "",
185
- "type": "integer",
186
- "required": false,
187
- "minimum": 0
188
- },
189
- "home_trigger_seconds": {
190
- "title": "Home Trigger Delay Seconds",
191
- "description": "",
192
- "type": "integer",
193
- "required": false,
194
- "minimum": 0
195
- },
196
- "night_trigger_seconds": {
197
- "title": "Night Trigger Delay Seconds",
198
- "description": "",
199
- "type": "integer",
200
- "required": false,
201
- "minimum": 0
202
- },
203
- "away_trigger_seconds": {
204
- "title": "Away Trigger Delay Seconds",
205
- "description": "",
206
- "type": "integer",
207
- "required": false,
208
- "minimum": 0
209
- },
210
- "mode_away_extended_switch_trigger_seconds": {
211
- "title": "Away Extended Delay Trigger Seconds",
212
- "description": "",
213
- "type": "integer",
214
- "required": false,
215
- "minimum": 0
216
- },
217
- "override_off": {
218
- "title": "Trigger During Off Mode",
219
- "description": "Allows the security system to be triggered while disarmed.",
220
- "type": "boolean",
221
- "default": false,
222
- "required": false
223
- },
224
- "reset_off_flow": {
225
- "title": "Reset Using Off Mode",
226
- "description": "Resets the security system when triggered by passing through the Off mode.",
227
- "type": "boolean",
228
- "default": false,
229
- "required": false
101
+ "condition": {
102
+ "functionBody": "return !(model.disabled_modes || []).includes('Night') && model.mode_switches === true;"
103
+ }
230
104
  },
231
- "double_knock": {
232
- "title": "Use Double-Knock",
233
- "description": "Needs the Trip switch to be turn on twice within a time window.",
105
+ "mode_off_switch": {
106
+ "title": "Show Off-Mode Switch",
107
+ "description": "Adds a switch to disarm the security system (only if \"Show Mode Switches\" is also enabled).",
234
108
  "type": "boolean",
235
- "default": false,
236
- "required": false
237
- },
238
- "double_knock_seconds": {
239
- "title": "Time Window Seconds",
240
- "description": "",
241
- "type": "integer",
242
- "default": 90,
243
- "required": false,
244
- "minimum": 0
245
- },
246
- "home_double_knock_seconds": {
247
- "title": "Home Double-Knock Seconds",
248
- "description": "",
249
- "type": "integer",
250
- "required": false,
251
- "minimum": 0
252
- },
253
- "away_double_knock_seconds": {
254
- "title": "Away Double-Knock Seconds",
255
- "description": "",
256
- "type": "integer",
257
- "required": false,
258
- "minimum": 0
259
- },
260
- "night_double_knock_seconds": {
261
- "title": "Night Double-Knock Seconds",
262
- "description": "",
263
- "type": "integer",
264
- "required": false,
265
- "minimum": 0
266
- },
267
- "double_knock_modes": {
268
- "title": "Double-Knock Modes",
269
- "description": "",
270
- "type": "array",
271
- "default": [],
109
+ "default": true,
272
110
  "required": false,
273
- "items": {
274
- "title": "Mode",
275
- "type": "string",
276
- "enum": ["Home", "Night", "Away"],
277
- "uniqueItems": true
111
+ "condition": {
112
+ "functionBody": "return model.mode_switches === true;"
278
113
  }
279
114
  },
280
- "disabled_modes": {
281
- "title": "Disabled Modes",
282
- "description": "",
283
- "type": "array",
115
+ "mode_off_switch_name": {
116
+ "title": "Off-Mode Switch Name",
117
+ "description": "\"Set-only\" switch; trying to turn it off does nothing. Turning this switch ON disarms the security system.",
118
+ "type": "string",
119
+ "default": "Set Off-Mode",
284
120
  "required": false,
285
- "items": {
286
- "title": "Mode",
287
- "type": "string",
288
- "enum": ["Home", "Night", "Away"],
289
- "uniqueItems": true
121
+ "condition": {
122
+ "functionBody": "return model.mode_switches === true && model.mode_off_switch === true;"
290
123
  }
291
124
  },
292
- "arming_sensor": {
293
- "title": "Show Arming Sensor",
294
- "description": "Adds a sensor that triggers when the security system is being armed.",
295
- "type": "boolean",
296
- "default": false,
297
- "required": false
298
- },
299
- "tripped_sensor": {
300
- "title": "Show Tripped Sensor",
301
- "description": "Adds a sensor that triggers multiple times when any of the Trip switches have been turned on.",
125
+ "mode_away_extended_switch": {
126
+ "title": "Show Extended Away-Mode Switch",
127
+ "description": "Adds an additional Away-Mode switch that can be used in automations (e.g. for extended time away such as vacation).",
302
128
  "type": "boolean",
303
129
  "default": false,
304
130
  "required": false
305
131
  },
306
- "tripped_sensor_seconds": {
307
- "title": "Tripped Sensor Seconds",
308
- "description": "",
132
+ "mode_away_extended_switch_trigger_seconds": {
133
+ "title": "Extended Away-Mode Set Delay (seconds)",
134
+ "description": "Give yourself time to leave before the system is armed.",
309
135
  "type": "integer",
310
- "default": 5,
136
+ "default": 0,
311
137
  "required": false,
312
- "minimum": 0
313
- },
314
- "triggered_sensor": {
315
- "title": "Show Triggered Sensor",
316
- "description": "Adds a sensor that triggers multiple times when the security system has been triggered.",
317
- "type": "boolean",
318
- "default": false,
319
- "required": false
138
+ "minimum": 0,
139
+ "condition": {
140
+ "functionBody": "return model.mode_away_extended_switch === true;"
141
+ }
320
142
  },
321
- "triggered_sensor_seconds": {
322
- "title": "Triggered Sensor Seconds",
323
- "description": "",
324
- "type": "integer",
325
- "default": 5,
143
+ "mode_away_extended_switch_name": {
144
+ "title": "Extended Away-Mode Switch Name",
145
+ "description": "\"Set-only\" switch; trying to turn it off does nothing.",
146
+ "type": "string",
147
+ "default": "Set Extended Away-Mode",
326
148
  "required": false,
327
- "minimum": 0
328
- },
329
- "reset_sensor": {
330
- "title": "Show Triggered Reset Sensor",
331
- "description": "Adds a sensor that triggers when the security system has reset after being triggered.",
332
- "type": "boolean",
333
- "default": false,
334
- "required": false
335
- },
336
- "mode_switches": {
337
- "title": "Show Mode Switches",
338
- "description": "Adds switches for every mode in order to create automations based on a mode change or bypass confirmations.",
339
- "type": "boolean",
340
- "default": false,
341
- "required": false
342
- },
343
- "mode_off_switch": {
344
- "title": "Show Mode Off Switch",
345
- "description": "Adds a switch to disarm the security system if the \"Show Mode Switches\" option is enabled.",
346
- "type": "boolean",
347
- "default": true,
348
- "required": false
349
- },
350
- "mode_away_extended_switch": {
351
- "title": "Show Mode Away Extended Switch",
352
- "description": "Adds a switch that sets the Away mode and can be used as a condition in automations.",
353
- "type": "boolean",
354
- "default": false,
355
- "required": false
149
+ "condition": {
150
+ "functionBody": "return model.mode_away_extended_switch === true;"
151
+ }
356
152
  },
357
153
  "mode_pause_switch": {
358
154
  "title": "Show Mode Pause Switch",
359
- "description": "Adds a switch that will temporarily or indefinitely (if minutes is to zero) disarm the security system.",
155
+ "description": "Adds a switch that will disarm the security system for a set period of time.",
360
156
  "type": "boolean",
361
157
  "default": false,
362
158
  "required": false
363
159
  },
364
160
  "pause_minutes": {
365
- "title": "Pause Minutes",
366
- "description": "",
161
+ "title": "Pause Time (minutes)",
162
+ "description": "Set to 0 to pause indefinitely.",
367
163
  "type": "integer",
368
164
  "default": 0,
369
165
  "required": false,
370
- "minimum": 0
166
+ "minimum": 0,
167
+ "condition": {
168
+ "functionBody": "return model.mode_pause_switch === true;"
169
+ }
170
+ },
171
+ "mode_pause_switch_name": {
172
+ "title": "Mode Pause Name",
173
+ "description": "",
174
+ "type": "string",
175
+ "default": "Mode Pause",
176
+ "required": false,
177
+ "condition": {
178
+ "functionBody": "return model.mode_pause_switch === true;"
179
+ }
371
180
  },
372
181
  "arming_lock_switch": {
373
182
  "title": "Show Arming Lock Switch (experimental)",
@@ -384,29 +193,79 @@
384
193
  "required": false
385
194
  },
386
195
  "trip_switch": {
387
- "title": "Show Trip Switch",
388
- "description": "Adds a global switch that will trip the security system.",
196
+ "title": "Show Global Trip Switch",
197
+ "description": "Adds a global switch that will trip the security system if any mode other than \"Off\" is active.",
389
198
  "type": "boolean",
390
199
  "default": false,
391
200
  "required": false
392
201
  },
202
+ "trip_switch_name": {
203
+ "title": "Global Trip Switch Name",
204
+ "description": "",
205
+ "type": "string",
206
+ "default": "Global Trip",
207
+ "required": false,
208
+ "condition": {
209
+ "functionBody": "return model.trip_switch === true;"
210
+ }
211
+ },
393
212
  "trip_override_switch": {
394
213
  "title": "Show Trip Override Switch",
395
- "description": "Adds a special switch that will trigger the security system bypassing the conditions set.",
214
+ "description": "Adds a switch that will immediately and unconditionally trigger the security system, even if it is disarmed (e.g. for use as an SOS/Panic switch).",
396
215
  "type": "boolean",
397
216
  "default": false,
398
217
  "required": false
399
218
  },
219
+ "trip_override_switch_name": {
220
+ "title": "Trip Override Switch Name",
221
+ "description": "",
222
+ "type": "string",
223
+ "default": "Trip Override",
224
+ "required": false,
225
+ "condition": {
226
+ "functionBody": "return model.trip_override_switch === true;"
227
+ }
228
+ },
400
229
  "trip_mode_switches": {
401
230
  "title": "Show Trip Mode Switches",
402
- "description": "Adds switches that will trigger the security system when their mode is set.",
231
+ "description": "Adds switches for each mode that will trigger the security system if their respective mode is active.",
403
232
  "type": "boolean",
404
233
  "default": true,
405
234
  "required": false
406
235
  },
236
+ "trip_home_switch_name": {
237
+ "title": "Trip Home Switch Name",
238
+ "description": "",
239
+ "type": "string",
240
+ "default": "Trip Home",
241
+ "required": false,
242
+ "condition": {
243
+ "functionBody": "return !(model.disabled_modes || []).includes('Home') && model.trip_mode_switches === true;"
244
+ }
245
+ },
246
+ "trip_away_switch_name": {
247
+ "title": "Trip Away Switch Name",
248
+ "description": "",
249
+ "type": "string",
250
+ "default": "Trip Away",
251
+ "required": false,
252
+ "condition": {
253
+ "functionBody": "return !(model.disabled_modes || []).includes('Away') && model.trip_mode_switches === true;"
254
+ }
255
+ },
256
+ "trip_night_switch_name": {
257
+ "title": "Trip Night Switch Name",
258
+ "description": "",
259
+ "type": "string",
260
+ "default": "Trip Night",
261
+ "required": false,
262
+ "condition": {
263
+ "functionBody": "return !(model.disabled_modes || []).includes('Night') && model.trip_mode_switches === true;"
264
+ }
265
+ },
407
266
  "trip_home_switches": {
408
267
  "title": "Custom Trip Home Switches",
409
- "description": "Additional trip switches for Home mode. Final name is \"Home <Label>\".",
268
+ "description": "Additional trip switches for Home mode. Name will be prepended with \"Trip Home\".",
410
269
  "type": "array",
411
270
  "items": {
412
271
  "title": "Switch",
@@ -419,11 +278,14 @@
419
278
  }
420
279
  }
421
280
  },
422
- "required": false
281
+ "required": false,
282
+ "condition": {
283
+ "functionBody": "return !(model.disabled_modes || []).includes('Home');"
284
+ }
423
285
  },
424
286
  "trip_away_switches": {
425
287
  "title": "Custom Trip Away Switches",
426
- "description": "Additional trip switches for Away mode. Final name is \"Away <Label>\".",
288
+ "description": "Additional trip switches for Away mode. Name will be prepended with \"Trip Away\".",
427
289
  "type": "array",
428
290
  "items": {
429
291
  "title": "Switch",
@@ -436,11 +298,14 @@
436
298
  }
437
299
  }
438
300
  },
439
- "required": false
301
+ "required": false,
302
+ "condition": {
303
+ "functionBody": "return !(model.disabled_modes || []).includes('Away');"
304
+ }
440
305
  },
441
306
  "trip_night_switches": {
442
307
  "title": "Custom Trip Night Switches",
443
- "description": "Additional trip switches for Night mode. Final name is \"Night <Label>\".",
308
+ "description": "Additional trip switches for Night mode. Name will be prepended with \"Trip Night\".",
444
309
  "type": "array",
445
310
  "items": {
446
311
  "title": "Switch",
@@ -453,15 +318,78 @@
453
318
  }
454
319
  }
455
320
  },
456
- "required": false
321
+ "required": false,
322
+ "condition": {
323
+ "functionBody": "return !(model.disabled_modes || []).includes('Night');"
324
+ }
457
325
  },
458
326
  "audio_switch": {
459
- "title": "Show Audio Switch",
327
+ "title": "Show Audio Enable Switch",
460
328
  "description": "Adds a global switch to enable or disable audio except for alarm triggered.",
461
329
  "type": "boolean",
462
330
  "default": false,
463
331
  "required": false
464
332
  },
333
+ "audio_switch_name": {
334
+ "title": "Audio Enable Switch Name",
335
+ "description": "",
336
+ "type": "string",
337
+ "default": "Enable Audio",
338
+ "required": false,
339
+ "condition": {
340
+ "functionBody": "return model.audio_switch === true;"
341
+ }
342
+ },
343
+ "arming_sensor": {
344
+ "title": "Show Arming Sensor",
345
+ "description": "Adds a sensor that asserts when the security system is being armed.",
346
+ "type": "boolean",
347
+ "default": false,
348
+ "required": false
349
+ },
350
+ "tripped_sensor": {
351
+ "title": "Show Tripped Sensor",
352
+ "description": "Adds a sensor that pulses at the set rate when any of the Trip switches have been turned on.",
353
+ "type": "boolean",
354
+ "default": false,
355
+ "required": false
356
+ },
357
+ "tripped_sensor_seconds": {
358
+ "title": "Tripped Sensor Pulse Rate (seconds)",
359
+ "description": "",
360
+ "type": "integer",
361
+ "default": 5,
362
+ "required": false,
363
+ "minimum": 0,
364
+ "condition": {
365
+ "functionBody": "return model.tripped_sensor === true;"
366
+ }
367
+ },
368
+ "triggered_sensor": {
369
+ "title": "Show Triggered Sensor",
370
+ "description": "Adds a sensor that pulses at the set rate when the security system has been triggered.",
371
+ "type": "boolean",
372
+ "default": false,
373
+ "required": false
374
+ },
375
+ "triggered_sensor_seconds": {
376
+ "title": "Triggered Sensor Pulse Rate (seconds)",
377
+ "description": "",
378
+ "type": "integer",
379
+ "default": 5,
380
+ "required": false,
381
+ "minimum": 0,
382
+ "condition": {
383
+ "functionBody": "return model.triggered_sensor === true;"
384
+ }
385
+ },
386
+ "reset_sensor": {
387
+ "title": "Show Triggered Reset Sensor",
388
+ "description": "Adds a sensor that asserts when the security system has reset after being triggered.",
389
+ "type": "boolean",
390
+ "default": false,
391
+ "required": false
392
+ },
465
393
  "audio": {
466
394
  "title": "Play Sounds (local-only, ffmpeg required)",
467
395
  "description": "Warns of pending or current events by playing sounds.",
@@ -635,19 +563,19 @@
635
563
  "required": false,
636
564
  "placeholder": "echo target away"
637
565
  },
638
- "command_target_off": {
639
- "title": "Target Mode: Off",
566
+ "command_target_night": {
567
+ "title": "Target Mode: Night",
640
568
  "description": "",
641
569
  "type": "string",
642
570
  "required": false,
643
- "placeholder": "echo target off"
571
+ "placeholder": "echo target night"
644
572
  },
645
- "command_target_night": {
646
- "title": "Target Mode: Night",
573
+ "command_target_off": {
574
+ "title": "Target Mode: Off",
647
575
  "description": "",
648
576
  "type": "string",
649
577
  "required": false,
650
- "placeholder": "echo target night"
578
+ "placeholder": "echo target off"
651
579
  },
652
580
  "command_current_home": {
653
581
  "title": "Current Mode: Home",
@@ -661,73 +589,240 @@
661
589
  "description": "",
662
590
  "type": "string",
663
591
  "required": false,
664
- "placeholder": "echo current away"
592
+ "placeholder": "echo current away"
593
+ },
594
+ "command_current_night": {
595
+ "title": "Current Mode: Night",
596
+ "description": "",
597
+ "type": "string",
598
+ "required": false,
599
+ "placeholder": "echo current night"
600
+ },
601
+ "command_current_off": {
602
+ "title": "Current Mode: Off",
603
+ "description": "",
604
+ "type": "string",
605
+ "required": false,
606
+ "placeholder": "echo current off"
607
+ },
608
+ "command_current_warning": {
609
+ "title": "Current Event: Warning",
610
+ "description": "",
611
+ "type": "string",
612
+ "required": false,
613
+ "placeholder": "echo current warning"
614
+ },
615
+ "command_current_triggered": {
616
+ "title": "Current Mode: Triggered",
617
+ "description": "",
618
+ "type": "string",
619
+ "required": false,
620
+ "placeholder": "echo current triggered"
621
+ },
622
+ "mqtt_broker": {
623
+ "title": "MQTT Broker URL",
624
+ "description": "",
625
+ "type": "string",
626
+ "required": false,
627
+ "placeholder": "mqtt://localhost:1883"
628
+ },
629
+ "mqtt_username": {
630
+ "title": "MQTT Username",
631
+ "description": "",
632
+ "type": "string",
633
+ "required": false
634
+ },
635
+ "mqtt_password": {
636
+ "title": "MQTT Password",
637
+ "description": "",
638
+ "type": "string",
639
+ "required": false
640
+ },
641
+ "mqtt_topic": {
642
+ "title": "MQTT Topic",
643
+ "description": "",
644
+ "type": "string",
645
+ "default": "security-system/state",
646
+ "required": false
647
+ },
648
+ "mqtt_client_id": {
649
+ "title": "MQTT Client ID",
650
+ "description": "",
651
+ "type": "string",
652
+ "required": false
653
+ },
654
+ "log_directory": {
655
+ "title": "Log Directory Path",
656
+ "description": "",
657
+ "type": "string",
658
+ "required": false,
659
+ "placeholder": "/home/user/logs"
660
+ },
661
+ "save_state": {
662
+ "title": "Save Data Using Storage",
663
+ "description": "Persists the previous state after shutdowns and reboots.",
664
+ "type": "boolean",
665
+ "default": true,
666
+ "required": false
667
+ },
668
+ "test_mode": {
669
+ "title": "Enable Test Mode",
670
+ "description": "Ignores the webhook and command when the security system triggers.",
671
+ "type": "boolean",
672
+ "default": false,
673
+ "required": false
674
+ },
675
+ "home_arm_seconds": {
676
+ "title": "Home Arming Delay (seconds)",
677
+ "description": "Overrides the global Arming Delay if set.",
678
+ "type": "integer",
679
+ "required": false,
680
+ "minimum": 0,
681
+ "condition": {
682
+ "functionBody": "return !(model.disabled_modes || []).includes('Home');"
683
+ }
684
+ },
685
+ "away_arm_seconds": {
686
+ "title": "Away Arming Delay (seconds)",
687
+ "description": "Overrides the global Arming Delay if set.",
688
+ "type": "integer",
689
+ "required": false,
690
+ "minimum": 0,
691
+ "condition": {
692
+ "functionBody": "return !(model.disabled_modes || []).includes('Away');"
693
+ }
665
694
  },
666
- "command_current_night": {
667
- "title": "Current Mode: Night",
668
- "description": "",
669
- "type": "string",
695
+ "night_arm_seconds": {
696
+ "title": "Night Arming Delay (seconds)",
697
+ "description": "Overrides the global Arming Delay if set.",
698
+ "type": "integer",
670
699
  "required": false,
671
- "placeholder": "echo current night"
700
+ "minimum": 0,
701
+ "condition": {
702
+ "functionBody": "return !(model.disabled_modes || []).includes('Night');"
703
+ }
672
704
  },
673
- "command_current_off": {
674
- "title": "Current Mode: Off",
675
- "description": "",
676
- "type": "string",
705
+ "home_trigger_seconds": {
706
+ "title": "Home Trigger Delay (seconds)",
707
+ "description": "Overrides the global Trigger Delay if set.",
708
+ "type": "integer",
677
709
  "required": false,
678
- "placeholder": "echo current off"
710
+ "minimum": 0,
711
+ "condition": {
712
+ "functionBody": "return !(model.disabled_modes || []).includes('Home');"
713
+ }
679
714
  },
680
- "command_current_warning": {
681
- "title": "Current Event: Warning",
682
- "description": "",
683
- "type": "string",
715
+ "away_trigger_seconds": {
716
+ "title": "Away Trigger Delay (seconds)",
717
+ "description": "Overrides the global Trigger Delay if set.",
718
+ "type": "integer",
684
719
  "required": false,
685
- "placeholder": "echo current warning"
720
+ "minimum": 0,
721
+ "condition": {
722
+ "functionBody": "return !(model.disabled_modes || []).includes('Away');"
723
+ }
686
724
  },
687
- "command_current_triggered": {
688
- "title": "Current Mode: Triggered",
689
- "description": "",
690
- "type": "string",
725
+ "night_trigger_seconds": {
726
+ "title": "Night Trigger Delay (seconds)",
727
+ "description": "Overrides the global Trigger Delay if set.",
728
+ "type": "integer",
691
729
  "required": false,
692
- "placeholder": "echo current triggered"
730
+ "minimum": 0,
731
+ "condition": {
732
+ "functionBody": "return !(model.disabled_modes || []).includes('Night');"
733
+ }
693
734
  },
694
- "mqtt_broker": {
695
- "title": "MQTT Broker URL",
735
+ "override_off": {
736
+ "title": "Trigger During Off Mode",
737
+ "description": "Allows the security system to be triggered while disarmed.",
738
+ "type": "boolean",
739
+ "default": false,
740
+ "required": false
741
+ },
742
+ "reset_off_flow": {
743
+ "title": "Reset Using Off Mode",
744
+ "description": "Resets the security system when triggered by passing through the Off mode.",
745
+ "type": "boolean",
746
+ "default": false,
747
+ "required": false
748
+ },
749
+ "proxy_mode": {
750
+ "title": "Enable Proxy Mode",
751
+ "description": "Ignores webhooks/commands for server requests.",
752
+ "type": "boolean",
753
+ "default": false,
754
+ "required": false
755
+ },
756
+ "double_knock": {
757
+ "title": "Use Double-Knock",
758
+ "description": "Requires Trip switches to be turned on twice within a time window for the system to be triggered.",
759
+ "type": "boolean",
760
+ "default": false,
761
+ "required": false
762
+ },
763
+ "double_knock_seconds": {
764
+ "title": "Time Window (seconds)",
696
765
  "description": "",
697
- "type": "string",
766
+ "type": "integer",
767
+ "default": 90,
698
768
  "required": false,
699
- "placeholder": "mqtt://localhost:1883"
769
+ "minimum": 0,
770
+ "condition": {
771
+ "functionBody": "return model.double_knock === true;"
772
+ }
700
773
  },
701
- "mqtt_username": {
702
- "title": "MQTT Username",
774
+ "home_double_knock_seconds": {
775
+ "title": "Home Double-Knock Window (seconds)",
703
776
  "description": "",
704
- "type": "string",
705
- "required": false
777
+ "type": "integer",
778
+ "required": false,
779
+ "minimum": 0,
780
+ "condition": {
781
+ "functionBody": "return !(model.disabled_modes || []).includes('Home') && model.double_knock === true;"
782
+ }
706
783
  },
707
- "mqtt_password": {
708
- "title": "MQTT Password",
784
+ "away_double_knock_seconds": {
785
+ "title": "Away Double-Knock Window (seconds)",
709
786
  "description": "",
710
- "type": "string",
711
- "required": false
787
+ "type": "integer",
788
+ "required": false,
789
+ "minimum": 0,
790
+ "condition": {
791
+ "functionBody": "return !(model.disabled_modes || []).includes('Away') && model.double_knock === true;"
792
+ }
712
793
  },
713
- "mqtt_topic": {
714
- "title": "MQTT Topic",
794
+ "night_double_knock_seconds": {
795
+ "title": "Night Double-Knock Window (seconds)",
715
796
  "description": "",
716
- "type": "string",
717
- "default": "security-system/state",
718
- "required": false
797
+ "type": "integer",
798
+ "required": false,
799
+ "minimum": 0,
800
+ "condition": {
801
+ "functionBody": "return !(model.disabled_modes || []).includes('Night') && model.double_knock === true;"
802
+ }
719
803
  },
720
- "mqtt_client_id": {
721
- "title": "MQTT Client ID",
804
+ "double_knock_modes": {
805
+ "title": "Double-Knock Modes",
722
806
  "description": "",
723
- "type": "string",
724
- "required": false
807
+ "type": "array",
808
+ "default": [],
809
+ "required": false,
810
+ "uniqueItems": true,
811
+ "items": {
812
+ "title": "Mode",
813
+ "type": "string",
814
+ "enum": ["Home", "Away", "Night"]
815
+ },
816
+ "condition": {
817
+ "functionBody": "return model.double_knock === true;"
818
+ }
725
819
  }
726
820
  }
727
821
  },
728
822
  "layout": [
729
823
  "name",
730
824
  "serial_number",
825
+ "disabled_modes",
731
826
  "default_mode",
732
827
  {
733
828
  "type": "div",
@@ -736,98 +831,32 @@
736
831
  "flex-direction": "row",
737
832
  "items": ["arm_seconds", "trigger_seconds", "reset_minutes"]
738
833
  },
739
- "save_state",
740
- "test_mode",
741
834
  {
742
835
  "type": "fieldset",
743
- "title": "Accessory Names",
744
- "description": "Change the accessory names provided by your own.",
836
+ "title": "Switches",
837
+ "description": "Create simpler automations or bypass HomeKit confirmations.",
745
838
  "expandable": true,
746
839
  "expanded": false,
747
840
  "items": [
748
- "trip_switch_name",
749
- "trip_home_switch_name",
750
- "trip_away_switch_name",
751
- "trip_night_switch_name",
752
- "trip_override_switch_name",
841
+ "mode_switches",
753
842
  "mode_home_switch_name",
754
843
  "mode_away_switch_name",
755
844
  "mode_night_switch_name",
845
+ "mode_off_switch",
756
846
  "mode_off_switch_name",
757
- "mode_away_extended_switch_name",
758
- "mode_pause_switch_name",
759
- "audio_switch_name"
760
- ]
761
- },
762
- {
763
- "type": "fieldset",
764
- "title": "Advanced Options",
765
- "description": "Need more options? You know what do do.",
766
- "expandable": true,
767
- "expanded": false,
768
- "items": [
769
- "log_directory",
770
- {
771
- "type": "div",
772
- "displayFlex": true,
773
- "flex-flow": "row wrap",
774
- "flex-direction": "row",
775
- "items": ["home_arm_seconds", "away_arm_seconds", "night_arm_seconds"]
776
- },
777
- {
778
- "type": "div",
779
- "displayFlex": true,
780
- "flex-flow": "row wrap",
781
- "flex-direction": "row",
782
- "items": [
783
- "home_trigger_seconds",
784
- "away_trigger_seconds",
785
- "night_trigger_seconds"
786
- ]
787
- },
788
- "override_off",
789
- "reset_off_flow",
790
- "proxy_mode",
791
- {
792
- "type": "div",
793
- "displayFlex": true,
794
- "flex-flow": "row wrap",
795
- "flex-direction": "row",
796
- "items": ["double_knock", "double_knock_seconds"]
797
- },
798
847
  {
799
848
  "type": "div",
800
849
  "displayFlex": true,
801
850
  "flex-flow": "row wrap",
802
851
  "flex-direction": "row",
803
- "items": [
804
- "home_double_knock_seconds",
805
- "away_double_knock_seconds",
806
- "night_double_knock_seconds"
807
- ]
808
- },
809
- "double_knock_modes",
810
- "disabled_modes"
811
- ]
812
- },
813
- {
814
- "type": "fieldset",
815
- "title": "Switches",
816
- "description": "Create simpler automations or bypass HomeKit confirmations.",
817
- "expandable": true,
818
- "expanded": false,
819
- "items": [
820
- "mode_switches",
821
- "mode_off_switch",
822
- {
823
- "type": "div",
824
- "displayFlex": true,
825
- "flex-flow": "row",
826
- "flex-direction": "row",
827
852
  "items": [
828
853
  "mode_away_extended_switch",
829
- "mode_away_extended_switch_trigger_seconds"
830
- ]
854
+ "mode_away_extended_switch_trigger_seconds",
855
+ "mode_away_extended_switch_name"
856
+ ],
857
+ "condition": {
858
+ "functionBody": "return !(model.disabled_modes || []).includes('Away');"
859
+ }
831
860
  },
832
861
  {
833
862
  "type": "div",
@@ -836,11 +865,17 @@
836
865
  "flex-direction": "row",
837
866
  "items": ["mode_pause_switch", "pause_minutes"]
838
867
  },
868
+ "mode_pause_switch_name",
839
869
  "arming_lock_switch",
840
870
  "arming_lock_switches",
841
871
  "trip_switch",
872
+ "trip_switch_name",
842
873
  "trip_override_switch",
874
+ "trip_override_switch_name",
843
875
  "trip_mode_switches",
876
+ "trip_home_switch_name",
877
+ "trip_away_switch_name",
878
+ "trip_night_switch_name",
844
879
  {
845
880
  "key": "trip_home_switches",
846
881
  "type": "tabarray",
@@ -859,7 +894,8 @@
859
894
  "title": "{{ value.label || 'Night Switch' }}",
860
895
  "items": ["trip_night_switches[].label"]
861
896
  },
862
- "audio_switch"
897
+ "audio_switch",
898
+ "audio_switch_name"
863
899
  ]
864
900
  },
865
901
  {
@@ -870,14 +906,19 @@
870
906
  "expanded": false,
871
907
  "items": [
872
908
  "arming_sensor",
873
- "tripped_sensor",
874
- "triggered_sensor",
875
909
  {
876
910
  "type": "div",
877
911
  "displayFlex": true,
878
- "flex-flow": "row wrap",
912
+ "flex-flow": "row",
913
+ "flex-direction": "row",
914
+ "items": ["tripped_sensor", "tripped_sensor_seconds"]
915
+ },
916
+ {
917
+ "type": "div",
918
+ "displayFlex": true,
919
+ "flex-flow": "row",
879
920
  "flex-direction": "row",
880
- "items": ["tripped_sensor_seconds", "triggered_sensor_seconds"]
921
+ "items": ["triggered_sensor", "triggered_sensor_seconds"]
881
922
  },
882
923
  "reset_sensor"
883
924
  ]
@@ -976,6 +1017,58 @@
976
1017
  "mqtt_topic",
977
1018
  "mqtt_client_id"
978
1019
  ]
1020
+ },
1021
+ {
1022
+ "type": "fieldset",
1023
+ "title": "Advanced Options",
1024
+ "description": "",
1025
+ "expandable": true,
1026
+ "expanded": false,
1027
+ "items": [
1028
+ "log_directory",
1029
+ "save_state",
1030
+ "test_mode",
1031
+ {
1032
+ "type": "div",
1033
+ "displayFlex": true,
1034
+ "flex-flow": "row wrap",
1035
+ "flex-direction": "row",
1036
+ "items": ["home_arm_seconds", "away_arm_seconds", "night_arm_seconds"]
1037
+ },
1038
+ {
1039
+ "type": "div",
1040
+ "displayFlex": true,
1041
+ "flex-flow": "row wrap",
1042
+ "flex-direction": "row",
1043
+ "items": [
1044
+ "home_trigger_seconds",
1045
+ "away_trigger_seconds",
1046
+ "night_trigger_seconds"
1047
+ ]
1048
+ },
1049
+ "override_off",
1050
+ "reset_off_flow",
1051
+ "proxy_mode",
1052
+ {
1053
+ "type": "div",
1054
+ "displayFlex": true,
1055
+ "flex-flow": "row wrap",
1056
+ "flex-direction": "row",
1057
+ "items": ["double_knock", "double_knock_seconds"]
1058
+ },
1059
+ {
1060
+ "type": "div",
1061
+ "displayFlex": true,
1062
+ "flex-flow": "row wrap",
1063
+ "flex-direction": "row",
1064
+ "items": [
1065
+ "home_double_knock_seconds",
1066
+ "away_double_knock_seconds",
1067
+ "night_double_knock_seconds"
1068
+ ]
1069
+ },
1070
+ "double_knock_modes"
1071
+ ]
979
1072
  }
980
1073
  ]
981
1074
  }