Skip to content

Cameras Config

seydx edited this page Jan 24, 2022 · 10 revisions

Cameras

Example:

"cameras": [
  {
    "name": "Living Room Camera",
    "manufacturer": "IP",
    "model": "IP Camera",
    "serialNumber": "000000",
    "excludeSwitch": false,
    "privacySwitch": true,
    "motion": true,
    "doorbell": true,
    "switches": false,
    "useInterfaceTimer": true,
    "motionTimeout": 15,
    "motionDoorbell": false,
    "unbridge": true,
    "hsv": true,
    "prebuffering": true,
    "forcePrebuffering": false,
    "prebufferLength": 8,
    "videoConfig": {
      "source": "-i rtsp://192.168.123.1/stream",
      "subSource": "-i rtsp://192.168.123.1/lowres/stream",
      "stillImageSource": "-i rtsp://192.168.123.1/image.jpg",
      "rtspTransport": "tcp",
      "maxStreams": 4,
      "maxWidth": 1280,
      "maxHeight": 720,
      "maxFPS": 20,
      "maxBitrate": 199,
      "forceMax": true,
      "vcodec": "copy",
      "acodec": "libfdk_aac",
      "audio": true,
      "debug": true
    }
  }
]

Info

Attributes Required Usage Default Options
name X Set the camera name for display in the Home app.
manufacturer Set the manufacturer name for display in the Home app. Homebridge
serialNumber Set the serial number for display in the Home app. SerialNumber
firmwareRevision Set the firmware revision for display in the Home app. current plugin version
motion Exposes the motion sensor for this camera. This can be triggered with dummy switches, MQTT messages, or via HTTP, depending on what features are enabled in the config. true true/false
doorbell Exposes the doorbell device for this camera. This can be triggered with dummy switches, MQTT messages, or via HTTP, depending on what features are enabled in the config. false true/false
switches 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. false true/false
motionTimeout The number of seconds after triggering to reset the motion sensor. Set to 0 to disable resetting of motion trigger for MQTT or HTTP. 15 15 - 180
unbridge Bridged cameras can cause slowdowns of the entire Homebridge instance. If unbridged, the camera will need to be added to HomeKit manually. true true/false
excludeSwitch Exposes a 'exclude' switch to HomeKit to exclude/include the camera from the interface settings within HomeKit. false true/false
privacySwitch Exposes a 'privacyMode' switch to replace the camera feed with a privacy image in HomeKit. false true/false
useInterfaceTimer  If enabled, the recording timer from camera.ui will be used for "motionTimeout". false  true/false
hsv Enables HSV for the camera. This setting also affects the recording settings in the user interface. HSV requires a home hub and iCloud plan with at least 200GB of storage.  true  true/false
prebuffering Enables camera video prebuffering.   false  true/false
forcePrebuffering For cameras without a H264 stream. If set, camera.ui will start prebuffering with reencoding the stream. Caution: This will lead to a higher CPU load!   false  true/false
prebufferLength EThe length of the requested prebuffered video (s)   4  4 - 8

Info (videoConfig)

Attributes Required Usage Default Options
source x 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.
subSource Low Resolution Substream. FFmpeg options on where to find and how to decode your camera's video substream. The most basic form is '-i' followed by your camera's URL. The substream will be used to probe the stream or for motion detection through video analysis.
stillImageSource 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 (EXPERIMENTAL - WIP) 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. false true/false
maxStreams The maximum number of streams that will be allowed at once to this camera. 2
maxWidth 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. (only if vcodec != "copy")
maxHeight 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. (only if vcodec != "copy")
maxFPS 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 frame rate HomeKit requests. (only if vcodec != "copy")
maxBitrate The maximum bitrate used for video streamed to HomeKit, in kbit/s. If not set, will use any bitrate HomeKit requests. (only if vcodec != "copy")
forceMax If set, the settings requested by HomeKit will be overridden with any 'maximum' values defined in this config. (only if vcodec != "copy") false true/false
vcodec 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. libx264
audio Enables audio streaming from camera. false true/false
packetSize If audio or video is choppy try a smaller value, should be set to a multiple of 188. 1316
mapvideo Selects the stream used for video. FFmpeg automatically selects a video stream
mapaudio Selects the stream used for audio. FFmpeg automatically selects an audio stream
videoFilter 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 Options to be passed to the video encoder. -preset ultrafast -tune zerolatency
debug Includes debugging output from the main FFmpeg process in the Homebridge log. false true/false
debugReturn Includes debugging output from the FFmpeg used for return audio in the Homebridge log. false true/false