-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathconfig.schema.json
239 lines (238 loc) · 7.87 KB
/
config.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
{
"pluginAlias": "NukiBridge",
"pluginType": "platform",
"singular": true,
"headerDisplay": "Nuki.io support for Homebridge that supports Nuki Lock and Nuki Opener.",
"schema": {
"type": "object",
"properties": {
"bridge_url": {
"title": "Bridge URL",
"description": "The URL of the Nuki bridge.",
"default": "http://",
"type": "string",
"required": true,
"format": "uri"
},
"api_token": {
"title": "Bridge API Token",
"description": "The API Token of the Nuki bridge. Can be configured when setting up the bridge in the Nuki App.",
"type": "string",
"required": true
},
"api_token_hashed": {
"title": "Send Bridge API Token Hashed",
"description": "Send Bridge API Token using a hash. By default it is plaintext.",
"default": false,
"type": "boolean"
},
"lock_state_mode": {
"title": "Lock state mode",
"description": "The mode to evaluate lock states. See readme for details.",
"default": 0,
"oneOf": [
{ "title": "Always request lock states", "enum": [0] },
{ "title": "Use plugin cache", "enum": [1] },
{ "title": "Use bridge cache", "enum": [2] }
],
"type": "integer",
"required": true
},
"webhook_server_ip_or_name": {
"title": "Webhook server IP/name",
"description": "The IP or name of the server receiving the webhook (server that is running homebridge).",
"type": "string"
},
"webhook_port": {
"title": "Webhook port",
"description": "The port the webhook server should listen to. Must be free and not the hombridge port.",
"default": 51827,
"type": "integer",
"minimum": 1
},
"cache_directory": {
"title": "Cache directory",
"description": "The directory where to write the cache. Default is in hombridge storage path '.homebridge-nukiio'. It must point to a valid and empty directory and the user that runs homebridge must have write access.",
"default": "",
"type": "string"
},
"request_timeout_lockstate": {
"title": "Request timeout lock state",
"description": "The request time of for requesting lock state.",
"default": 15000,
"type": "integer",
"minimum": 1
},
"request_timeout_lockaction": {
"title": "Request timeout lock action",
"description": "The request time of for requesting lock action.",
"default": 45000,
"type": "integer",
"minimum": 1
},
"request_timeout_other": {
"title": "Request timeout other",
"description": "The request time of for other requests.",
"default": 15000,
"type": "integer",
"minimum": 1
},
"lockaction_maxtries": {
"title": "Maxiumum retries lock action",
"description": "The maxiumum retries for lock action.",
"default": 3,
"type": "integer",
"minimum": 1
},
"lockaction_retrydelay": {
"title": "Retry delay lock action",
"description": "The retry delay for lock action.",
"default": 3000,
"type": "integer",
"minimum": 1
},
"add_maintainance_buttons": {
"title": "Maintainance buttons",
"description": "Add maintainance buttons. If active, than three switches will be added as accessory to do reboot, firmware update, and to refresh all locks states.",
"default": false,
"type": "boolean"
},
"locks": {
"title": "Locks",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"title": "Lock ID",
"description": "The ID of the lock. Can be found when calling http://your-nuki-bridge-url/list?token=your-nuki-api-token in a browser.",
"type": "string"
},
"name": {
"title": "Name",
"description": "The name of the lock to use in Homekit.",
"type": "string"
},
"usesDoorLatch": {
"title": "Uses door latch",
"description": "Does your door use a door latch?",
"type": "boolean"
},
"usesDoorContactSensor": {
"title": "Uses door sensor",
"description": "Does your nuki use a door sensor?",
"type": "boolean"
},
"preventLockingIfAlreadyLocked": {
"title": "Prevent locking if already locked",
"description": "Can be used for locks set to turn 360 degrees to not lock twice.",
"type": "boolean"
},
"priority": {
"title": "Priority",
"description": "The priority of the lock. Locks with higher priority {lower number} will be proccessed first.",
"placeholder": 99,
"type": "integer",
"minimum": 1
},
"deviceType": {
"title": "Device Type",
"description": "The device type of the lock. 0 = Nuki Smart Lock 1.0/2.0, 3 = Nuki Smart Door, 4 = Nuki Smart Lock 3.0 (Pro).",
"placeholder": 0,
"type": "integer",
"minimum": 0
}
},
"required": [ "id", "name"]
}
},
"openers": {
"title": "Openers",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"title": "Opener ID",
"description": "The ID of the opener. Can be found when calling http://your-nuki-bridge-url/list?token=your-nuki-api-token in a browser.",
"type": "string"
},
"name": {
"title": "Name",
"description": "The name of the opener to use in Homekit.",
"type": "string"
},
"disableRingToOpen": {
"title": "Disable RingToOpen",
"description": "Removes lock accessory for setting RingToOpen",
"type": "boolean"
},
"disableContinuousMode": {
"title": "Disable ContinuousMode",
"description": "Removes lock accessory for setting ContinuousMode",
"type": "boolean"
},
"priority": {
"title": "Priority",
"description": "The priority of the opener. Openers with higher priority {lower number} will be proccessed first.",
"placeholder": 99,
"type": "integer",
"minimum": 1
}
},
"required": [ "id", "name"]
}
}
}
},
"form": [
"bridge_url",
{
"key": "api_token",
"type": "password"
},
"lock_state_mode",
{
"key": "webhook_server_ip_or_name",
"condition": {
"functionBody":"try { return model.lock_state_mode===1} catch(e){return false}"
},
"required": true
},
{
"key": "webhook_port",
"condition": {
"functionBody":"try { return model.lock_state_mode===1} catch(e){return false}"
},
"required": true
},
"cache_directory",
"request_timeout_lockstate",
"request_timeout_lockaction",
"request_timeout_other",
"lockaction_maxtries",
"lockaction_retrydelay",
"add_maintainance_buttons",
{
"key": "locks",
"items": [
"locks[].id",
"locks[].name",
"locks[].usesDoorLatch",
"locks[].usesDoorContactSensor",
"locks[].priority",
"locks[].deviceType"
]
},
{
"key": "openers",
"items": [
"openers[].id",
"openers[].name",
"openers[].disableRingToOpen",
"openers[].disableContinuousMode",
"openers[].priority"
]
}
]
}