################################################################################################
########################################### Detector ###########################################
################################################################################################
detectors:
  ov:
    type: openvino
    device: AUTO
    model:
      path: /openvino-model/ssdlite_mobilenet_v2.xml

model:
  # Required: Object detection model input width (default: shown below)
  width: 1920
  # Required: Object detection model input height (default: shown below)
  height: 1080
  input_tensor: nhwc
  input_pixel_format: bgr
  labelmap_path: /openvino-model/coco_91cl_bkgr.txt

# Optional: set environment variables
#environment_vars:
#  EXAMPLE_VAR: value

# Optional: birdseye configuration
# NOTE: Can (enabled, mode) be overridden at the camera level
birdseye:
  # Optional: Enable birdseye view (default: shown below)
  enabled: true
  # Optional: Restream birdseye via RTSP (default: shown below)
  # NOTE: Enabling this will set birdseye to run 24/7 which may increase CPU usage somewhat.
  restream: false
  # Optional: Width of the output resolution (default: shown below)
  width: 1920
  # Optional: Height of the output resolution (default: shown below)
  height: 1080
  # Optional: Encoding quality of the mpeg1 feed (default: shown below)
  # 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources.
  quality: 6
  # Optional: Mode of the view. Available options are: objects, motion, and continuous
  #   objects - cameras are included if they have had a tracked object within the last 30 seconds
  #   motion - cameras are included if motion was detected in the last 30 seconds
  #   continuous - all cameras are included always
  mode: continuous
  # Optional: Threshold for camera activity to stop showing camera (default: shown below)
  inactivity_threshold: 15
  # Optional: Configure the birdseye layout
  layout:
    # Optional: Scaling factor for the layout calculator (default: shown below)
    scaling_factor: 2.0
    # Optional: Maximum number of cameras to show at one time, showing the most recent (default: show all cameras)
    max_cameras: 2

# Optional: jsmpeg stream configuration for WebUI
#live:
  # Optional: Set the name of the stream that should be used for live view
  # in frigate WebUI. (default: name of camera)
#  stream_name: camera_name
  # Optional: Set the height of the jsmpeg stream. (default: 720)
  # This must be less than or equal to the height of the detect stream. Lower resolutions
  # reduce bandwidth required for viewing the jsmpeg stream. Width is computed to match known aspect ratio.
#  height: 1296
  # Optional: Set the encode quality of the jsmpeg stream (default: shown below)
  # 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources.
#  quality: 8

# Optional: in-feed timestamp style configuration
# NOTE: Can be overridden at the camera level
timestamp_style:
  # Optional: Position of the timestamp (default: shown below)
  #           "tl" (top left), "tr" (top right), "bl" (bottom left), "br" (bottom right)
  position: "tr"
  # Optional: Format specifier conform to the Python package "datetime" (default: shown below)
  #           Additional Examples:
  #             german: "%d.%m.%Y %H:%M:%S"
  format: "%d.%m.%Y %H:%M:%S"
  # Optional: Color of font
  color:
    # All Required when color is specified (default: shown below)
    red: 255
    green: 255
    blue: 255
  # Optional: Line thickness of font (default: shown below)
  thickness: 2
  # Optional: Effect of lettering (default: shown below)
  #           None (No effect),
  #           "solid" (solid background in inverse color of font)
  #           "shadow" (shadow for font)
  effect: shadow

# Optional
ui:
  # Optional: Set the default live mode for cameras in the UI (default: shown below)
  live_mode: jsmpeg
  # Optional: Set a timezone to use in the UI (default: use browser local time)
  # timezone: America/Denver
  # Optional: Use an experimental recordings / camera view UI (default: shown below)
  use_experimental: false
  # Optional: Set the time format used.
  # Options are browser, 12hour, or 24hour (default: shown below)
  time_format: browser
  # Optional: Set the date style for a specified length.
  # Options are: full, long, medium, short
  # Examples:
  #    short: 2/11/23
  #    medium: Feb 11, 2023
  #    full: Saturday, February 11, 2023
  # (default: shown below).
  date_style: short
  # Optional: Set the time style for a specified length.
  # Options are: full, long, medium, short
  # Examples:
  #    short: 8:14 PM
  #    medium: 8:15:22 PM
  #    full: 8:15:22 PM Mountain Standard Time
  # (default: shown below).
  time_style: medium
  # Optional: Ability to manually override the date / time styling to use strftime format
  # https://www.gnu.org/software/libc/manual/html_node/Formatting-Calendar-Time.html
  # possible values are shown above (default: not set)
  strftime_fmt: "%d/%m/%Y %H:%M"

################################################################################################
########################################### Database ###########################################
################################################################################################
# OPTIONAL
database:
  # The path to store the SQLite DB (default: shown below)
  path: /config/frigate.db

################################################################################################
############################################# MQTT #############################################
################################################################################################
mqtt:
  # Optional: Enable mqtt server (default: shown below)
  enabled: true
  # Required: host name
  host: 192.168.1.210
  # Optional: port (default: shown below)
  port: 1890
  # Optional: topic prefix (default: shown below)
  # NOTE: must be unique if you are running multiple instances
#  topic_prefix: frigate
  # Optional: client id (default: shown below)
  # NOTE: must be unique if you are running multiple instances
#  client_id: frigate
  # Optional: user
  # NOTE: MQTT user can be specified with an environment variable or docker secrets that must begin with 'FRIGATE_'.
  #       e.g. user: '{FRIGATE_MQTT_USER}'
#  user: mqtt_user
  # Optional: password
  # NOTE: MQTT password can be specified with an environment variable or docker secrets that must begin with 'FRIGATE_'.
  #       e.g. password: '{FRIGATE_MQTT_PASSWORD}'
#  password: password
 
################################################################################################
############################################ KAMERAS ###########################################
################################################################################################
cameras:
  ########################################################
  #    Eingang - TP-Link Tapo C210 PTZ - 2304x1296px     #
  ########################################################
  Eingang:
    ffmpeg:
      inputs:
      # High Resolution Stream (Recording/Streaming stream)
      - path: rtsp://iobroker:ixijannik@192.168.1.48:554/stream1
        roles:
        - record
        - detect

      # Low Resolution Stream (Detection stream)
      #- path: rtsp://iobroker:ixijannik@192.168.1.48:554/stream2
      #  roles:
      #  - record
      #  - detect

    detect:
      enabled: false
      width: 2304
      height: 1296
      fps: 5

    birdseye:
      order: 1

    objects:
      track:
      - person
      - car
      - bicycle
      - motorcycle
  
  ########################################################
  #      Sued-Ost - TP-Link Tapo C110 - 2304x1296px      #
  ########################################################
  Sued-Ost:
    ffmpeg:
      inputs:
      # High Resolution Stream
      - path: rtsp://iobroker:ixijannik@192.168.1.85:554/stream1
        roles:
        - record
        - detect

      # Low Resolution Stream (Detection stream)
      #- path: rtsp://iobroker:ixijannik@192.168.1.48:554/stream2
      #  roles:
      #  - record
      #  - detect

    detect:
      enabled: false
      width: 2304
      height: 1296
      fps: 5

    birdseye:
        order: 2

    objects:
      track:
      - person
      - car
      - bicycle
      - motorcycle

    motion:
      mask:
        - 959,927,1047,913,1111,899,1151,886,1184,873,1211,859,1220,826,1191,806,1160,775,1157,729,1123,690,1087,666,1086,571,1084,0,591,0,0,0,0,496,29,516,31,458,161,464,163,498,34,502,0,506,0,689,93,732,217,766,213,681,344,659,341,690,405,692,412,742,362,778,369,825,602,886,748,917,847,930
        - 0,1296,649,1296,382,1161,322,1120,320,1070,195,994,127,949,74,907,54,805,43,688,0,643
        - 2304,0,2304,785,2304,341,2304,1296,2174,1296,1953,1296,1631,1039,1711,1027,1776,996,1812,973,1847,954,1916,972,1949,946,1982,929,1992,904,1990,886,1832,857,1666,827,1541,749,1541,709,1502,706,1457,703,1415,702,1360,698,1264,678,1183,658,1071,646,1067,0

    zones:
      Hof_Einfahrt:
        coordinates: 
          1882,1296,1278,1296,1451,1071,1498,1031,1589,1016,1721,1016,1675,1057,1606,1060,1783,1205
      Gehweg_Pusteblume:
        coordinates: 
          409,743,358,776,360,809,526,850,705,885,787,899,869,894,977,876,980,843,1003,793,1158,792,1164,766,1168,743,1217,780,1283,830,1294,859,1271,896,1203,927,1137,946,1059,960,967,972,865,973,749,966,561,927,418,889,315,860,137,797,51,756,49,698,224,718,340,683,414,686
      Gehweg_KiGa:
        coordinates: 78,942,271,1083,499,1225,505,1166,452,1070,360,1003,228,946,131,896,63,859
      Straße_Gesamt:
        coordinates: 
          127,790,312,859,683,949,869,970,1036,962,1170,944,1273,889,1301,847,1158,736,1161,668,1261,709,1532,725,1538,752,1461,763,1427,790,1498,827,1628,867,1896,943,1812,973,1702,1001,1594,1010,1514,1024,1275,1296,668,1296,508,1215,506,1143,414,1027,173,909,61,833,51,746
      Straße_AmOberenTor:
        coordinates: 
          127,790,240,839,418,893,612,943,722,966,877,982,1027,966,1170,944,1281,894,1300,860,1341,886,1400,912,1478,946,1574,977,1695,1014,1586,1020,1511,1033,1439,1083,1370,1176,1275,1296,668,1296,508,1215,506,1143,414,1027,203,927,71,856,51,746
      Straße_Haupt:
        coordinates: 
          1745,914,1916,963,1843,973,1756,986,1722,1009,1538,944,1417,896,1291,840,1163,740,1156,668,1281,725,1435,796,1505,832
      Straße_AmDamm:
        coordinates: 1538,729,1538,749,1422,778,1253,705
