forked from homebridge-plugins/homebridge-camera-ffmpeg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.schema.json
443 lines (443 loc) · 17.2 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
{
"pluginAlias": "Camera-ffmpeg",
"pluginType": "platform",
"singular": true,
"headerDisplay": "Homebridge Plugin Providing FFmpeg-based Camera Support.",
"footerDisplay": "You can see configurations that have been shared by other users on [the project site](https://sunoo.github.io/homebridge-camera-ffmpeg/configs/).",
"schema": {
"name": {
"title": "Name",
"type": "string",
"placeholder": "Camera Name",
"default": "Camera FFmpeg"
},
"videoProcessor": {
"title": "Video Processor",
"type": "string",
"placeholder": "ffmpeg",
"description": "Defines which video processor is used to decode and encode videos, must take the same parameters as FFmpeg. Common uses would be 'avconv' or the path to a custom-compiled version of FFmpeg. If not set, will use the included version of FFmpeg, or the version of FFmpeg installed on the system if no included version is available."
},
"mqtt": {
"title": "MQTT Server",
"type": "string",
"placeholder": "127.0.0.1",
"description": "Defines the hostname or IP of the MQTT broker to connect to for MQTT-based automation. If not set, MQTT support is not started."
},
"portmqtt": {
"title": "MQTT Port",
"type": "integer",
"placeholder": 1883,
"description": "The port of the MQTT broker."
},
"tlsmqtt": {
"title": "MQTT TLS",
"type": "boolean",
"description": "Use TLS to connect to the MQTT broker."
},
"usermqtt": {
"title": "MQTT Username",
"type": "string",
"description": "The username used to connect to your MQTT broker. If not set, no authentication is used."
},
"passmqtt": {
"title": "MQTT Password",
"type": "string",
"description": "The password used to connect to your MQTT broker. If not set, no authentication is used."
},
"porthttp": {
"title": "HTTP Port",
"type": "integer",
"placeholder": 8080,
"description": "The port to listen on for HTTP-based automation. If not set, HTTP support is not started."
},
"localhttp": {
"title": "HTTP Localhost Only",
"type": "boolean",
"description": "Only allow HTTP calls from localhost. Useful if using helper plugins that translate to HTTP."
},
"cameras": {
"type": "array",
"items": {
"title": "Cameras",
"type": "object",
"properties": {
"name": {
"title": "Name",
"type": "string",
"required": true,
"description": "Set the camera name for display in the Home app."
},
"manufacturer": {
"name": "Manufacturer",
"type": "string",
"placeholder": "Homebridge",
"description": "Set the manufacturer name for display in the Home app."
},
"model": {
"name": "Model",
"type": "string",
"placeholder": "Camera FFmpeg",
"description": "Set the model for display in the Home app."
},
"serialNumber": {
"name": "Serial Number",
"type": "string",
"placeholder": "SerialNumber",
"description": "Set the serial number for display in the Home app."
},
"firmwareRevision": {
"name": "Firmware Revision",
"type": "string",
"description": "Set the firmware revision for display in the Home app."
},
"motion": {
"title": "Enable Motion Sensor",
"type": "boolean",
"description": "Exposes the motion sensor for this camera. This can be triggered with the dummy switches, MQTT messages, or via HTTP, depending on what features are enabled in the config."
},
"doorbell": {
"title": "Enable Doorbell",
"type": "boolean",
"description": "Exposes the doorbell device for this camera. This can be triggered with the dummy switches, MQTT messages, or via HTTP, depending on what features are enabled in the config."
},
"switches": {
"title": "Enable Dummy Switches",
"type": "boolean",
"description": "Enables dummy switches to trigger motion and/or doorbell, if either of those are enabled. When enabled there will be an additional switch that triggers the motion or doorbell event."
},
"motionTimeout": {
"title": "Automatic Motion Reset (Seconds)",
"type": "integer",
"placeholder": 1,
"minimum": 0,
"description": "The number of seconds after triggering to reset the motion sensor. Set to 0 to disable resetting of motion trigger for MQTT or HTTP."
},
"motionDoorbell": {
"title": "Trigger Doorbell with Motion",
"type": "boolean",
"description": "Rings the doorbell when motion is activated. This allows for motion alerts to appear on Apple TVs."
},
"unbridge": {
"title": "Unbridge Camera (Recommended)",
"type": "boolean",
"description": "Bridged cameras can cause slowdowns of the entire Homebridge instance. If unbridged, the camera will need to be added to HomeKit manually."
},
"videoConfig": {
"title": "Video Configuration",
"type": "object",
"properties": {
"source": {
"title": "Video Source",
"type": "string",
"placeholder": "-i rtsp://username:password@example.com:554",
"required": true,
"description": "FFmpeg options on where to find and how to decode your camera's video stream. The most basic form is '-i' followed by your camera's URL."
},
"stillImageSource": {
"title": "Still Image Source",
"type": "string",
"description": "If your camera also provides a URL for a still image, that can be defined here with the same syntax as 'source'. If not set, the plugin will grab one frame from 'source'."
},
"returnAudioTarget": {
"title": "Two-way Audio Target (EXPERIMENTAL - WIP)",
"type": "string",
"description": "The FFmpeg output command for directing audio back to a two-way capable camera. This feature is still in development and a configuration that works today may not work in the future."
},
"maxStreams": {
"title": "Maximum Concurrent Streams",
"type": "integer",
"placeholder": 2,
"minimum": 1,
"description": "The maximum number of streams that will be allowed at once to this camera."
},
"maxWidth": {
"title": "Maximum Width",
"type": "integer",
"placeholder": 1280,
"multipleOf": 2,
"minimum": 0,
"description": "The maximum width used for video streamed to HomeKit. If set to 0, the resolution of the source is used. If not set, will use any size HomeKit requests."
},
"maxHeight": {
"title": "Maximum Height",
"type": "integer",
"placeholder": 720,
"multipleOf": 2,
"minimum": 0,
"description": "The maximum height used for video streamed to HomeKit. If set to 0, the resolution of the source is used. If not set, will use any size HomeKit requests."
},
"maxFPS": {
"title": "Maximum Framerate",
"type": "integer",
"placeholder": 30,
"minimum": 0,
"description": "The maximum frame rate used for video streamed to HomeKit. If set to 0, the framerate of the source is used. If not set, will use any framerate HomeKit requests."
},
"maxBitrate": {
"title": "Maximum Bitrate",
"type": "integer",
"placeholder": 299,
"minimum": 0,
"description": "The maximum bitrate used for video streamed to HomeKit, in kbit/s. If not set, will use any bitrate HomeKit requests."
},
"forceMax": {
"title": "Force Maximums",
"type": "boolean",
"description": "If set, the settings requested by HomeKit will be overridden with any 'maximum' values defined in this config."
},
"preserveRatio": {
"title": "Preserve Aspect Ratio",
"type": "boolean",
"description": "Preserves the aspect ratio of the source video."
},
"vcodec": {
"title": "Video Codec",
"type": "string",
"placeholder": "libx264",
"typeahead": {
"source": [
"libx264",
"h264_omx",
"h264_videotoolbox",
"copy"
]
},
"description": "Set the codec used for encoding video sent to HomeKit, must be H.264-based. You can change to a hardware accelerated video codec with this option, if one is available."
},
"packetSize": {
"title": "Packet Size",
"type": "number",
"placeholder": 1316,
"multipleOf": 188,
"minimum": 188,
"description": "If audio or video is choppy try a smaller value."
},
"videoFilter": {
"title": "Additional Video Filters",
"type": "string",
"description": "Comma-delimited list of additional video filters for FFmpeg to run on the video. If 'none' is included, the default video filters are disabled."
},
"encoderOptions": {
"title": "Encoder Options",
"type": "string",
"placeholder": "-preset ultrafast -tune zerolatency",
"description": "Options to be passed to the video encoder."
},
"mapvideo": {
"type": "string",
"title": "Video Stream",
"description": "Selects the stream used for video."
},
"mapaudio": {
"type": "string",
"title": "Audio Stream",
"description": "Selects the stream used for audio."
},
"audio": {
"title": "Enable Audio",
"type": "boolean",
"description": "Enables audio streaming from camera."
},
"debug": {
"title": "FFmpeg Debug Logging",
"type": "boolean",
"description": "Includes debugging output from the main FFmpeg process in the Homebridge log."
},
"debugReturn": {
"title": "Two-way FFmpeg Debug Logging",
"type": "boolean",
"description": "Includes debugging output from the FFmpeg process used for two-way audio in the Homebridge log."
}
}
},
"mqtt": {
"title": "MQTT Configuration",
"type": "object",
"properties": {
"motionTopic": {
"title": "Motion Topic",
"type": "string",
"placeholder": "homebridge/motion",
"description": "The MQTT topic to watch for motion alerts."
},
"motionMessage": {
"title": "Motion Message",
"type": "string",
"description": "The message to watch for to trigger motion alerts. Will use the name of the camera if blank."
},
"motionResetTopic": {
"title": "Motion Reset Topic",
"type": "string",
"placeholder": "homebridge/motion/reset",
"description": "The MQTT topic to watch for motion resets."
},
"motionResetMessage": {
"title": "Motion Reset Message",
"type": "string",
"description": "The message to watch for to trigger motion resets. Will use the name of the camera if blank."
},
"doorbellTopic": {
"title": "Doorbell Topic",
"type": "string",
"placeholder": "homebridge/doorbell",
"description": "The MQTT topic to watch for doorbell alerts."
},
"doorbellMessage": {
"title": "Doorbell Message",
"type": "string",
"description": "The message to watch for to trigger doorbell alerts. Will use the name of the camera if blank."
}
}
}
}
}
}
},
"layout": [
{
"type": "section",
"title": "Cameras",
"expandable": true,
"expanded": true,
"items": [
{
"key": "cameras",
"type": "array",
"orderable": false,
"buttonText": "Add Camera",
"items": [
"cameras[].name",
"cameras[].videoConfig.source",
"cameras[].videoConfig.stillImageSource",
"cameras[].videoConfig.audio",
"cameras[].unbridge",
{
"key": "cameras[]",
"type": "section",
"title": "Branding",
"expandable": true,
"expanded": false,
"items": [
"cameras[].manufacturer",
"cameras[].model",
"cameras[].serialNumber",
"cameras[].firmwareRevision"
]
},
{
"key": "cameras[]",
"type": "section",
"title": "Video Output",
"expandable": true,
"expanded": false,
"items": [
"cameras[].videoConfig.maxStreams",
"cameras[].videoConfig.maxWidth",
"cameras[].videoConfig.maxHeight",
"cameras[].videoConfig.maxFPS",
"cameras[].videoConfig.maxBitrate",
"cameras[].videoConfig.forceMax"
]
},
{
"key": "cameras[]",
"type": "section",
"title": "Advanced",
"expandable": true,
"expanded": false,
"items": [
{
"key": "cameras[]",
"type": "section",
"title": "EXPERIMENTAL - WIP",
"expandable": true,
"expanded": false,
"items": [
"cameras[].videoConfig.returnAudioTarget",
"cameras[].videoConfig.debugReturn"
]
},
"cameras[].videoConfig.vcodec",
"cameras[].videoConfig.packetSize",
"cameras[].videoConfig.mapvideo",
"cameras[].videoConfig.mapaudio",
"cameras[].videoConfig.videoFilter",
"cameras[].videoConfig.encoderOptions",
"cameras[].videoConfig.debug"
]
},
{
"key": "cameras[]",
"type": "section",
"title": "Automation",
"expandable": true,
"expanded": false,
"items": [
"cameras[].motion",
"cameras[].doorbell",
"cameras[].switches",
"cameras[].motionTimeout",
"cameras[].motionDoorbell",
{
"key": "cameras[]",
"type": "section",
"title": "MQTT Settings",
"expandable": true,
"expanded": false,
"items": [
"cameras[].mqtt.motionTopic",
"cameras[].mqtt.motionMessage",
"cameras[].mqtt.motionResetTopic",
"cameras[].mqtt.motionResetMessage",
"cameras[].mqtt.doorbellTopic",
"cameras[].mqtt.doorbellMessage"
]
}
]
}
]
}
]
},
{
"type": "section",
"title": "Global Automation",
"expandable": true,
"expanded": false,
"items": [
{
"type": "section",
"title": "HTTP Server",
"expandable": true,
"expanded": true,
"items": [
"porthttp",
"localhttp"
]
},
{
"type": "section",
"title": "MQTT Client",
"expandable": true,
"expanded": true,
"items": [
"mqtt",
"portmqtt",
"tlsmqtt",
"usermqtt",
"passmqtt"
]
}
]
},
{
"type": "section",
"title": "Global Advanced",
"expandable": true,
"expanded": false,
"items": [
"videoProcessor"
]
}
]
}