Skip to content

Instantly share code, notes, and snippets.

@hersche
Last active May 9, 2025 22:17
Show Gist options
  • Select an option

  • Save hersche/e15a7530baa889defb5310215a377891 to your computer and use it in GitHub Desktop.

Select an option

Save hersche/e15a7530baa889defb5310215a377891 to your computer and use it in GitHub Desktop.
Frigate-config for Tapo C200 (Home assistant)
# Based on https://community.home-assistant.io/t/tapo-cameras-with-frigate/618520/4
# Added controls by Gemini 2.5 Pro (after making clear that frigate indeed can do so).
mqtt:
host: localhost
user: un
password: pw
go2rtc:
streams:
cam_name:
- rtsp://user:[email protected]:554/stream1
- "ffmpeg:dn_dr_1_cam#audio=aac"
cameras:
cam_name:
ffmpeg:
output_args:
record: preset-record-generic-audio-copy
inputs:
- path: rtsp://127.0.0.1:8554/cam_name
input_args: preset-rtsp-restream
roles:
- record
#- detect
live:
stream_name: cam_name
onvif: # <---- ADD THIS SECTION FOR PTZ CONTROL VIA FRIGATE
host: 192.168.1.102 # IP address of your Tapo C200
port: 2020 # Common ONVIF port for Tapo, try 80 or 8000 if this doesn't work
user: user # The ONVIF username you set in the Tapo app
password: pw # The ONVIF password you set in the Tapo app
#detectors:
# coral:
#type: edgetpu
#device: usb
# cpu1:
# type: cpu
# cpu2:
# type: cpu
#objects:
# Optional: list of objects to track from labelmap.txt (default: shown below)
#track:
#- person
#- dog
# -cat
# - car
# - tv
birdseye:
# Optional: Enable birdseye view (default: shown below)
enabled: False
mode: motion
record:
# Optional: Enable recording (default: shown below)
# WARNING: If recording is disabled in the config, turning it on via
# the UI or MQTT later will have no effect.
# WARNING: Frigate does not currently support limiting recordings based
# on available disk space automatically. If using recordings,
# you must specify retention settings for a number of days that
# will fit within the available disk space of your drive or Frigate
# will crash.
enabled: True
# Optional: Number of minutes to wait between cleanup runs (default: shown below)
# This can be used to reduce the frequency of deleting recording segments from disk if you want to minimize i/o
expire_interval: 120
# Optional: Retention settings for recording
retain:
# Optional: Number of days to retain recordings regardless of events (default: shown below)
# NOTE: This should be set to 0 and retention should be defined in events section below
# if you only want to retain recordings of events.
days: 0
# Optional: Mode for retention. Available options are: all, motion, and active_objects
# all - save all recording segments regardless of activity
# motion - save all recordings segments with any detected motion
# active_objects - save all recording segments with active/moving objects
# NOTE: this mode only applies when the days setting above is greater than 0
mode: all
detect:
# Optional: width of the frame for the input with the detect role (default: shown below)
# width: 1280
width: 640
# Optional: height of the frame for the input with the detect role (default: shown below)
# height: 7201
height: 360
# Optional: desired fps for your camera for the input with the detect role (default: shown below)
# NOTE: Recommended value of 5. Ideally, try and reduce your FPS on the camera.
fps: 15
# Optional: enables detection for the camera (default: True)
# This value can be set via MQTT and will be updated in startup based on retained value
enabled: True
# Optional: Number of frames without a detection before frigate considers an object to be gone. (default: 5x the frame rate)
max_disappeared: 25
# Optional: Configuration for stationary object tracking
stationary:
# Optional: Frequency for confirming stationary objects (default: shown below)
# When set to 0, object detection will not confirm stationary objects until movement is detected.
# If set to 10, object detection will run to confirm the object still exists on every 10th frame.
interval: 10
# Optional: Number of frames without a position change for an object to be considered stationary (default: 10x the frame rate or 10s)
threshold: 50
# Optional: Define a maximum number of frames for tracking a stationary object (default: not set, track forever)
# This can help with false positives for objects that should only be stationary for a limited amount of time.
# It can also be used to disable stationary object tracking. For example, you may want to set a value for person, but leave
# car at the default.
# WARNING: Setting these values overrides default behavior and disables stationary object tracking.
# There are very few situations where you would want it disabled. It is NOT recommended to
# copy these values from the example config into your config unless you know they are needed.
max_frames:
# Optional: Default for all object types (default: not set, track forever)
default: 3000
# Optional: Object specific values
objects:
person: 1000
snapshots:
# Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
# This value can be set via MQTT and will be updated in startup based on retained value
enabled: True
# Optional: save a clean PNG copy of the snapshot image (default: shown below)
clean_copy: True
# Optional: print a timestamp on the snapshots (default: shown below)
timestamp: False
# Optional: draw bounding box on the snapshots (default: shown below)
bounding_box: False
# Optional: crop the snapshot (default: shown below)
crop: False
# Optional: height to resize the snapshot to (default: original size)
# height: 175
# Optional: Restrict snapshots to objects that entered any of the listed zones (default: no required zones)
required_zones: []
# Optional: Camera override for retention settings (default: global values)
retain:
# Required: Default retention days (default: shown below)
default: 10
# Optional: Per object retention days
objects:
person: 15
# Optional: ffmpeg configuration
#ffmpeg:
# Optional: global ffmpeg args (default: shown below)
# global_args: -hide_banner -loglevel warning
# Optional: global hwaccel args (default: shown below)
# NOTE: See hardware acceleration docs for your specific device
# hwaccel_args: -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p
# Optional: global input args (default: shown below)
# input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1
# Optional: global output args
#output_args:
# Optional: output args for detect streams (default: shown below)
# detect: -f rawvideo -pix_fmt yuv420p
# Optional: output args for record streams (default: shown below)
#record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an
version: 0.15-1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment