homebridge-securitysystem 0.0.1-matter
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/.gitattributes +1 -0
- package/.github/ISSUE_TEMPLATE/bug_report.yml +46 -0
- package/.github/ISSUE_TEMPLATE/feature-request.yml +17 -0
- package/.github/ISSUE_TEMPLATE/questions-answers.yml +40 -0
- package/.github/demo.jpg +0 -0
- package/.github/dependabot.yml +19 -0
- package/.github/release.yml +36 -0
- package/.github/workflows/build-package.yml +49 -0
- package/.github/workflows/bump-version.yml +59 -0
- package/.github/workflows/dependency-review.yml +26 -0
- package/.github/workflows/publish.yml +155 -0
- package/.github/workflows/stale-activity.yml +27 -0
- package/AGENTS.md +247 -0
- package/CHANGELOG.md +572 -0
- package/CODE_OF_CONDUCT.md +128 -0
- package/CONTRIBUTING.md +5 -0
- package/LICENSE +21 -0
- package/README.md +47 -0
- package/SECURITY.md +12 -0
- package/config.schema.json +934 -0
- package/dist/conditions/already-triggered-condition.d.ts +10 -0
- package/dist/conditions/already-triggered-condition.js +22 -0
- package/dist/conditions/already-triggered-condition.js.map +1 -0
- package/dist/conditions/arming-in-progress-condition.d.ts +10 -0
- package/dist/conditions/arming-in-progress-condition.js +21 -0
- package/dist/conditions/arming-in-progress-condition.js.map +1 -0
- package/dist/conditions/arming-lock-condition.d.ts +10 -0
- package/dist/conditions/arming-lock-condition.js +43 -0
- package/dist/conditions/arming-lock-condition.js.map +1 -0
- package/dist/conditions/condition.d.ts +22 -0
- package/dist/conditions/condition.js +19 -0
- package/dist/conditions/condition.js.map +1 -0
- package/dist/conditions/double-knock-condition.d.ts +24 -0
- package/dist/conditions/double-knock-condition.js +73 -0
- package/dist/conditions/double-knock-condition.js.map +1 -0
- package/dist/conditions/not-armed-condition.d.ts +10 -0
- package/dist/conditions/not-armed-condition.js +26 -0
- package/dist/conditions/not-armed-condition.js.map +1 -0
- package/dist/conditions/trigger-already-running-condition.d.ts +10 -0
- package/dist/conditions/trigger-already-running-condition.js +21 -0
- package/dist/conditions/trigger-already-running-condition.js.map +1 -0
- package/dist/constants/default-constant.d.ts +24 -0
- package/dist/constants/default-constant.js +27 -0
- package/dist/constants/default-constant.js.map +1 -0
- package/dist/constants/homekit-constant.d.ts +2 -0
- package/dist/constants/homekit-constant.js +3 -0
- package/dist/constants/homekit-constant.js.map +1 -0
- package/dist/constants/matter-constant.d.ts +21 -0
- package/dist/constants/matter-constant.js +61 -0
- package/dist/constants/matter-constant.js.map +1 -0
- package/dist/handlers/sensor-handler.d.ts +24 -0
- package/dist/handlers/sensor-handler.js +63 -0
- package/dist/handlers/sensor-handler.js.map +1 -0
- package/dist/handlers/state-handler.d.ts +49 -0
- package/dist/handlers/state-handler.js +204 -0
- package/dist/handlers/state-handler.js.map +1 -0
- package/dist/handlers/switch-handler.d.ts +28 -0
- package/dist/handlers/switch-handler.js +95 -0
- package/dist/handlers/switch-handler.js.map +1 -0
- package/dist/handlers/trip-handler.d.ts +44 -0
- package/dist/handlers/trip-handler.js +156 -0
- package/dist/handlers/trip-handler.js.map +1 -0
- package/dist/homekit/homekit-registrar.d.ts +12 -0
- package/dist/homekit/homekit-registrar.js +23 -0
- package/dist/homekit/homekit-registrar.js.map +1 -0
- package/dist/homekit/service-factory.d.ts +12 -0
- package/dist/homekit/service-factory.js +24 -0
- package/dist/homekit/service-factory.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/interfaces/condition-context-interface.d.ts +14 -0
- package/dist/interfaces/condition-context-interface.js +2 -0
- package/dist/interfaces/condition-context-interface.js.map +1 -0
- package/dist/interfaces/hap-types-interface.d.ts +9 -0
- package/dist/interfaces/hap-types-interface.js +2 -0
- package/dist/interfaces/hap-types-interface.js.map +1 -0
- package/dist/interfaces/mqtt-status-payload-interface.d.ts +6 -0
- package/dist/interfaces/mqtt-status-payload-interface.js +2 -0
- package/dist/interfaces/mqtt-status-payload-interface.js.map +1 -0
- package/dist/interfaces/options-interface.d.ts +87 -0
- package/dist/interfaces/options-interface.js +2 -0
- package/dist/interfaces/options-interface.js.map +1 -0
- package/dist/interfaces/persisted-state-interface.d.ts +6 -0
- package/dist/interfaces/persisted-state-interface.js +2 -0
- package/dist/interfaces/persisted-state-interface.js.map +1 -0
- package/dist/interfaces/service-registry-interface.d.ts +10 -0
- package/dist/interfaces/service-registry-interface.js +2 -0
- package/dist/interfaces/service-registry-interface.js.map +1 -0
- package/dist/interfaces/system-state-interface.d.ts +22 -0
- package/dist/interfaces/system-state-interface.js +2 -0
- package/dist/interfaces/system-state-interface.js.map +1 -0
- package/dist/schemas/arming-lock-schema.d.ts +10 -0
- package/dist/schemas/arming-lock-schema.js +12 -0
- package/dist/schemas/arming-lock-schema.js.map +1 -0
- package/dist/schemas/error-schema.d.ts +4 -0
- package/dist/schemas/error-schema.js +7 -0
- package/dist/schemas/error-schema.js.map +1 -0
- package/dist/schemas/mode-request-schema.d.ts +10 -0
- package/dist/schemas/mode-request-schema.js +18 -0
- package/dist/schemas/mode-request-schema.js.map +1 -0
- package/dist/schemas/status-response-schema.d.ts +7 -0
- package/dist/schemas/status-response-schema.js +10 -0
- package/dist/schemas/status-response-schema.js.map +1 -0
- package/dist/schemas/trip-mode-request-schema.d.ts +9 -0
- package/dist/schemas/trip-mode-request-schema.js +24 -0
- package/dist/schemas/trip-mode-request-schema.js.map +1 -0
- package/dist/security-system-platform.d.ts +19 -0
- package/dist/security-system-platform.js +56 -0
- package/dist/security-system-platform.js.map +1 -0
- package/dist/security-system.d.ts +28 -0
- package/dist/security-system.js +169 -0
- package/dist/security-system.js.map +1 -0
- package/dist/services/command-service.d.ts +16 -0
- package/dist/services/command-service.js +65 -0
- package/dist/services/command-service.js.map +1 -0
- package/dist/services/configuration-service.d.ts +24 -0
- package/dist/services/configuration-service.js +189 -0
- package/dist/services/configuration-service.js.map +1 -0
- package/dist/services/event-bus-service.d.ts +12 -0
- package/dist/services/event-bus-service.js +17 -0
- package/dist/services/event-bus-service.js.map +1 -0
- package/dist/services/matter-service.d.ts +69 -0
- package/dist/services/matter-service.js +363 -0
- package/dist/services/matter-service.js.map +1 -0
- package/dist/services/mqtt-service.d.ts +16 -0
- package/dist/services/mqtt-service.js +97 -0
- package/dist/services/mqtt-service.js.map +1 -0
- package/dist/services/server-service.d.ts +28 -0
- package/dist/services/server-service.js +275 -0
- package/dist/services/server-service.js.map +1 -0
- package/dist/services/storage-service.d.ts +14 -0
- package/dist/services/storage-service.js +70 -0
- package/dist/services/storage-service.js.map +1 -0
- package/dist/services/webhook-service.d.ts +16 -0
- package/dist/services/webhook-service.js +68 -0
- package/dist/services/webhook-service.js.map +1 -0
- package/dist/tests/conditions.test.d.ts +1 -0
- package/dist/tests/conditions.test.js +175 -0
- package/dist/tests/conditions.test.js.map +1 -0
- package/dist/tests/matter-service.test.d.ts +1 -0
- package/dist/tests/matter-service.test.js +475 -0
- package/dist/tests/matter-service.test.js.map +1 -0
- package/dist/tests/mqtt-service.test.d.ts +1 -0
- package/dist/tests/mqtt-service.test.js +168 -0
- package/dist/tests/mqtt-service.test.js.map +1 -0
- package/dist/tests/sensor-handler.test.d.ts +1 -0
- package/dist/tests/sensor-handler.test.js +87 -0
- package/dist/tests/sensor-handler.test.js.map +1 -0
- package/dist/tests/server-service.test.d.ts +1 -0
- package/dist/tests/server-service.test.js +188 -0
- package/dist/tests/server-service.test.js.map +1 -0
- package/dist/tests/state-handler.test.d.ts +1 -0
- package/dist/tests/state-handler.test.js +276 -0
- package/dist/tests/state-handler.test.js.map +1 -0
- package/dist/tests/switch-handler.test.d.ts +1 -0
- package/dist/tests/switch-handler.test.js +186 -0
- package/dist/tests/switch-handler.test.js.map +1 -0
- package/dist/tests/trip-handler.test.d.ts +1 -0
- package/dist/tests/trip-handler.test.js +179 -0
- package/dist/tests/trip-handler.test.js.map +1 -0
- package/dist/timers/timer-manager.d.ts +31 -0
- package/dist/timers/timer-manager.js +118 -0
- package/dist/timers/timer-manager.js.map +1 -0
- package/dist/types/event-payload-map-type.d.ts +15 -0
- package/dist/types/event-payload-map-type.js +2 -0
- package/dist/types/event-payload-map-type.js.map +1 -0
- package/dist/types/event-type.d.ts +44 -0
- package/dist/types/event-type.js +20 -0
- package/dist/types/event-type.js.map +1 -0
- package/dist/types/matter-accessory-key-type.d.ts +7 -0
- package/dist/types/matter-accessory-key-type.js +2 -0
- package/dist/types/matter-accessory-key-type.js.map +1 -0
- package/dist/types/mode-type.d.ts +4 -0
- package/dist/types/mode-type.js +2 -0
- package/dist/types/mode-type.js.map +1 -0
- package/dist/types/origin-type.d.ts +9 -0
- package/dist/types/origin-type.js +11 -0
- package/dist/types/origin-type.js.map +1 -0
- package/dist/types/security-state-type.d.ts +11 -0
- package/dist/types/security-state-type.js +13 -0
- package/dist/types/security-state-type.js.map +1 -0
- package/dist/types/sensor-kind-type.d.ts +2 -0
- package/dist/types/sensor-kind-type.js +2 -0
- package/dist/types/sensor-kind-type.js.map +1 -0
- package/dist/types/service-result-type.d.ts +4 -0
- package/dist/types/service-result-type.js +2 -0
- package/dist/types/service-result-type.js.map +1 -0
- package/dist/utils/arming-util.d.ts +19 -0
- package/dist/utils/arming-util.js +24 -0
- package/dist/utils/arming-util.js.map +1 -0
- package/dist/utils/state-util.d.ts +8 -0
- package/dist/utils/state-util.js +29 -0
- package/dist/utils/state-util.js.map +1 -0
- package/docs/MQTT.md +50 -0
- package/package.json +64 -0
- package/src/@types/homebridge-lib.d.ts +11 -0
- package/src/conditions/already-triggered-condition.ts +24 -0
- package/src/conditions/arming-in-progress-condition.ts +23 -0
- package/src/conditions/arming-lock-condition.ts +50 -0
- package/src/conditions/condition.ts +31 -0
- package/src/conditions/double-knock-condition.ts +84 -0
- package/src/conditions/not-armed-condition.ts +30 -0
- package/src/conditions/trigger-already-running-condition.ts +23 -0
- package/src/constants/default-constant.ts +28 -0
- package/src/constants/homekit-constant.ts +2 -0
- package/src/constants/matter-constant.ts +69 -0
- package/src/handlers/sensor-handler.ts +78 -0
- package/src/handlers/state-handler.ts +257 -0
- package/src/handlers/switch-handler.ts +111 -0
- package/src/handlers/trip-handler.ts +193 -0
- package/src/homekit/homekit-registrar.ts +28 -0
- package/src/homekit/service-factory.ts +35 -0
- package/src/index.ts +9 -0
- package/src/interfaces/condition-context-interface.ts +15 -0
- package/src/interfaces/hap-types-interface.ts +11 -0
- package/src/interfaces/mqtt-status-payload-interface.ts +6 -0
- package/src/interfaces/options-interface.ts +116 -0
- package/src/interfaces/persisted-state-interface.ts +7 -0
- package/src/interfaces/service-registry-interface.ts +11 -0
- package/src/interfaces/system-state-interface.ts +25 -0
- package/src/schemas/arming-lock-schema.ts +12 -0
- package/src/schemas/error-schema.ts +7 -0
- package/src/schemas/mode-request-schema.ts +18 -0
- package/src/schemas/status-response-schema.ts +10 -0
- package/src/schemas/trip-mode-request-schema.ts +24 -0
- package/src/security-system-platform.ts +68 -0
- package/src/security-system.ts +199 -0
- package/src/services/command-service.ts +76 -0
- package/src/services/configuration-service.ts +224 -0
- package/src/services/event-bus-service.ts +21 -0
- package/src/services/matter-service.ts +446 -0
- package/src/services/mqtt-service.ts +123 -0
- package/src/services/server-service.ts +327 -0
- package/src/services/storage-service.ts +80 -0
- package/src/services/webhook-service.ts +77 -0
- package/src/tests/conditions.test.ts +212 -0
- package/src/tests/matter-service.test.ts +610 -0
- package/src/tests/mqtt-service.test.ts +231 -0
- package/src/tests/sensor-handler.test.ts +116 -0
- package/src/tests/server-service.test.ts +238 -0
- package/src/tests/state-handler.test.ts +371 -0
- package/src/tests/switch-handler.test.ts +234 -0
- package/src/tests/trip-handler.test.ts +244 -0
- package/src/timers/timer-manager.ts +141 -0
- package/src/types/event-payload-map-type.ts +25 -0
- package/src/types/event-type.ts +61 -0
- package/src/types/matter-accessory-key-type.ts +33 -0
- package/src/types/mode-type.ts +4 -0
- package/src/types/origin-type.ts +9 -0
- package/src/types/security-state-type.ts +11 -0
- package/src/types/sensor-kind-type.ts +2 -0
- package/src/types/service-result-type.ts +4 -0
- package/src/utils/arming-util.ts +44 -0
- package/src/utils/state-util.ts +32 -0
- package/tsconfig.json +26 -0
- package/vitest.config.ts +8 -0
|
@@ -0,0 +1,934 @@
|
|
|
1
|
+
{
|
|
2
|
+
"pluginAlias": "security-system",
|
|
3
|
+
"pluginType": "platform",
|
|
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
|
+
"footerDisplay": "[Need help?](https://github.com/MiguelRipoll23/homebridge-securitysystem/issues) | [Donate](https://buymeacoffee.com/miguelripoll23)",
|
|
6
|
+
"schema": {
|
|
7
|
+
"title": "Security System",
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"platform": {
|
|
11
|
+
"title": "Platform",
|
|
12
|
+
"type": "string",
|
|
13
|
+
"oneOf": [
|
|
14
|
+
{
|
|
15
|
+
"title": "security-system",
|
|
16
|
+
"enum": ["security-system"]
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"required": true
|
|
20
|
+
},
|
|
21
|
+
"name": {
|
|
22
|
+
"title": "Name",
|
|
23
|
+
"description": "Name for your security system that shows up in Homekit.",
|
|
24
|
+
"type": "string",
|
|
25
|
+
"default": "Security System",
|
|
26
|
+
"required": true
|
|
27
|
+
},
|
|
28
|
+
"serial_number": {
|
|
29
|
+
"title": "Serial Number",
|
|
30
|
+
"description": "",
|
|
31
|
+
"type": "string",
|
|
32
|
+
"default": "S3CUR1TYSYST3M",
|
|
33
|
+
"required": true
|
|
34
|
+
},
|
|
35
|
+
"disabled_modes": {
|
|
36
|
+
"title": "Disabled Modes",
|
|
37
|
+
"description": "",
|
|
38
|
+
"type": "array",
|
|
39
|
+
"required": false,
|
|
40
|
+
"uniqueItems": true,
|
|
41
|
+
"items": {
|
|
42
|
+
"title": "Mode",
|
|
43
|
+
"type": "string",
|
|
44
|
+
"enum": ["Home", "Away", "Night"]
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"default_mode": {
|
|
48
|
+
"title": "Default Mode",
|
|
49
|
+
"description": "",
|
|
50
|
+
"type": "string",
|
|
51
|
+
"default": "Off",
|
|
52
|
+
"required": true,
|
|
53
|
+
"enum": ["Off", "Home", "Away", "Night"]
|
|
54
|
+
},
|
|
55
|
+
"arm_seconds": {
|
|
56
|
+
"title": "Arming Delay (seconds)",
|
|
57
|
+
"description": "Give yourself time to leave before the system is armed.",
|
|
58
|
+
"type": "integer",
|
|
59
|
+
"default": 0,
|
|
60
|
+
"required": false,
|
|
61
|
+
"minimum": 0
|
|
62
|
+
},
|
|
63
|
+
"trigger_seconds": {
|
|
64
|
+
"title": "Trigger Delay (seconds)",
|
|
65
|
+
"description": "Give yourself time to disable the system when you get home.",
|
|
66
|
+
"type": "integer",
|
|
67
|
+
"default": 0,
|
|
68
|
+
"required": false,
|
|
69
|
+
"minimum": 0
|
|
70
|
+
},
|
|
71
|
+
"reset_minutes": {
|
|
72
|
+
"title": "Reset Delay (minutes)",
|
|
73
|
+
"description": "The system will remain triggered for this long (unless otherwise reset).",
|
|
74
|
+
"type": "integer",
|
|
75
|
+
"default": 10,
|
|
76
|
+
"required": false,
|
|
77
|
+
"minimum": 1
|
|
78
|
+
},
|
|
79
|
+
"mode_switches": {
|
|
80
|
+
"title": "Show Mode Switches",
|
|
81
|
+
"description": "Adds switches for setting and reading the security system's active mode (bypassing HomeKit confirmations).",
|
|
82
|
+
"type": "boolean",
|
|
83
|
+
"default": false,
|
|
84
|
+
"required": false
|
|
85
|
+
},
|
|
86
|
+
"mode_home_switch_name": {
|
|
87
|
+
"title": "Home-Mode Switch Name",
|
|
88
|
+
"description": "\"Set-only\" switch; trying to turn it off does nothing.",
|
|
89
|
+
"type": "string",
|
|
90
|
+
"default": "Set Home-Mode",
|
|
91
|
+
"required": false,
|
|
92
|
+
"condition": {
|
|
93
|
+
"functionBody": "return !(model.disabled_modes || []).includes('Home') && model.mode_switches === true;"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"mode_away_switch_name": {
|
|
97
|
+
"title": "Away-Mode Switch Name",
|
|
98
|
+
"description": "\"Set-only\" switch; trying to turn it off does nothing.",
|
|
99
|
+
"type": "string",
|
|
100
|
+
"default": "Set Away-Mode",
|
|
101
|
+
"required": false,
|
|
102
|
+
"condition": {
|
|
103
|
+
"functionBody": "return !(model.disabled_modes || []).includes('Away') && model.mode_switches === true;"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"mode_night_switch_name": {
|
|
107
|
+
"title": "Night-Mode Switch Name",
|
|
108
|
+
"description": "\"Set-only\" switch; trying to turn it off does nothing.",
|
|
109
|
+
"type": "string",
|
|
110
|
+
"default": "Set Night-Mode",
|
|
111
|
+
"required": false,
|
|
112
|
+
"condition": {
|
|
113
|
+
"functionBody": "return !(model.disabled_modes || []).includes('Night') && model.mode_switches === true;"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"mode_off_switch": {
|
|
117
|
+
"title": "Show Off-Mode Switch",
|
|
118
|
+
"description": "Adds a switch to disarm the security system (only if \"Show Mode Switches\" is also enabled).",
|
|
119
|
+
"type": "boolean",
|
|
120
|
+
"default": true,
|
|
121
|
+
"required": false,
|
|
122
|
+
"condition": {
|
|
123
|
+
"functionBody": "return model.mode_switches === true;"
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"mode_off_switch_name": {
|
|
127
|
+
"title": "Off-Mode Switch Name",
|
|
128
|
+
"description": "\"Set-only\" switch; trying to turn it off does nothing. Turning this switch ON disarms the security system.",
|
|
129
|
+
"type": "string",
|
|
130
|
+
"default": "Set Off-Mode",
|
|
131
|
+
"required": false,
|
|
132
|
+
"condition": {
|
|
133
|
+
"functionBody": "return model.mode_switches === true && model.mode_off_switch === true;"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"mode_away_extended_switch": {
|
|
137
|
+
"title": "Show Extended Away-Mode Switch",
|
|
138
|
+
"description": "Adds an additional Away-Mode switch that can be used in automations (e.g. for extended time away such as vacation).",
|
|
139
|
+
"type": "boolean",
|
|
140
|
+
"default": false,
|
|
141
|
+
"required": false
|
|
142
|
+
},
|
|
143
|
+
"mode_away_extended_switch_trigger_seconds": {
|
|
144
|
+
"title": "Extended Away-Mode Set Delay (seconds)",
|
|
145
|
+
"description": "Give yourself time to leave before the system is armed.",
|
|
146
|
+
"type": "integer",
|
|
147
|
+
"default": 0,
|
|
148
|
+
"required": false,
|
|
149
|
+
"minimum": 0,
|
|
150
|
+
"condition": {
|
|
151
|
+
"functionBody": "return model.mode_away_extended_switch === true;"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"mode_away_extended_switch_name": {
|
|
155
|
+
"title": "Extended Away-Mode Switch Name",
|
|
156
|
+
"description": "\"Set-only\" switch; trying to turn it off does nothing.",
|
|
157
|
+
"type": "string",
|
|
158
|
+
"default": "Set Extended Away-Mode",
|
|
159
|
+
"required": false,
|
|
160
|
+
"condition": {
|
|
161
|
+
"functionBody": "return model.mode_away_extended_switch === true;"
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"mode_pause_switch": {
|
|
165
|
+
"title": "Show Mode Pause Switch",
|
|
166
|
+
"description": "Adds a switch that will disarm the security system for a set period of time.",
|
|
167
|
+
"type": "boolean",
|
|
168
|
+
"default": false,
|
|
169
|
+
"required": false
|
|
170
|
+
},
|
|
171
|
+
"pause_minutes": {
|
|
172
|
+
"title": "Pause Time (minutes)",
|
|
173
|
+
"description": "Set to 0 to pause indefinitely.",
|
|
174
|
+
"type": "integer",
|
|
175
|
+
"default": 0,
|
|
176
|
+
"required": false,
|
|
177
|
+
"minimum": 0,
|
|
178
|
+
"condition": {
|
|
179
|
+
"functionBody": "return model.mode_pause_switch === true;"
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
"mode_pause_switch_name": {
|
|
183
|
+
"title": "Mode Pause Name",
|
|
184
|
+
"description": "",
|
|
185
|
+
"type": "string",
|
|
186
|
+
"default": "Mode Pause",
|
|
187
|
+
"required": false,
|
|
188
|
+
"condition": {
|
|
189
|
+
"functionBody": "return model.mode_pause_switch === true;"
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"arming_lock_switch": {
|
|
193
|
+
"title": "Show Arming Lock Switch (experimental)",
|
|
194
|
+
"description": "Adds a global switch that will prevent arming the security system.",
|
|
195
|
+
"type": "boolean",
|
|
196
|
+
"default": false,
|
|
197
|
+
"required": false
|
|
198
|
+
},
|
|
199
|
+
"arming_lock_switches": {
|
|
200
|
+
"title": "Show Arming Lock Mode Switches (experimental)",
|
|
201
|
+
"description": "Adds switches that will prevent arming the security system when their mode is set.",
|
|
202
|
+
"type": "boolean",
|
|
203
|
+
"default": false,
|
|
204
|
+
"required": false
|
|
205
|
+
},
|
|
206
|
+
"trip_switch": {
|
|
207
|
+
"title": "Show Global Trip Switch",
|
|
208
|
+
"description": "Adds a global switch that will trip the security system if any mode other than \"Off\" is active.",
|
|
209
|
+
"type": "boolean",
|
|
210
|
+
"default": false,
|
|
211
|
+
"required": false
|
|
212
|
+
},
|
|
213
|
+
"trip_switch_name": {
|
|
214
|
+
"title": "Global Trip Switch Name",
|
|
215
|
+
"description": "",
|
|
216
|
+
"type": "string",
|
|
217
|
+
"default": "Global Trip",
|
|
218
|
+
"required": false,
|
|
219
|
+
"condition": {
|
|
220
|
+
"functionBody": "return model.trip_switch === true;"
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
"trip_override_switch": {
|
|
224
|
+
"title": "Show Trip Override Switch",
|
|
225
|
+
"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).",
|
|
226
|
+
"type": "boolean",
|
|
227
|
+
"default": false,
|
|
228
|
+
"required": false
|
|
229
|
+
},
|
|
230
|
+
"trip_override_switch_name": {
|
|
231
|
+
"title": "Trip Override Switch Name",
|
|
232
|
+
"description": "",
|
|
233
|
+
"type": "string",
|
|
234
|
+
"default": "Trip Override",
|
|
235
|
+
"required": false,
|
|
236
|
+
"condition": {
|
|
237
|
+
"functionBody": "return model.trip_override_switch === true;"
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
"trip_mode_switches": {
|
|
241
|
+
"title": "Show Trip Mode Switches",
|
|
242
|
+
"description": "Adds switches for each mode that will trigger the security system if their respective mode is active.",
|
|
243
|
+
"type": "boolean",
|
|
244
|
+
"default": true,
|
|
245
|
+
"required": false
|
|
246
|
+
},
|
|
247
|
+
"trip_home_switch_name": {
|
|
248
|
+
"title": "Trip Home Switch Name",
|
|
249
|
+
"description": "",
|
|
250
|
+
"type": "string",
|
|
251
|
+
"default": "Trip Home",
|
|
252
|
+
"required": false,
|
|
253
|
+
"condition": {
|
|
254
|
+
"functionBody": "return !(model.disabled_modes || []).includes('Home') && model.trip_mode_switches === true;"
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
"trip_away_switch_name": {
|
|
258
|
+
"title": "Trip Away Switch Name",
|
|
259
|
+
"description": "",
|
|
260
|
+
"type": "string",
|
|
261
|
+
"default": "Trip Away",
|
|
262
|
+
"required": false,
|
|
263
|
+
"condition": {
|
|
264
|
+
"functionBody": "return !(model.disabled_modes || []).includes('Away') && model.trip_mode_switches === true;"
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
"trip_night_switch_name": {
|
|
268
|
+
"title": "Trip Night Switch Name",
|
|
269
|
+
"description": "",
|
|
270
|
+
"type": "string",
|
|
271
|
+
"default": "Trip Night",
|
|
272
|
+
"required": false,
|
|
273
|
+
"condition": {
|
|
274
|
+
"functionBody": "return !(model.disabled_modes || []).includes('Night') && model.trip_mode_switches === true;"
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
"trip_home_switches": {
|
|
278
|
+
"title": "Custom Trip Home Switches",
|
|
279
|
+
"description": "Additional trip switches for Home mode. Name will be prepended with \"Trip Home\".",
|
|
280
|
+
"type": "array",
|
|
281
|
+
"items": {
|
|
282
|
+
"title": "Switch",
|
|
283
|
+
"type": "object",
|
|
284
|
+
"properties": {
|
|
285
|
+
"label": {
|
|
286
|
+
"title": "Label",
|
|
287
|
+
"type": "string",
|
|
288
|
+
"required": true
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
"required": false,
|
|
293
|
+
"condition": {
|
|
294
|
+
"functionBody": "return !(model.disabled_modes || []).includes('Home');"
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
"trip_away_switches": {
|
|
298
|
+
"title": "Custom Trip Away Switches",
|
|
299
|
+
"description": "Additional trip switches for Away mode. Name will be prepended with \"Trip Away\".",
|
|
300
|
+
"type": "array",
|
|
301
|
+
"items": {
|
|
302
|
+
"title": "Switch",
|
|
303
|
+
"type": "object",
|
|
304
|
+
"properties": {
|
|
305
|
+
"label": {
|
|
306
|
+
"title": "Label",
|
|
307
|
+
"type": "string",
|
|
308
|
+
"required": true
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
"required": false,
|
|
313
|
+
"condition": {
|
|
314
|
+
"functionBody": "return !(model.disabled_modes || []).includes('Away');"
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
"trip_night_switches": {
|
|
318
|
+
"title": "Custom Trip Night Switches",
|
|
319
|
+
"description": "Additional trip switches for Night mode. Name will be prepended with \"Trip Night\".",
|
|
320
|
+
"type": "array",
|
|
321
|
+
"items": {
|
|
322
|
+
"title": "Switch",
|
|
323
|
+
"type": "object",
|
|
324
|
+
"properties": {
|
|
325
|
+
"label": {
|
|
326
|
+
"title": "Label",
|
|
327
|
+
"type": "string",
|
|
328
|
+
"required": true
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
"required": false,
|
|
333
|
+
"condition": {
|
|
334
|
+
"functionBody": "return !(model.disabled_modes || []).includes('Night');"
|
|
335
|
+
}
|
|
336
|
+
},
|
|
337
|
+
"arming_sensor": {
|
|
338
|
+
"title": "Show Arming Sensor",
|
|
339
|
+
"description": "Adds a sensor that asserts when the security system is being armed.",
|
|
340
|
+
"type": "boolean",
|
|
341
|
+
"default": false,
|
|
342
|
+
"required": false
|
|
343
|
+
},
|
|
344
|
+
"tripped_sensor": {
|
|
345
|
+
"title": "Show Tripped Sensor",
|
|
346
|
+
"description": "Adds a sensor that pulses at the set rate when any of the Trip switches have been turned on.",
|
|
347
|
+
"type": "boolean",
|
|
348
|
+
"default": false,
|
|
349
|
+
"required": false
|
|
350
|
+
},
|
|
351
|
+
"tripped_sensor_seconds": {
|
|
352
|
+
"title": "Tripped Sensor Pulse Rate (seconds)",
|
|
353
|
+
"description": "Set to 0 for steady on.",
|
|
354
|
+
"type": "integer",
|
|
355
|
+
"default": 5,
|
|
356
|
+
"required": false,
|
|
357
|
+
"minimum": 0,
|
|
358
|
+
"condition": {
|
|
359
|
+
"functionBody": "return model.tripped_sensor === true;"
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
"reset_sensor": {
|
|
363
|
+
"title": "Show Triggered Reset Sensor",
|
|
364
|
+
"description": "Adds a sensor that asserts when the security system has reset after being triggered.",
|
|
365
|
+
"type": "boolean",
|
|
366
|
+
"default": false,
|
|
367
|
+
"required": false
|
|
368
|
+
},
|
|
369
|
+
"server_port": {
|
|
370
|
+
"title": "Listening Port",
|
|
371
|
+
"description": "",
|
|
372
|
+
"type": "integer",
|
|
373
|
+
"required": false,
|
|
374
|
+
"minimum": 0,
|
|
375
|
+
"placeholder": 80
|
|
376
|
+
},
|
|
377
|
+
"server_api_key": {
|
|
378
|
+
"title": "API Key",
|
|
379
|
+
"description": "A key used to protect the server and authenticate requests.",
|
|
380
|
+
"type": "string",
|
|
381
|
+
"required": false,
|
|
382
|
+
"placeholder": "your-api-key"
|
|
383
|
+
},
|
|
384
|
+
"webhook_target_home": {
|
|
385
|
+
"title": "Target Mode: Home",
|
|
386
|
+
"description": "",
|
|
387
|
+
"type": "string",
|
|
388
|
+
"required": false,
|
|
389
|
+
"format": "uri",
|
|
390
|
+
"placeholder": "http://localhost/target/home"
|
|
391
|
+
},
|
|
392
|
+
"webhook_target_away": {
|
|
393
|
+
"title": "Target Mode: Away",
|
|
394
|
+
"description": "",
|
|
395
|
+
"type": "string",
|
|
396
|
+
"required": false,
|
|
397
|
+
"format": "uri",
|
|
398
|
+
"placeholder": "http://localhost/target/away"
|
|
399
|
+
},
|
|
400
|
+
"webhook_target_night": {
|
|
401
|
+
"title": "Target Mode: Night",
|
|
402
|
+
"description": "",
|
|
403
|
+
"type": "string",
|
|
404
|
+
"required": false,
|
|
405
|
+
"format": "uri",
|
|
406
|
+
"placeholder": "http://localhost/target/night"
|
|
407
|
+
},
|
|
408
|
+
"webhook_target_off": {
|
|
409
|
+
"title": "Target Mode: Off",
|
|
410
|
+
"description": "",
|
|
411
|
+
"type": "string",
|
|
412
|
+
"required": false,
|
|
413
|
+
"format": "uri",
|
|
414
|
+
"placeholder": "http://localhost/target/off"
|
|
415
|
+
},
|
|
416
|
+
"webhook_current_home": {
|
|
417
|
+
"title": "Current Mode: Home",
|
|
418
|
+
"description": "",
|
|
419
|
+
"type": "string",
|
|
420
|
+
"required": false,
|
|
421
|
+
"format": "uri",
|
|
422
|
+
"placeholder": "http://localhost/current/home"
|
|
423
|
+
},
|
|
424
|
+
"webhook_current_away": {
|
|
425
|
+
"title": "Current Mode: Away",
|
|
426
|
+
"description": "",
|
|
427
|
+
"type": "string",
|
|
428
|
+
"required": false,
|
|
429
|
+
"format": "uri",
|
|
430
|
+
"placeholder": "http://localhost/current/away"
|
|
431
|
+
},
|
|
432
|
+
"webhook_current_night": {
|
|
433
|
+
"title": "Current Mode: Night",
|
|
434
|
+
"description": "",
|
|
435
|
+
"type": "string",
|
|
436
|
+
"required": false,
|
|
437
|
+
"format": "uri",
|
|
438
|
+
"placeholder": "http://localhost/current/night"
|
|
439
|
+
},
|
|
440
|
+
"webhook_current_off": {
|
|
441
|
+
"title": "Current Mode: Off",
|
|
442
|
+
"description": "",
|
|
443
|
+
"type": "string",
|
|
444
|
+
"required": false,
|
|
445
|
+
"format": "uri",
|
|
446
|
+
"placeholder": "http://localhost/current/off"
|
|
447
|
+
},
|
|
448
|
+
"webhook_current_warning": {
|
|
449
|
+
"title": "Current Event: Warning",
|
|
450
|
+
"description": "",
|
|
451
|
+
"type": "string",
|
|
452
|
+
"required": false,
|
|
453
|
+
"format": "uri",
|
|
454
|
+
"placeholder": "http://localhost/current/warning"
|
|
455
|
+
},
|
|
456
|
+
"webhook_current_triggered": {
|
|
457
|
+
"title": "Current Mode: Triggered",
|
|
458
|
+
"description": "",
|
|
459
|
+
"type": "string",
|
|
460
|
+
"required": false,
|
|
461
|
+
"format": "uri",
|
|
462
|
+
"placeholder": "http://localhost/current/triggered"
|
|
463
|
+
},
|
|
464
|
+
"command_target_home": {
|
|
465
|
+
"title": "Target Mode: Home",
|
|
466
|
+
"description": "",
|
|
467
|
+
"type": "string",
|
|
468
|
+
"required": false,
|
|
469
|
+
"placeholder": "echo target home"
|
|
470
|
+
},
|
|
471
|
+
"command_target_away": {
|
|
472
|
+
"title": "Target Mode: Away",
|
|
473
|
+
"description": "",
|
|
474
|
+
"type": "string",
|
|
475
|
+
"required": false,
|
|
476
|
+
"placeholder": "echo target away"
|
|
477
|
+
},
|
|
478
|
+
"command_target_night": {
|
|
479
|
+
"title": "Target Mode: Night",
|
|
480
|
+
"description": "",
|
|
481
|
+
"type": "string",
|
|
482
|
+
"required": false,
|
|
483
|
+
"placeholder": "echo target night"
|
|
484
|
+
},
|
|
485
|
+
"command_target_off": {
|
|
486
|
+
"title": "Target Mode: Off",
|
|
487
|
+
"description": "",
|
|
488
|
+
"type": "string",
|
|
489
|
+
"required": false,
|
|
490
|
+
"placeholder": "echo target off"
|
|
491
|
+
},
|
|
492
|
+
"command_current_home": {
|
|
493
|
+
"title": "Current Mode: Home",
|
|
494
|
+
"description": "",
|
|
495
|
+
"type": "string",
|
|
496
|
+
"required": false,
|
|
497
|
+
"placeholder": "echo current home"
|
|
498
|
+
},
|
|
499
|
+
"command_current_away": {
|
|
500
|
+
"title": "Current Mode: Away",
|
|
501
|
+
"description": "",
|
|
502
|
+
"type": "string",
|
|
503
|
+
"required": false,
|
|
504
|
+
"placeholder": "echo current away"
|
|
505
|
+
},
|
|
506
|
+
"command_current_night": {
|
|
507
|
+
"title": "Current Mode: Night",
|
|
508
|
+
"description": "",
|
|
509
|
+
"type": "string",
|
|
510
|
+
"required": false,
|
|
511
|
+
"placeholder": "echo current night"
|
|
512
|
+
},
|
|
513
|
+
"command_current_off": {
|
|
514
|
+
"title": "Current Mode: Off",
|
|
515
|
+
"description": "",
|
|
516
|
+
"type": "string",
|
|
517
|
+
"required": false,
|
|
518
|
+
"placeholder": "echo current off"
|
|
519
|
+
},
|
|
520
|
+
"command_current_warning": {
|
|
521
|
+
"title": "Current Event: Warning",
|
|
522
|
+
"description": "",
|
|
523
|
+
"type": "string",
|
|
524
|
+
"required": false,
|
|
525
|
+
"placeholder": "echo current warning"
|
|
526
|
+
},
|
|
527
|
+
"command_current_triggered": {
|
|
528
|
+
"title": "Current Mode: Triggered",
|
|
529
|
+
"description": "",
|
|
530
|
+
"type": "string",
|
|
531
|
+
"required": false,
|
|
532
|
+
"placeholder": "echo current triggered"
|
|
533
|
+
},
|
|
534
|
+
"mqtt_broker": {
|
|
535
|
+
"title": "MQTT Broker URL",
|
|
536
|
+
"description": "",
|
|
537
|
+
"type": "string",
|
|
538
|
+
"required": false,
|
|
539
|
+
"placeholder": "mqtt://localhost:1883"
|
|
540
|
+
},
|
|
541
|
+
"mqtt_username": {
|
|
542
|
+
"title": "MQTT Username",
|
|
543
|
+
"description": "",
|
|
544
|
+
"type": "string",
|
|
545
|
+
"required": false
|
|
546
|
+
},
|
|
547
|
+
"mqtt_password": {
|
|
548
|
+
"title": "MQTT Password",
|
|
549
|
+
"description": "",
|
|
550
|
+
"type": "string",
|
|
551
|
+
"required": false
|
|
552
|
+
},
|
|
553
|
+
"mqtt_topic": {
|
|
554
|
+
"title": "MQTT Topic",
|
|
555
|
+
"description": "",
|
|
556
|
+
"type": "string",
|
|
557
|
+
"default": "security-system/state",
|
|
558
|
+
"required": false
|
|
559
|
+
},
|
|
560
|
+
"mqtt_client_id": {
|
|
561
|
+
"title": "MQTT Client ID",
|
|
562
|
+
"description": "",
|
|
563
|
+
"type": "string",
|
|
564
|
+
"required": false
|
|
565
|
+
},
|
|
566
|
+
"save_state": {
|
|
567
|
+
"title": "Save Data Using Storage",
|
|
568
|
+
"description": "Persists the previous state after shutdowns and reboots.",
|
|
569
|
+
"type": "boolean",
|
|
570
|
+
"default": true,
|
|
571
|
+
"required": false
|
|
572
|
+
},
|
|
573
|
+
"test_mode": {
|
|
574
|
+
"title": "Enable Test Mode",
|
|
575
|
+
"description": "Ignores the webhook and command when the security system triggers.",
|
|
576
|
+
"type": "boolean",
|
|
577
|
+
"default": false,
|
|
578
|
+
"required": false
|
|
579
|
+
},
|
|
580
|
+
"home_arm_seconds": {
|
|
581
|
+
"title": "Home Arming Delay (seconds)",
|
|
582
|
+
"description": "Overrides the global Arming Delay if set.",
|
|
583
|
+
"type": "integer",
|
|
584
|
+
"required": false,
|
|
585
|
+
"minimum": 0,
|
|
586
|
+
"condition": {
|
|
587
|
+
"functionBody": "return !(model.disabled_modes || []).includes('Home');"
|
|
588
|
+
}
|
|
589
|
+
},
|
|
590
|
+
"away_arm_seconds": {
|
|
591
|
+
"title": "Away Arming Delay (seconds)",
|
|
592
|
+
"description": "Overrides the global Arming Delay if set.",
|
|
593
|
+
"type": "integer",
|
|
594
|
+
"required": false,
|
|
595
|
+
"minimum": 0,
|
|
596
|
+
"condition": {
|
|
597
|
+
"functionBody": "return !(model.disabled_modes || []).includes('Away');"
|
|
598
|
+
}
|
|
599
|
+
},
|
|
600
|
+
"night_arm_seconds": {
|
|
601
|
+
"title": "Night Arming Delay (seconds)",
|
|
602
|
+
"description": "Overrides the global Arming Delay if set.",
|
|
603
|
+
"type": "integer",
|
|
604
|
+
"required": false,
|
|
605
|
+
"minimum": 0,
|
|
606
|
+
"condition": {
|
|
607
|
+
"functionBody": "return !(model.disabled_modes || []).includes('Night');"
|
|
608
|
+
}
|
|
609
|
+
},
|
|
610
|
+
"home_trigger_seconds": {
|
|
611
|
+
"title": "Home Trigger Delay (seconds)",
|
|
612
|
+
"description": "Overrides the global Trigger Delay if set.",
|
|
613
|
+
"type": "integer",
|
|
614
|
+
"required": false,
|
|
615
|
+
"minimum": 0,
|
|
616
|
+
"condition": {
|
|
617
|
+
"functionBody": "return !(model.disabled_modes || []).includes('Home');"
|
|
618
|
+
}
|
|
619
|
+
},
|
|
620
|
+
"away_trigger_seconds": {
|
|
621
|
+
"title": "Away Trigger Delay (seconds)",
|
|
622
|
+
"description": "Overrides the global Trigger Delay if set.",
|
|
623
|
+
"type": "integer",
|
|
624
|
+
"required": false,
|
|
625
|
+
"minimum": 0,
|
|
626
|
+
"condition": {
|
|
627
|
+
"functionBody": "return !(model.disabled_modes || []).includes('Away');"
|
|
628
|
+
}
|
|
629
|
+
},
|
|
630
|
+
"night_trigger_seconds": {
|
|
631
|
+
"title": "Night Trigger Delay (seconds)",
|
|
632
|
+
"description": "Overrides the global Trigger Delay if set.",
|
|
633
|
+
"type": "integer",
|
|
634
|
+
"required": false,
|
|
635
|
+
"minimum": 0,
|
|
636
|
+
"condition": {
|
|
637
|
+
"functionBody": "return !(model.disabled_modes || []).includes('Night');"
|
|
638
|
+
}
|
|
639
|
+
},
|
|
640
|
+
"override_off": {
|
|
641
|
+
"title": "Trigger During Off Mode",
|
|
642
|
+
"description": "Allows the security system to be triggered while disarmed.",
|
|
643
|
+
"type": "boolean",
|
|
644
|
+
"default": false,
|
|
645
|
+
"required": false
|
|
646
|
+
},
|
|
647
|
+
"reset_off_flow": {
|
|
648
|
+
"title": "Reset Using Off Mode",
|
|
649
|
+
"description": "Resets the security system when triggered by passing through the Off mode.",
|
|
650
|
+
"type": "boolean",
|
|
651
|
+
"default": false,
|
|
652
|
+
"required": false
|
|
653
|
+
},
|
|
654
|
+
"proxy_mode": {
|
|
655
|
+
"title": "Enable Proxy Mode",
|
|
656
|
+
"description": "Ignores webhooks/commands for server requests.",
|
|
657
|
+
"type": "boolean",
|
|
658
|
+
"default": false,
|
|
659
|
+
"required": false
|
|
660
|
+
},
|
|
661
|
+
"double_knock": {
|
|
662
|
+
"title": "Use Double-Knock",
|
|
663
|
+
"description": "Requires Trip switches to be turned on twice within a time window for the system to be triggered.",
|
|
664
|
+
"type": "boolean",
|
|
665
|
+
"default": false,
|
|
666
|
+
"required": false
|
|
667
|
+
},
|
|
668
|
+
"double_knock_seconds": {
|
|
669
|
+
"title": "Time Window (seconds)",
|
|
670
|
+
"description": "",
|
|
671
|
+
"type": "integer",
|
|
672
|
+
"default": 90,
|
|
673
|
+
"required": false,
|
|
674
|
+
"minimum": 0,
|
|
675
|
+
"condition": {
|
|
676
|
+
"functionBody": "return model.double_knock === true;"
|
|
677
|
+
}
|
|
678
|
+
},
|
|
679
|
+
"home_double_knock_seconds": {
|
|
680
|
+
"title": "Home Double-Knock Window (seconds)",
|
|
681
|
+
"description": "",
|
|
682
|
+
"type": "integer",
|
|
683
|
+
"required": false,
|
|
684
|
+
"minimum": 0,
|
|
685
|
+
"condition": {
|
|
686
|
+
"functionBody": "return !(model.disabled_modes || []).includes('Home') && model.double_knock === true;"
|
|
687
|
+
}
|
|
688
|
+
},
|
|
689
|
+
"away_double_knock_seconds": {
|
|
690
|
+
"title": "Away Double-Knock Window (seconds)",
|
|
691
|
+
"description": "",
|
|
692
|
+
"type": "integer",
|
|
693
|
+
"required": false,
|
|
694
|
+
"minimum": 0,
|
|
695
|
+
"condition": {
|
|
696
|
+
"functionBody": "return !(model.disabled_modes || []).includes('Away') && model.double_knock === true;"
|
|
697
|
+
}
|
|
698
|
+
},
|
|
699
|
+
"night_double_knock_seconds": {
|
|
700
|
+
"title": "Night Double-Knock Window (seconds)",
|
|
701
|
+
"description": "",
|
|
702
|
+
"type": "integer",
|
|
703
|
+
"required": false,
|
|
704
|
+
"minimum": 0,
|
|
705
|
+
"condition": {
|
|
706
|
+
"functionBody": "return !(model.disabled_modes || []).includes('Night') && model.double_knock === true;"
|
|
707
|
+
}
|
|
708
|
+
},
|
|
709
|
+
"double_knock_modes": {
|
|
710
|
+
"title": "Double-Knock Modes",
|
|
711
|
+
"description": "",
|
|
712
|
+
"type": "array",
|
|
713
|
+
"default": [],
|
|
714
|
+
"required": false,
|
|
715
|
+
"uniqueItems": true,
|
|
716
|
+
"items": {
|
|
717
|
+
"title": "Mode",
|
|
718
|
+
"type": "string",
|
|
719
|
+
"enum": ["Home", "Away", "Night"]
|
|
720
|
+
},
|
|
721
|
+
"condition": {
|
|
722
|
+
"functionBody": "return model.double_knock === true;"
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
},
|
|
727
|
+
"layout": [
|
|
728
|
+
"name",
|
|
729
|
+
"serial_number",
|
|
730
|
+
"disabled_modes",
|
|
731
|
+
"default_mode",
|
|
732
|
+
{
|
|
733
|
+
"type": "div",
|
|
734
|
+
"displayFlex": true,
|
|
735
|
+
"flex-flow": "row wrap",
|
|
736
|
+
"flex-direction": "row",
|
|
737
|
+
"items": ["arm_seconds", "trigger_seconds", "reset_minutes"]
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
"type": "fieldset",
|
|
741
|
+
"title": "Switches",
|
|
742
|
+
"description": "Create simpler automations or bypass HomeKit confirmations.",
|
|
743
|
+
"expandable": true,
|
|
744
|
+
"expanded": false,
|
|
745
|
+
"items": [
|
|
746
|
+
"mode_switches",
|
|
747
|
+
"mode_home_switch_name",
|
|
748
|
+
"mode_away_switch_name",
|
|
749
|
+
"mode_night_switch_name",
|
|
750
|
+
"mode_off_switch",
|
|
751
|
+
"mode_off_switch_name",
|
|
752
|
+
{
|
|
753
|
+
"type": "div",
|
|
754
|
+
"displayFlex": true,
|
|
755
|
+
"flex-flow": "row wrap",
|
|
756
|
+
"flex-direction": "row",
|
|
757
|
+
"items": [
|
|
758
|
+
"mode_away_extended_switch",
|
|
759
|
+
"mode_away_extended_switch_trigger_seconds",
|
|
760
|
+
"mode_away_extended_switch_name"
|
|
761
|
+
],
|
|
762
|
+
"condition": {
|
|
763
|
+
"functionBody": "return !(model.disabled_modes || []).includes('Away');"
|
|
764
|
+
}
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
"type": "div",
|
|
768
|
+
"displayFlex": true,
|
|
769
|
+
"flex-flow": "row",
|
|
770
|
+
"flex-direction": "row",
|
|
771
|
+
"items": ["mode_pause_switch", "pause_minutes"]
|
|
772
|
+
},
|
|
773
|
+
"mode_pause_switch_name",
|
|
774
|
+
"arming_lock_switch",
|
|
775
|
+
"arming_lock_switches",
|
|
776
|
+
"trip_switch",
|
|
777
|
+
"trip_switch_name",
|
|
778
|
+
"trip_override_switch",
|
|
779
|
+
"trip_override_switch_name",
|
|
780
|
+
"trip_mode_switches",
|
|
781
|
+
"trip_home_switch_name",
|
|
782
|
+
"trip_away_switch_name",
|
|
783
|
+
"trip_night_switch_name",
|
|
784
|
+
{
|
|
785
|
+
"key": "trip_home_switches",
|
|
786
|
+
"type": "tabarray",
|
|
787
|
+
"title": "{{ value.label || 'Home Switch' }}",
|
|
788
|
+
"items": ["trip_home_switches[].label"]
|
|
789
|
+
},
|
|
790
|
+
{
|
|
791
|
+
"key": "trip_away_switches",
|
|
792
|
+
"type": "tabarray",
|
|
793
|
+
"title": "{{ value.label || 'Away Switch' }}",
|
|
794
|
+
"items": ["trip_away_switches[].label"]
|
|
795
|
+
},
|
|
796
|
+
{
|
|
797
|
+
"key": "trip_night_switches",
|
|
798
|
+
"type": "tabarray",
|
|
799
|
+
"title": "{{ value.label || 'Night Switch' }}",
|
|
800
|
+
"items": ["trip_night_switches[].label"]
|
|
801
|
+
}
|
|
802
|
+
]
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
"type": "fieldset",
|
|
806
|
+
"title": "Sensors",
|
|
807
|
+
"description": "Automate based on custom events or get alerted by multiple notifications.",
|
|
808
|
+
"expandable": true,
|
|
809
|
+
"expanded": false,
|
|
810
|
+
"items": [
|
|
811
|
+
"arming_sensor",
|
|
812
|
+
{
|
|
813
|
+
"type": "div",
|
|
814
|
+
"displayFlex": true,
|
|
815
|
+
"flex-flow": "row",
|
|
816
|
+
"flex-direction": "row",
|
|
817
|
+
"items": ["tripped_sensor", "tripped_sensor_seconds"]
|
|
818
|
+
},
|
|
819
|
+
"reset_sensor"
|
|
820
|
+
]
|
|
821
|
+
},
|
|
822
|
+
{
|
|
823
|
+
"type": "fieldset",
|
|
824
|
+
"title": "Server",
|
|
825
|
+
"description": "Expose a server to interact with the security system remotely.",
|
|
826
|
+
"expandable": true,
|
|
827
|
+
"expanded": false,
|
|
828
|
+
"items": ["server_port", "server_api_key"]
|
|
829
|
+
},
|
|
830
|
+
{
|
|
831
|
+
"type": "fieldset",
|
|
832
|
+
"title": "Webhooks",
|
|
833
|
+
"description": "Interact with other devices or web services during events",
|
|
834
|
+
"expandable": true,
|
|
835
|
+
"expanded": false,
|
|
836
|
+
"items": [
|
|
837
|
+
"webhook_target_home",
|
|
838
|
+
"webhook_target_away",
|
|
839
|
+
"webhook_target_night",
|
|
840
|
+
"webhook_target_off",
|
|
841
|
+
"webhook_current_home",
|
|
842
|
+
"webhook_current_away",
|
|
843
|
+
"webhook_current_night",
|
|
844
|
+
"webhook_current_off",
|
|
845
|
+
"webhook_current_warning",
|
|
846
|
+
"webhook_current_triggered"
|
|
847
|
+
]
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
"type": "fieldset",
|
|
851
|
+
"title": "Commands",
|
|
852
|
+
"description": "Execute commands on this device based on events.",
|
|
853
|
+
"expandable": true,
|
|
854
|
+
"expanded": false,
|
|
855
|
+
"items": [
|
|
856
|
+
"command_target_home",
|
|
857
|
+
"command_target_away",
|
|
858
|
+
"command_target_night",
|
|
859
|
+
"command_target_off",
|
|
860
|
+
"command_current_home",
|
|
861
|
+
"command_current_away",
|
|
862
|
+
"command_current_night",
|
|
863
|
+
"command_current_off",
|
|
864
|
+
"command_current_warning",
|
|
865
|
+
"command_current_triggered"
|
|
866
|
+
]
|
|
867
|
+
},
|
|
868
|
+
{
|
|
869
|
+
"type": "fieldset",
|
|
870
|
+
"title": "MQTT",
|
|
871
|
+
"description": "Publish state updates to an MQTT broker.",
|
|
872
|
+
"expandable": true,
|
|
873
|
+
"expanded": false,
|
|
874
|
+
"items": [
|
|
875
|
+
"mqtt_broker",
|
|
876
|
+
"mqtt_username",
|
|
877
|
+
"mqtt_password",
|
|
878
|
+
"mqtt_topic",
|
|
879
|
+
"mqtt_client_id"
|
|
880
|
+
]
|
|
881
|
+
},
|
|
882
|
+
{
|
|
883
|
+
"type": "fieldset",
|
|
884
|
+
"title": "Advanced Options",
|
|
885
|
+
"description": "",
|
|
886
|
+
"expandable": true,
|
|
887
|
+
"expanded": false,
|
|
888
|
+
"items": [
|
|
889
|
+
"save_state",
|
|
890
|
+
"test_mode",
|
|
891
|
+
{
|
|
892
|
+
"type": "div",
|
|
893
|
+
"displayFlex": true,
|
|
894
|
+
"flex-flow": "row wrap",
|
|
895
|
+
"flex-direction": "row",
|
|
896
|
+
"items": ["home_arm_seconds", "away_arm_seconds", "night_arm_seconds"]
|
|
897
|
+
},
|
|
898
|
+
{
|
|
899
|
+
"type": "div",
|
|
900
|
+
"displayFlex": true,
|
|
901
|
+
"flex-flow": "row wrap",
|
|
902
|
+
"flex-direction": "row",
|
|
903
|
+
"items": [
|
|
904
|
+
"home_trigger_seconds",
|
|
905
|
+
"away_trigger_seconds",
|
|
906
|
+
"night_trigger_seconds"
|
|
907
|
+
]
|
|
908
|
+
},
|
|
909
|
+
"override_off",
|
|
910
|
+
"reset_off_flow",
|
|
911
|
+
"proxy_mode",
|
|
912
|
+
{
|
|
913
|
+
"type": "div",
|
|
914
|
+
"displayFlex": true,
|
|
915
|
+
"flex-flow": "row wrap",
|
|
916
|
+
"flex-direction": "row",
|
|
917
|
+
"items": ["double_knock", "double_knock_seconds"]
|
|
918
|
+
},
|
|
919
|
+
{
|
|
920
|
+
"type": "div",
|
|
921
|
+
"displayFlex": true,
|
|
922
|
+
"flex-flow": "row wrap",
|
|
923
|
+
"flex-direction": "row",
|
|
924
|
+
"items": [
|
|
925
|
+
"home_double_knock_seconds",
|
|
926
|
+
"away_double_knock_seconds",
|
|
927
|
+
"night_double_knock_seconds"
|
|
928
|
+
]
|
|
929
|
+
},
|
|
930
|
+
"double_knock_modes"
|
|
931
|
+
]
|
|
932
|
+
}
|
|
933
|
+
]
|
|
934
|
+
}
|