Bonjour,
J’édite mon sujet ci-présent, car la situation à évoluée.
J’ai réussi à avoir un flux stable de ma caméra Reolink RLC-510A.
J’ai masqué l’ancien message, que je vais mettre dans le message suivant.
Donc, j’ai enfin un flux constant, et qui semble stable.
Voilà mon fichier de configuration :
mqtt:
enabled: false
# Optional: Authentication configuration
auth:
# Optional: Enable authentication
enabled: true
# Optional: Reset the admin user password on startup (default: shown below)
# New password is printed in the logs
reset_admin_password: false
# Optional: Cookie to store the JWT token for native auth (default: shown below)
#cookie_name: "frigate_token"
# Optional: Set secure flag on cookie. (default: False)
# NOTE: This should be set to True if you are using TLS
cookie_secure: true
# Optional: Session length in seconds (default: shown below)
session_length: 86400 # 24 hours
# Optional: Refresh time in seconds (default: shown below)
# When the session is going to expire in less time than this setting,
# it will be refreshed back to the session_length.
refresh_time: 43200 # 12 hours
# Optional: Rate limiting for login failures to help prevent brute force
# login attacks (default: None)
# See the docs for more information on valid values
failed_login_rate_limit: 1/second;5/minute;20/hour
# Optional: Trusted proxies for determining IP address to rate limit
# NOTE: This is only used for rate limiting login attempts and does not bypass
# authentication. See the authentication docs for more details.
trusted_proxies:
- 172.18.0.0/16 # <---- this is the subnet for the internal docker compose network
- 192.168.2.141/32 # <---- SWAG Reverse Proxy
# Optional: Number of hashing iterations for user passwords
# As of Feb 2023, OWASP recommends 600000 iterations for PBKDF2-SHA256
# NOTE: changing this value will not automatically update password hashes, you
# will need to change each user password for it to apply
hash_iterations: 600000
ffmpeg:
global_args: -hide_banner -loglevel warning
hwaccel_args: preset-vaapi
output_args:
record: preset-record-generic-audio-copy
detectors:
coral:
type: edgetpu
device: usb
review:
alerts:
labels:
- car
- cat
- dog
- person
- speech
detections:
labels:
- car
- person
- cat
motion:
# Optional: The threshold passed to cv2.threshold to determine if a pixel is different enough to be counted as motion. (default: shown below)
# Increasing this value will make motion detection less sensitive and decreasing it will make motion detection more sensitive.
# The value should be between 1 and 255.
threshold: 30
# Optional: Minimum size in pixels in the resized motion image that counts as motion (default: shown below)
# Increasing this value will prevent smaller areas of motion from being detected. Decreasing will
# make motion detection more sensitive to smaller moving objects.
# As a rule of thumb:
# - 10 - high sensitivity
# - 30 - medium sensitivity
# - 50 - low sensitivity
contour_area: 10
# Optional: The percentage of the image used to detect lightning or other substantial changes where motion detection
# needs to recalibrate. (default: shown below)
# Increasing this value will make motion detection more likely to consider lightning or ir mode changes as valid motion.
# Decreasing this value will make motion detection more likely to ignore large amounts of motion such as a person approaching
# a doorbell camera.
lightning_threshold: 0.8
# Optional: Detect configuration
# NOTE: Can be overridden at the camera level
detect:
# Optional: width of the frame for the input with the detect role (default: use native stream resolution)
# width: 1280
# Optional: height of the frame for the input with the detect role (default: use native stream resolution)
# height: 720
# 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)
enabled: true
# Optional: Object configuration
# NOTE: Can be overridden at the camera level
objects:
# Optional: list of objects to track from labelmap.txt (default: shown below)
track:
- person
- cat
# Optional: filters to reduce false positives for specific object types
filters:
person:
# Optional: minimum width*height of the bounding box for the detected object (default: 0)
min_area: 5000
# Optional: maximum width*height of the bounding box for the detected object (default: 24000000)
max_area: 100000
# Optional: minimum width/height of the bounding box for the detected object (default: 0)
min_ratio: 0.5
# Optional: maximum width/height of the bounding box for the detected object (default: 24000000)
max_ratio: 2.0
# Optional: minimum score for the object to initiate tracking (default: shown below)
min_score: 0.5
# Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
threshold: 0.7
go2rtc:
streams:
Camera_Salon_RLC-510A:
# - "ffmpeg:http://192.168.2.163/flv?port=1935&app=bcs&stream=channel0_main.bcs&user={FRIGATE_RTSP_USER}&password={FRIGATE_RTSP_PASSWORD}#video=copy#audio=copy#audio=opus"
# Autre méthode :
- rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.2.163:554/Preview_01_main
- ffmpeg:Camera_Salon_RLC-510A#audio=opus # <- copy of the stream which transcodes audio to the missing codec (usually will be opus)
# - rtmp://192.168.2.163:1935/bcs/channel0_main.bcs?channel=0&stream=0&user={FRIGATE_RTSP_USER}&password={FRIGATE_RTSP_PASSWORD}
Camera_Salon_RLC-510A_sub:
# - "ffmpeg:http://192.168.2.163/flv?port=1935&app=bcs&stream=channel0_main.bcs&user={FRIGATE_RTSP_USER}&password={FRIGATE_RTSP_PASSWORD}#video=copy#audio=copy#audio=opus"
# Autre méthode :
- rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.2.163:554/Preview_01_sub
- ffmpeg:Camera_Salon_RLC-510A#audio=opus # <- copy of the stream which transcodes audio to the missing codec (usually will be opus)
# - rtmp://192.168.2.163:1935/bcs/channel0_main.bcs?channel=0&stream=0&user={FRIGATE_RTSP_USER}&password={FRIGATE_RTSP_PASSWORD}
cameras:
Camera_Salon_RLC-510A:
enabled: true
ffmpeg:
hwaccel_args: preset-vaapi
inputs:
# - path: rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@192.168.2.163:554/
- path: rtsp://127.0.0.1:8554/Camera_Salon_RLC-510A # <--- the name here must match the name of the camera in restream
# - path: "rtmp://192.168.2.163:1935/bcs/channel0_main.bcs?channel=0&stream=0&user={FRIGATE_RTSP_USER}&password={FRIGATE_RTSP_PASSWORD} input_args: preset-rtsp-restream"
input_args: preset-rtsp-restream
roles:
- record
- audio # <- only necessary if audio detection is enabled
- detect
# - path: rtsp://127.0.0.1:8554/Camera_Salon_RLC-510A_sub # <--- the name here must match the name of the camera in restream
# # - path: "rtmp://192.168.2.163:1935/bcs/channel0_main.bcs?channel=0&stream=0&user={FRIGATE_RTSP_USER}&password={FRIGATE_RTSP_PASSWORD} input_args: preset-rtsp-restream"
# input_args: preset-rtsp-restream
# roles:
# - detect
detect:
enabled: true # <---- disable detection until you have a working camera feed
width: 2560 # 640 <---- update for your camera's resolution
height: 1920 # 480 <---- update for your camera's resolution
record: # <----- Enable recording
enabled: true
snapshots:
enabled: true
motion:
mask:
- 0.154,0.451,0.147,0.587,0.305,0.59,0.312,0.461
- 0.044,0.221,0,0,1,0,1,0.289,0.949,0.288,0.983,0.333,0.981,0.398,0.931,0.393,0.879,0.367,0.773,0.359,0.763,0.373,0.678,0.369,0.641,0.34
threshold: 30
contour_area: 10
improve_contrast: 'true'
zones:
Salon_Cuisine:
coordinates:
0,0.012,0,0.619,0,1,1,1,0.998,0.297,0.951,0.291,0.985,0.33,0.984,0.403,0.931,0.397,0.877,0.37,0.775,0.363,0.762,0.374,0.679,0.371,0.642,0.344,0.043,0.226
inertia: 3
loitering_time: 0
record:
enabled: true
retain:
days: 4 # <- number of days to keep continuous recordings -- mettre 0 pour purger
mode: all
events:
retain:
default: 15 # <- number of days to keep event recordings -- mettre 0 pour purger
mode: motion
pre_capture: 2
post_capture: 5
snapshots:
# Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
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: True
# 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: quality of the encoded jpeg, 0-100 (default: shown below)
quality: 100
# Optional
ui:
# Optional: Set a timezone to use in the UI (default: use browser local time)
# timezone: America/Denver
# Optional: Set the time format used.
# Options are browser, 12hour, or 24hour (default: browser)
time_format: 24hour
# 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: short).
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: medium).
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:%S'
# Optional: Telemetry configuration
telemetry:
# Optional: Enabled network interfaces for bandwidth stats monitoring (default: empty list, let nethogs search all)
network_interfaces: []
# Optional: Configure system stats
stats:
# Enable AMD GPU stats (default: shown below)
amd_gpu_stats: false
# Enable Intel GPU stats (default: shown below)
intel_gpu_stats: true
# Enable network bandwidth stats monitoring for camera ffmpeg processes, go2rtc, and object detectors. (default: shown below)
# NOTE: The container must either be privileged or have cap_net_admin, cap_net_raw capabilities enabled.
network_bandwidth: false
# Optional: Enable the latest version outbound check (default: shown below)
# NOTE: If you use the HomeAssistant integration, disabling this will prevent it from reporting new versions
version_check: true
version: 0.14
J’ai essayé de configurer diverses choses via le fichier de configuration.
J’ai des alertes, mais pas de détections…
Je crois qu’il me manque des explications sur certains concepts aussi.
Qu’est-ce qui me permettrais d’avoir des détections ?
À quoi sert l’onglet « Motion » ?
Pensez-vous pertinent d’avoir définie les masques/zones ainsi ?
Je ne veux pas de détection sur la TV, ni les ombres au plafond qui bougent avec la lumière…
J’ai créé une Zone Salon_Cuisine, mais je ne suis pas sûr que ce soit utile…
Aussi, que sont les « Object Masks » ?
Mon idée, est de repérer les mouvements de personnes et de mon chat quand je ne suis pas chez moi.
Cependant, je ne voudrais recevoir des alertes dans HA que pour des personnes (intrus) quand je ne suis pas chez moi.
Le chat fait sa vie, il bouge, mais je ne veux pas avoir de notifications sur lui, mais je veux quand même via frigate voir où il est allé (surtout quand on part plus d’une journée).
Et bien sûr, vient maintenant la question de comment je peux intégrer ça dans Home Assistant ?
Car mon installation de Frigate est faite dans un conteneur LXC avec Docker, pour permettre un partage des ressources avec d’autres conteneurs Docker dans le futur, comme l’iGPU, le Google Coral USB…).
J’ai pu voir certains utiliser Frigate directement dans HA, mais ce n’est pas mon cas.
Merci d’avance pour votre aide