-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathconfig.schema.json
308 lines (308 loc) · 9.59 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
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
{
"pluginAlias": "NetworkDevice",
"pluginType": "accessory",
"singular": false,
"headerDisplay": "Full documentation for homebridge-wol is available on its GitHub page: [https://github.com/AlexGustafsson/homebridge-wol](https://github.com/AlexGustafsson/homebridge-wol).",
"footerDisplay": "The homebridge-wol plugin wouldn't be the same without the community. Any contribution is welcome. If you're not able to code it yourself, perhaps someone else is - so post an issue if there's anything on your mind. If you're new to the open source community, JavaScript, GitHub or just uncertain where to begin - issues labeled \"good first issue\" are a great place to start. Just comment on an issue you'd like to investigate and you'll get guidance along the way. [Contribute](https://github.com/AlexGustafsson/homebridge-wol).",
"schema": {
"type": "object",
"properties": {
"name": {
"title": "Name",
"type": "string",
"default": "My NetworkDevice",
"required": false
},
"manufacturer": {
"title": "Manufacturer",
"type": "string",
"default": "homebridge-wol",
"required": false
},
"model": {
"title": "Model",
"type": "string",
"default": "NetworkDevice",
"required": false
},
"serialNumber": {
"title": "Serial number",
"type": "string",
"required": false
},
"host": {
"title": "IP address or hostname",
"description": "The IP address or hostname to ping in order to receive current status.",
"type": "string",
"required": false
},
"pingInterval": {
"title": "Ping interval",
"description": "Ping interval in seconds. Only used if the IP address is set.",
"type": "integer",
"default": 2,
"required": false
},
"pingsToChange": {
"title": "Pings to change",
"description": "The number of pings necessary to trigger a state change, only used if the IP address is set.",
"type": "integer",
"default": 5,
"requried": false
},
"pingTimeout": {
"title": "Ping timeout",
"description": "Number of seconds to wait for pinging to finish.",
"type": "integer",
"default": 1,
"required": false
},
"pingCommand": {
"title": "Ping command",
"description": "Command to run in order to know if a host is up or not. If the command exits successfully (zero as the exit code) the host is considered up. If an error is thrown or the command exits with a non-zero exit code, the host is considered down.",
"type": "string",
"required": false
},
"pingCommandTimeout": {
"title": "Ping command timeout",
"description": "Timeout for the ping command in seconds. Use 0 (default) to disable the timeout.",
"type": "integer",
"required": false,
"default": 0
},
"mac": {
"title": "MAC address",
"description": "The device's MAC address - used to send Magic Packets. Allows any format such as XX:XX:XX:XX:XX:XX or XXXXXXXXXXXX.",
"type": "string",
"required": false
},
"broadcastAddress": {
"title": "Broadcast address",
"description": "The broadcast address to use when sending the Wake on LAN packet, such as 172.16.1.255.",
"type": "string",
"required": false
},
"startCommand": {
"title": "Start command",
"description": "Command to run in order to start the machine.",
"type": "string",
"required": false
},
"startCommandTimeout": {
"title": "Start command timeout",
"description": "Timeout for the start command in seconds. Use 0 (default) to disable the timeout.",
"type": "integer",
"required": false,
"default": 0
},
"wakeGraceTime": {
"title": "Wake grace time",
"description": "Number of seconds to wait after startup before checking online status and issuing the wake command.",
"type": "integer",
"required": false,
"default": 45
},
"wakeCommand": {
"title": "Wake command",
"description": "Command to run after initial startup, useful for macOS users in need of running caffeinate.",
"type": "string",
"required": false
},
"wakeCommandTimeout": {
"title": "Wake command timeout",
"description": "Timeout for the wake command in seconds. Use 0 (default) to disable the timeout.",
"type": "integer",
"required": false,
"default": 0
},
"shutdownCommand": {
"title": "Shutdown command",
"description": "Command to run in order to shut down the remote machine.",
"type": "string",
"required": false
},
"shutdownGraceTime": {
"title": "Shutdown grace time",
"description": "Number of seconds to wait after shutdown before checking offline status.",
"type": "integer",
"required": false,
"default": 15
},
"shutdownCommandTimeout": {
"title": "Shutdown command timeout",
"description": "Timeout for the shutdown command in seconds. Use 0 (default) to disable the timeout.",
"type": "integer",
"required": false,
"default": 0
},
"logLevel": {
"title": "Log Level",
"description": "The syslog log level to use such as Debug, Info, Error. The default is Info. Use None to disable logging.",
"type": "string",
"enum": [
"Debug",
"Info",
"Notice",
"Warning",
"Error",
"Critical",
"Alert",
"Emergency",
"None"
],
"default": "Info"
},
"returnEarly": {
"title": "Return early",
"description": "Whether or not to let the plugin return early to mitigate Siri issue (see https://github.com/AlexGustafsson/homebridge-wol/issues/85).",
"type": "boolean",
"default": false
}
}
},
"form": null,
"display": null,
"layout": [
{
"type": "flex",
"flex-flow": "row wrap",
"items": [
{
"type": "flex",
"flex-flow": "column",
"items": ["name"]
}
]
},
{
"ref": "pinging",
"type": "fieldset",
"expandable": true,
"title": "Pinging configuration",
"items": [
"host",
{
"key": "pingInterval",
"condition": {
"functionBody": "return (model.host && model.host.length > 0)"
}
},
{
"key": "pingsToChange",
"condition": {
"functionBody": "return (model.host && model.host.length > 0)"
}
},
{
"key": "pingTimeout",
"condition": {
"functionBody": "return (model.host && model.host.length > 0)"
}
}
]
},
{
"ref": "pingingCommand",
"type": "fieldset",
"expandable": true,
"title": "Pinging command configuration",
"items": [
{
"key": "pingCommand"
},
{
"key": "pingCommandTimeout",
"condition": {
"functionBody": "return (model.pingCommand && model.pingCommand.length > 0)"
}
},
{
"key": "pingInterval",
"condition": {
"functionBody": "return (model.pingCommand && model.pingCommand.length > 0)"
}
}
]
},
{
"ref": "wake",
"type": "fieldset",
"expandable": true,
"title": "Wake configuration",
"items": [
"mac",
{
"key": "broadcastAddress",
"condition": {
"functionBody": "return (model.mac && model.mac.length > 0)"
}
},
{
"key": "startCommand",
"condition": {
"functionBody": "return (model.mac && model.mac.length > 0)"
}
},
{
"key": "startCommandTimeout",
"condition": {
"functionBody": "return (model.startCommand && model.startCommand.length > 0)"
}
},
{
"key": "wakeGraceTime",
"condition": {
"functionBody": "return (model.mac && model.mac.length > 0)"
}
},
{
"key": "wakeCommand",
"condition": {
"functionBody": "return (model.mac && model.mac.length > 0)"
}
},
{
"key": "wakeCommandTimeout",
"condition": {
"functionBody": "return (model.wakeCommand && model.wakeCommand.length > 0)"
}
}
]
},
{
"ref": "shutdown",
"type": "fieldset",
"expandable": true,
"title": "Shutdown configuration",
"items": [
"shutdownCommand",
{
"key": "shutdownGraceTime",
"condition": {
"functionBody": "return (model.shutdownCommand && model.shutdownCommand.length > 0)"
}
},
{
"key": "shutdownCommandTimeout",
"condition": {
"functionBody": "return (model.shutdownCommand && model.shutdownCommand.length > 0)"
}
}
]
},
{
"ref": "logging",
"type": "fieldset",
"expandable": true,
"title": "Logging",
"items": ["logLevel"]
},
{
"ref": "miscellaneous",
"type": "fieldset",
"expandable": true,
"title": "Miscellaneous",
"items": ["returnEarly", "manufacturer", "model", "serialNumber"]
}
]
}