-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
config.schema.json
573 lines (573 loc) · 19.9 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
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
{
"pluginAlias": "RPi",
"pluginType": "platform",
"singular": true,
"headerDisplay": "Homebridge plugin for Raspberry Pi",
"footerDisplay": "",
"schema": {
"type": "object",
"additionalProperties": false,
"properties": {
"platform": {},
"name": {
"description": "Plugin name as displayed in the Homebridge log.",
"type": "string",
"required": true,
"default": "RPi"
},
"hosts": {
"title": "Raspberry Pis",
"notitle": true,
"type": "array",
"items": {
"description": "<b>Raspberry Pi</b>",
"type": "object",
"additionalProperties": false,
"properties": {
"host": {
"title": "Host",
"description": "IP address or hostname and port of the Pi's pigpiod server. E.g.: 'localhost:8888'.",
"type": "string",
"required": true
},
"name": {
"title": "Name",
"description": "The hostname of the Raspberry Pi.",
"type": "string"
},
"hidden": {
"title": "Hidden",
"description": "Do not expose a service for the Raspberry Pi itself.",
"type": "boolean"
},
"noFan": {
"title": "No Fan",
"description": "Do not expose a Fan service for the Raspberry Pi fan.",
"type": "boolean"
},
"noPowerLed": {
"title": "No Power LED",
"description": "Do not expose a Lightbulb service for the Raspberry Pi power LED.",
"type": "boolean"
},
"noSmokeSensor": {
"title": "No Smoke Sensor",
"description": "Do not expose a Smoke Sensor service for the Raspberry Pi itself.",
"type": "boolean"
},
"usbPower": {
"title": "USB Power",
"description": "Expose an Outlet service to control power to the USB ports. Only for Raspberry Pi models with four USB 2.0 ports: B+, 2B, 3B, and 3B+.<br>You need to configure pigpiod as well, see the <a href=\"https://github.com/ebaauw/homebridge-rpi/wiki/Supported-Devices#usb-power\" target=\"_blank\">Wiki</a>.",
"type": "boolean"
},
"devices": {
"title": "Devices",
"notitle": true,
"type": "array",
"items": {
"description": "<b>Device</b>",
"type": "object",
"additionalProperties": false,
"properties": {
"device": {
"title": "Device",
"description": "The type of the device. See the <a href=\"https://github.com/ebaauw/homebridge-rpi/wiki/Supported-Devices#gpio-devices\" target=\"_blank\">Wiki</a> for details.",
"type": "string",
"required": true,
"oneOf": [
{
"title": "Blinkt",
"enum": [
"blinkt"
]
},
{
"title": "Button",
"enum": [
"button"
]
},
{
"title": "DHTxx Temperature/Humidity Sensor",
"enum": [
"dht"
]
},
{
"title": "Carbon Monoxide Sensor",
"enum": [
"carbonmonoxide"
]
},
{
"title": "Contact Sensor",
"enum": [
"contact"
]
},
{
"title": "Door Bell",
"enum": [
"doorbell"
]
},
{
"title": "Fan",
"enum": [
"fan"
]
},
{
"title": "Fan SHIM",
"enum": [
"fanshim"
]
},
{
"title": "Garage Door Opener",
"enum": [
"garage"
]
},
{
"title": "Leak Sensor",
"enum": [
"leak"
]
},
{
"title": "Light",
"enum": [
"light"
]
},
{
"title": "Lock",
"enum": [
"lock"
]
},
{
"title": "Motion Sensor",
"enum": [
"motion"
]
},
{
"title": "Chain of P9813 LED Controllers",
"enum": [
"p9813"
]
},
{
"title": "Rocker",
"enum": [
"rocker"
]
},
{
"title": "Servo Motor",
"enum": [
"servo"
]
},
{
"title": "Smoke Sensor",
"enum": [
"smoke"
]
},
{
"title": "Switch",
"enum": [
"switch"
]
},
{
"title": "Valve",
"enum": [
"valve"
]
}
]
},
"name": {
"title": "Name",
"description": "The HomeKit name of the device.",
"type": "string"
},
"gpio": {
"title": "GPIO",
"description": "The BCM number of the GPIO pin.<br>For devices: Button, Carbon Monoxide Sensor, Contact Sensor, DHTxx Sensor, Door Bell, Fan, Garage Door Opener, Leak Sensor, Light, Motion Sensor, Rocker, Servo Motor, Smoke Sensor, Switch.",
"type": "integer",
"maximum": 31
},
"pull": {
"title": "Pull-up/pull-down resistor",
"description": "The configuration of the internal pull-up/pull-down resistor.<br>For input devices: Button, Carbon Monoxide Sensor, Contact Sensor, Door Bell, Leak Sensor, Motion Sensor, Rocket, Smoke Sensor.",
"type": "string",
"oneOf": [
{
"title": "Off",
"enum": [
"off"
]
},
{
"title": "Pull-down",
"enum": [
"down"
]
},
{
"title": "Pull-up",
"enum": [
"up"
]
}
]
},
"debounceTimeout": {
"title": "Debounce Timeout",
"description": "Time in ms to ignore state changes for debouncing. Default 20ms.<br>For input devices: Button, Carbon Monoxide Sensor, Contact Sensor, Door Bell, Leak Sensor, Motion Sensor, Rocket, Smoke Sensor.",
"type": "integer",
"minimum": 0,
"maxmimum": 300
},
"reversed": {
"title": "Reversed",
"description": "The device state is reversed<br>For devices: Button, Carbon Monoxide Sensor, Contact Sensor, Door Bell, Garage Door Opener, Leak Sensor, Motion Sensor, Smoke Sensor, Switch.",
"type": "boolean"
},
"doublePressTimeout": {
"title": "Double Press Timeout",
"description": "Time in ms to wait after a release to see if button is pressed again for Double Press. Default 500ms. Set to 0 to disable Double Press altogether.<br>For device: Button.",
"type": "integer",
"minimum": 0,
"maxmimum": 100
},
"longPressTimeout": {
"title": "Long Press Timeout",
"description": "Time in ms between button press and release after which a Long Press is issued. Default: 1000ms. Set to 0 to disable Long Press.<br>For device: Button.",
"type": "integer",
"minimum": 0,
"maxmimum": 100
},
"pulse": {
"title": "Pulse",
"description": "Time in ms to lock the lock or turn off the switch automatically.<br>For devices: Lock, Switch.",
"type": "integer",
"minimum": 20,
"maximum": 5000
},
"duration": {
"title": "Expose Duration",
"description": "Expose duration characteristic on switch to turn it off automatically.<br>For device: Switch.",
"type": "boolean"
},
"gpioClock": {
"title": "GPIO Clock",
"description": "The BCM number of the GPIO pin for the clock signal.<br>For device: Blinkt.",
"type": "integer",
"maximum": 31
},
"gpioData": {
"title": "GPIO Data",
"description": "The BCM number of the GPIO pin for the data signal.<br>For device: Blinkt.",
"type": "integer",
"maximum": 31
},
"nLeds": {
"title": "# LEDs",
"description": "The number LEDs.<br>For device: Blinkt.",
"type": "integer"
}
},
"allOf": [
{
"oneOf": [
{
"properties": {
"device": {
"enum": [
"blinkt",
"fanshim",
"p9813"
]
},
"gpio": {
"not": {}
}
}
},
{
"properties": {
"device": {
"enum": [
"button",
"carbonmonoxide",
"contact",
"dht",
"doorbell",
"fan",
"garage",
"leak",
"light",
"lock",
"motion",
"rocker",
"servo",
"smoke",
"switch",
"valve"
]
}
},
"required": [
"gpio"
]
}
]
},
{
"anyOf": [
{
"properties": {
"device": {
"enum": [
"button",
"carbonmonoxide",
"contact",
"doorbell",
"leak",
"motion",
"rocker",
"smoke"
]
}
}
},
{
"properties": {
"pull": {
"not": {}
}
}
}
]
},
{
"anyOf": [
{
"properties": {
"device": {
"enum": [
"button",
"carbonmonoxide",
"contact",
"doorbell",
"leak",
"motion",
"rocker",
"smoke"
]
}
}
},
{
"properties": {
"debounceTimeout": {
"not": {}
}
}
}
]
},
{
"anyOf": [
{
"properties": {
"device": {
"enum": [
"button",
"carbonmonoxide",
"contact",
"doorbell",
"fan",
"garage",
"leak",
"light",
"lock",
"motion",
"smoke",
"switch",
"valve"
]
}
}
},
{
"properties": {
"reversed": {
"not": {}
}
}
}
]
},
{
"anyOf": [
{
"properties": {
"device": {
"const": "button"
}
}
},
{
"properties": {
"doublePressTimeout": {
"not": {}
}
}
}
]
},
{
"anyOf": [
{
"properties": {
"device": {
"const": "button"
}
}
},
{
"properties": {
"longPressTimeout": {
"not": {}
}
}
}
]
},
{
"oneOf": [
{
"properties": {
"device": {
"enum": [
"blinkt",
"p9813"
]
}
}
},
{
"properties": {
"gpioClock": {
"not": {}
}
}
}
]
},
{
"oneOf": [
{
"properties": {
"device": {
"enum": [
"blinkt",
"p9813"
]
}
}
},
{
"properties": {
"gpioData": {
"not": {}
}
}
}
]
},
{
"oneOf": [
{
"properties": {
"device": {
"enum": [
"blinkt",
"p9813"
]
}
}
},
{
"properties": {
"nLeds": {
"not": {}
}
}
}
]
},
{
"anyOf": [
{
"properties": {
"device": {
"enum": [
"lock",
"switch"
]
}
}
},
{
"properties": {
"pulse": {
"not": {}
}
}
}
]
},
{
"anyOf": [
{
"properties": {
"device": {
"enum": [
"switch"
]
}
}
},
{
"properties": {
"autoOff": {
"not": {}
}
}
}
]
}
]
}
}
}
}
},
"timeout": {
"title": "Timeout",
"description": "Timeout in seconds. Default: 15.",
"type": "integer",
"minimum": 1,
"maximum": 60
}
}
}
}