Skip to content
seydx edited this page Jan 24, 2022 · 18 revisions

I recommend everyone to install the homebridge interface (homebridge-config-ui-x) and then configure this plugin over it.

In the next parts we will go into the individual blocks

Example config with two cameras

{
  "platform": "CameraUI",
  "name": "CameraUI",
  "port": 8081,
  "debug": true,
  "atHomeSwitch": false,
  "mqtt": {
    "active": false,
    "tls": false,
    "host": "192.168.111.121",
    "port": 1883
  },
  "http": {
    "active": false,
    "port": 7777,
    "localhttp": false
  },
  "smtp": {
    "active": false,
    "port": 2525,
    "space_replace": "+"
  },
  "ftp": {
    "active": false,
    "useFile": false,
    "port": 5050
  },
  "ssl": {
    "active": false,
    "key": "/path/to/key/server.key",
    "cert": "/path/to/cert/server.crt"
  },
  "options": {
    "videoProcessor": "ffmpeg"
  },
  "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/stream",
        "readRate": false,
        "rtspTransport": "udp",
        "maxStreams": 4,
        "maxWidth": 1280,
        "maxHeight": 720,
        "maxFPS": 20,
        "maxBitrate": 199,
        "forceMax": true,
        "vcodec": "copy",
        "acodec": "libfdk_aac",
        "stimeout": 10,
        "encoderOptions": "-preset ultrafast -tune zerolatency",
        "audio": true,
        "debug": true
      },
      "mqtt": {
        "motionTopic": "livingroom/motion",
        "motionMessage": "ON",
        "motionResetTopic": "livingroom/motion",
        "motionResetMessage": "OFF"
      },
      "videoanalysis": {
        "active": true
      },
      "smtp": {
        "email": "Custom Camera Name",
        "from": "Hello",
        "body": "Test"
      }
    },
    {
      "name": "Office Camera",
      "manufacturer": "Yi",
      "model": "IP Camera",
      "serialNumber": "000000",
      "excludeSwitch": true,
      "privacySwitch": true,
      "motion": true,
      "doorbell": true,
      "switches": true,
      "motionTimeout": 15,
      "unbridge": true,
      "hsv": true,
      "prebuffering": true,
      "videoConfig": {
        "source": "-i rtsp://192.168.123.2/ch0_0.h264",
        "stillImageSource": "-i rtsp://192.168.123.2/ch0_0.h264",
        "readRate": false,
        "rtspTransport": "tcp",
        "maxStreams": 4,
        "maxWidth": 1920,
        "maxHeight": 1080,
        "maxFPS": 20,
        "maxBitrate": 100,
        "forceMax": true,
        "vcodec": "copy",
        "acodec": "copy",
        "stimeout": 10,
        "encoderOptions": "-preset ultrafast -tune zerolatency",
        "audio": true,
        "debug": true
      }
    },
    {
      "name": "Camera",
      "manufacturer": "unitoptek",
      "model": "IP Camera",
      "serialNumber": "000000",
      "excludeSwitch": true,
      "privacySwitch": true,
      "motion": true,
      "doorbell": true,
      "switches": true,
      "motionTimeout": 15,
      "unbridge": true,
      "hsv": true,
      "prebuffering": true,
      "videoConfig": {
        "source": "-i rtsp://test:[email protected]:554/11",
        "stillImageSource": "-i http://test:[email protected]/snap.jpg",
        "rtspTransport": "tcp",
        "maxStreams": 4,
        "maxWidth": 1920,
        "maxHeight": 1080,
        "maxFPS": 20,
        "maxBitrate": 299,
        "forceMax": true,
        "vcodec": "copy",
        "acodec": "libfdk_aac",
        "stimeout": 10,
        "encoderOptions": "-preset ultrafast -tune zerolatency",
        "audio": true,
        "debug": true
      }
    }
  ]
}