{
  "pluginAlias": "tapo-camera",
  "pluginType": "platform",
  "singular": true,
  "headerDisplay": "Homebridge plugin for TP-Link TAPO security cameras.",
  "footerDisplay": "If your video feed is not working, try to check if any of the parameters at the video config can be tuned. You can use https://homebridge-plugins.github.io/homebridge-camera-ffmpeg/configs to check if someone has already found the right values for your camera.",
  "form": null,
  "display": null,
  "schema": {
    "cameras": {
      "type": "array",
      "items": {
        "title": "Camera",
        "type": "object",
        "properties": {
          "name": {
            "title": "Name",
            "type": "string",
            "required": true,
            "description": "Set the camera name for display in the Home app",
            "placeholder": "My Camera"
          },
          "ipAddress": {
            "title": "IP Address",
            "type": "string",
            "required": true,
            "description": "Set the camera IP address",
            "placeholder": "192.168.0.XXX"
          },
          "username": {
            "title": "TAPO username",
            "type": "string",
            "description": "Most of the time you should leave this empty, defaulting to admin. If it doesn't work, try to use your streaming username (see below)"
          },
          "password": {
            "title": "TAPO password",
            "type": "string",
            "required": true,
            "description": "Password of your TAPO Cloud (the one you use to login the application, not the password for the RTSP configuration). If it doesn't work, try to use your streaming password (see below)"
          },
          "streamUser": {
            "title": "Stream User",
            "type": "string",
            "required": true,
            "description": "Username to access the RTSP video feed (You can find them in TAPO app > Settings > Advanced Settings > Camera Account) - Note: This must be only alphanumeric [A-Za-z0-9], no special characters allowed!",
            "placeholder": "user"
          },
          "streamPassword": {
            "title": "Stream Password",
            "type": "string",
            "required": true,
            "description": "Password to access the RTSP video feed (You can find them in TAPO app > Settings > Advanced Settings > Camera Account) - Note: This must be only alphanumeric [A-Za-z0-9], no special characters allowed!"
          },
          "pullInterval": {
            "title": "Pull Interval",
            "type": "integer",
            "description": "Numbers of milliseconds after we update accessories by polling the status of the camera",
            "placeholder": 60000
          },
          "debug": {
            "title": "Debug",
            "type": "boolean",
            "description": "Enables debugging of the underlying camera-ffmpeg plugin"
          },
          "disableStreaming": {
            "title": "Disable Streaming",
            "type": "boolean",
            "description": "Disables the video feed accessory"
          },
          "disableEyesToggleAccessory": {
            "title": "Disable Eyes toggle",
            "type": "boolean",
            "description": "Disables the eyes (privacy mode) switch accessory"
          },
          "disableAlarmToggleAccessory": {
            "title": "Disable Alarm toggle",
            "type": "boolean",
            "description": "Disables the Alarm switch accessory"
          },
          "disableNotificationsToggleAccessory": {
            "title": "Disable Notifications toggle",
            "type": "boolean",
            "description": "Disables the Notifications switch accessory"
          },
          "disableMotionDetectionToggleAccessory": {
            "title": "Disable Motion Detection toggle",
            "type": "boolean",
            "description": "Disables the Motion Detection switch accessory"
          },
          "disableLEDToggleAccessory": {
            "title": "Disable LED toggle",
            "type": "boolean",
            "description": "Disables the LED switch accessory"
          },
          "disableMotionSensorAccessory": {
            "title": "Disable Motion sensor",
            "type": "boolean",
            "description": "Disables the Motion sensor accessory"
          },
          "lowQuality": {
            "title": "Low Quality",
            "type": "boolean",
            "description": "Video stream will be requested in low-quality instead of high-quality"
          },
          "eyesToggleAccessoryName": {
            "title": "Eyes (privacy mode) toggle Name",
            "type": "string",
            "description": "Name of the Eyes toggle",
            "placeholder": "Eyes"
          },
          "alarmToggleAccessoryName": {
            "title": "Alarm toggle Name",
            "type": "string",
            "description": "Name of the Alarm toggle",
            "placeholder": "Alarm"
          },
          "notificationsToggleAccessoryName": {
            "title": "Notifications toggle Name",
            "type": "string",
            "description": "Name of the Notifications toggle",
            "placeholder": "Notifications"
          },
          "motionDetectionToggleAccessoryName": {
            "title": "Motion Detection toggle Name",
            "type": "string",
            "description": "Name of the Motion Detection toggle",
            "placeholder": "Motion Detection"
          },
          "ledToggleAccessoryName": {
            "title": "LED toggle Name",
            "type": "string",
            "description": "Name of the LED toggle",
            "placeholder": "LED"
          },
          "videoMaxWidth": {
            "title": "Video Max Width",
            "type": "integer",
            "placeholder": 1280,
            "multipleOf": 2,
            "minimum": 0,
            "description": "The maximum width used for video streamed to HomeKit. If set to 0, or videoCodec is set to 'copy' (default), the resolution of the source is used. If not set, will use any size HomeKit requests."
          },
          "videoMaxHeight": {
            "title": "Video Max Height",
            "type": "integer",
            "placeholder": 720,
            "multipleOf": 2,
            "minimum": 0,
            "description": "The maximum height used for video streamed to HomeKit. If set to 0, or videoCodec is set to 'copy' (default), the resolution of the source is used. If not set, will use any size HomeKit requests."
          },
          "videoMaxFPS": {
            "title": "Video Max FPS",
            "type": "integer",
            "placeholder": 30,
            "minimum": 0,
            "description": "The maximum frame rate used for video streamed to HomeKit. If set to 0, or videoCodec is set to 'copy' (default), the framerate of the source is used. If not set, will use any framerate HomeKit requests."
          },
          "videoMaxBitrate": {
            "title": "Video Max Bitrate",
            "type": "integer",
            "placeholder": 299,
            "minimum": 0,
            "description": "The maximum bitrate used for video streamed to HomeKit, in kbit/s. If not set, or videoCodec is set to 'copy' (default), it will use any bitrate HomeKit requests."
          },
          "videoPacketSize": {
            "title": "Video Packet Size",
            "type": "integer",
            "placeholder": 1316,
            "multipleOf": 188,
            "minimum": 188,
            "description": "If audio or video is choppy try a smaller value. If not set, or videoCodec is set to 'copy' (default), it will use any packet size HomeKit requests."
          },
          "videoForceMax": {
            "title": "Force Max Video",
            "type": "boolean",
            "description": "If set, the settings requested by HomeKit will be overridden with any 'maximum' values defined in this config. If videoCodec is set to 'copy' (default), this setting set to true is useless."
          },
          "videoCodec": {
            "title": "Video Codec",
            "type": "string",
            "placeholder": "copy",
            "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. By default, we set 'copy' to avoid any video processing happening on the Homebridge server and disregarding any max values set above, but this also means possibly sending more video data to your devices than necessary, and some Homekit clients may not like not receiving the resolutions/fps they asked for. If you select a custom codec and your ffmpeg process is crashing, it most likely can't handle the video codec you've chosen."
          }
        }
      }
    }
  }
}
