diff --git a/Jenkinsfile b/Jenkinsfile index 859af97..f00af55 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,7 +14,7 @@ pipeline { frigate_config = readJSON file: 'frigate_config.json' } - ansiblePlaybook credentialsId: 'rivendell-ssh-key', disableHostKeyChecking: true, extras: "--extra-vars 'mqtt_password=\"${frigate_config.mqtt.password}\" ipgeolocation_api_key=\"${frigate_config.ipgeolocation.api_key}\" garage_rtsp_password=\"${frigate_config.rtsp.garage.password}\" front_door_rtsp_password=\"${frigate_config.rtsp.front_door.password}\" back_door_rtsp_password=\"${frigate_config.rtsp.back_door.password}\" family_room_rtsp_password=\"${frigate_config.rtsp.family_room.password}\"'", playbook: 'install.yaml' + ansiblePlaybook credentialsId: 'rivendell-ssh-key', disableHostKeyChecking: true, extras: "--extra-vars 'mqtt_password=\"${frigate_config.mqtt.password}\" ipgeolocation_api_key=\"${frigate_config.ipgeolocation.api_key}\" garage_rtsp_password=\"${frigate_config.rtsp.garage.password}\" front_door_rtsp_password=\"${frigate_config.rtsp.front_door.password}\" driveway_rtsp_password=\"${frigate_config.rtsp.driveway.password}\" back_door_rtsp_password=\"${frigate_config.rtsp.back_door.password}\" family_room_rtsp_password=\"${frigate_config.rtsp.family_room.password}\"'", playbook: 'install.yaml' ansiblePlaybook credentialsId: 'rivendell-ssh-key', disableHostKeyChecking: true, playbook: 'stop.yaml' ansiblePlaybook credentialsId: 'rivendell-ssh-key', disableHostKeyChecking: true, playbook: 'start.yaml' } diff --git a/conf/config.yaml b/conf/config.yaml index d731a2e..b1cbdfb 100644 --- a/conf/config.yaml +++ b/conf/config.yaml @@ -50,6 +50,20 @@ cameras: - 167,1080,511,1080,328,744,234,456,140,451,0,509,0,804 # Flower bed and hedge - 359,85,542,0,0,0,0,288 # Sidewalk - 1153,847,1112,838,1042,896,1023,988,1023,1080,1525,1080 # Drainpipe + driveway: + enabled: true + ffmpeg: + inputs: + - path: 'rtsp://{FRIGATE_DRIVEWAY_RTSP_USERNAME}:{FRIGATE_DRIVEWAY_RTSP_PASSWORD}@192.168.0.148:5543/live/channel0' + roles: + - detect + - record + output_args: + record: preset-record-generic-audio-aac # Record with aac audio + detect: + enabled: true + width: 2560 + height: 1440 back_door: enabled: true ffmpeg: @@ -99,7 +113,7 @@ record: enabled: true expire_interval: 60 retain: - days: 10 # Number of days to retain recordings regardless of events + days: 30 # Number of days to retain recordings regardless of events mode: all # Mode for retention: all (24/7), motion (only segments with motion), active_objects (only segments with active objects) events: pre_capture: 5 # Number of seconds before the event to include diff --git a/conf/docker-compose.yaml b/conf/docker-compose.yaml index 2fee7f7..d3bc64c 100644 --- a/conf/docker-compose.yaml +++ b/conf/docker-compose.yaml @@ -20,6 +20,8 @@ services: FRIGATE_GARAGE_RTSP_PASSWORD: ${FRIGATE_GARAGE_RTSP_PASSWORD} FRIGATE_FRONT_DOOR_RTSP_USERNAME: motion FRIGATE_FRONT_DOOR_RTSP_PASSWORD: ${FRIGATE_FRONT_DOOR_RTSP_PASSWORD} + FRIGATE_DRIVEWAY_RTSP_USERNAME: admin + FRIGATE_DRIVEWAY_RTSP_PASSWORD: ${FRIGATE_DRIVEWAY_RTSP_PASSWORD} FRIGATE_BACK_DOOR_RTSP_USERNAME: motion FRIGATE_BACK_DOOR_RTSP_PASSWORD: ${FRIGATE_BACK_DOOR_RTSP_PASSWORD} FRIGATE_FAMILY_ROOM_RTSP_USERNAME: frigate diff --git a/install.yaml b/install.yaml index f9c64b1..b5d8f48 100644 --- a/install.yaml +++ b/install.yaml @@ -9,6 +9,8 @@ prompt: Enter password for garage camera RTSP stream user motion - name: front_door_rtsp_password prompt: Enter password for front door camera RTSP stream user motion + - name: driveway_rtsp_password + prompt: Enter password for driveway camera RTSP stream user admin - name: back_door_rtsp_password prompt: Enter password for back door camera RTSP stream user motion - name: family_room_rtsp_password @@ -123,6 +125,8 @@ password: '{{garage_rtsp_password}}' front_door: password: '{{front_door_rtsp_password}}' + driveway: + password: '{{driveway_rtsp_password}}' back_door: password: '{{back_door_rtsp_password}}' family_room: @@ -132,13 +136,14 @@ login_user: '{{homelab_config.database.user}}' login_password: '{{homelab_config.database.password}}' db: '{{homelab_config.database.name}}' - query: 'INSERT INTO service (name, host, config) VALUES (%s, %s, %s) ON CONFLICT DO NOTHING;' + query: 'INSERT INTO service (name, host, source, config) VALUES (%s, %s, %s, %s) ON CONFLICT DO NOTHING;' positional_args: - '{{item.name}}' - '{{item.host}}' + - '{{item.source}}' - '{{item.config}}' with_items: - - {name: frigate, host: '{{ansible_hostname}}', config: '{{frigate_config|to_json}}'} + - {name: frigate, host: '{{ansible_hostname}}', source: gitea/ashish/frigate/master, config: '{{frigate_config|to_json}}'} - name: Insert into Postgres table service_port community.postgresql.postgresql_query: login_host: '{{homelab_config.database.host}}' diff --git a/start.yaml b/start.yaml index 481d5cf..5b87b12 100644 --- a/start.yaml +++ b/start.yaml @@ -39,6 +39,7 @@ IPGEOLOCATION_API_KEY: '{{frigate_config.ipgeolocation.api_key}}' FRIGATE_GARAGE_RTSP_PASSWORD: '{{frigate_config.rtsp.garage.password}}' FRIGATE_FRONT_DOOR_RTSP_PASSWORD: '{{frigate_config.rtsp.front_door.password}}' + FRIGATE_DRIVEWAY_RTSP_PASSWORD: '{{frigate_config.rtsp.driveway.password}}' FRIGATE_BACK_DOOR_RTSP_PASSWORD: '{{frigate_config.rtsp.back_door.password}}' FRIGATE_FAMILY_ROOM_RTSP_PASSWORD: '{{frigate_config.rtsp.family_room.password}}' community.docker.docker_compose: