SgtBatten / HA_blueprints

Somewhere to store automation blueprints
184 stars 71 forks source link

[Issue]: Automation not triggering for a specific Camera #189

Closed ajithprabhakar closed 6 months ago

ajithprabhakar commented 6 months ago

Description

I have four Cameras configured within the Frigate with similar configurations and four automation setups with this Blueprint (one for each camera). However, automation for a specific (front) camera is not triggering at all. I can see the events in the frigate's events view for this camera, but automation is not getting triggered for those events.

Version

0.12.0.2

Automation Config

alias: Front Camera Notification - Frigate
description: ""
use_blueprint:
  path: SgtBatten/Stable.yaml
  input:
    camera: camera.front_2
    notify_group: uxxa_axxth
    base_url: https://xxxxxxxx.ui.nabu.casa
    message: "{{label}} detected on {{camera_name}} camera"
    alert_once: false
    update_thumbnail: true
    ios_live_view: true
    notify_device: c1fc108e9178cxxxxxxxxxxxx96
    debug: true

Frigate Config

mqtt:
  host: 10.167.1.xxx
  port: 1883
  topic_prefix: frigate
  client_id: frigate
  user: xxx
  password: xxxxxxxxx
  stats_interval: 300

record:
  expire_interval: 10

timestamp_style:
  format: "%m/%d/%Y %H:%M:%S"
  color:
    red: 255
    green: 255
    blue: 255
  thickness: 2
  effect: shadow

cameras:
  front:
    ffmpeg:
      inputs:
        - path: rtsp://10.167.1.xxx:8554/front-porch-cam
          roles:
            - detect
        - path: rtsp://10.167.1.xxx:8554/front-porch-cam
          roles:
            - record
    detect:
      width: 1280
      height: 720
      fps: 5
    objects:
      track:
        - person
        - dog
        - car
      filters:
        car:
          mask:
            - 1280,447,1280,46,411,44,0,42,0,136,352,336,375,513
        person:
          min_score: 0.75
    snapshots:
      enabled: true
      timestamp: true
      bounding_box: true
      crop: True
      height: 500
      retain:
        default: 3
    motion:
      mask:
         - 1280,447,1280,138,398,136,0,136,352,336,386,463
    record:
      enabled: True
      retain:
        days: 0
      events:
        retain:
          default: 5
          mode: motion
        pre_capture: 5
        post_capture: 15
  back:
    ffmpeg:
      inputs:
        - path: rtsp://10.167.1.xxx:8554/back-yard-cam
          roles:
            - detect
        - path: rtsp://10.167.1.xxx:8554/back-yard-cam
          roles:
            - record
    detect:
      width: 1280
      height: 720
      fps: 5
    objects:
      track:
        - person
        - dog
        - cat
    snapshots:
      enabled: true
      timestamp: true
      bounding_box: true
      crop: True
      height: 500
      retain:
        default: 3
    record:
      enabled: True
      retain:
        days: 0
      events:
        retain:
          default: 5
          mode: motion
        pre_capture: 5
        post_capture: 15
  side:
    ffmpeg:
      inputs:
        - path: rtsp://10.167.1.xxx:8554/side-cam
          roles:
            - detect
        - path: rtsp://10.167.1.xxx:8554/side-cam
          roles:
            - record
    detect:
      width: 1280
      height: 720
      fps: 5
    objects:
      track:
        - person
        - dog
      filters:
        dog:
          mask:
            - 1280,496,1280,720,0,720,0,526
    motion:
      mask:
        - 0,387,1280,427,1280,411,1280,0,0,0
    snapshots:
      enabled: true
      timestamp: true
      bounding_box: true
      crop: True
      height: 500
      retain:
        default: 3
    record:
      enabled: True
      retain:
        days: 0
      events:
        retain:
          default: 5
          mode: motion
        pre_capture: 5
        post_capture: 15
  garage:
    ffmpeg:
      inputs:
        - path: rtsp://10.167.1.xxx:8554/garage-cam
          roles:
            - detect
        - path: rtsp://10.167.1.xxx:8554/garage-cam
          roles:
            - record
    detect:
      width: 1280
      height: 720
      fps: 5
    objects:
      track:
        - person
        - car
      filters:
        car:
          mask:         
            - 37,656,944,720,1280,697,1088,275,333,343
          min_area: 15000
        person:
          min_area: 500
    snapshots:
      enabled: true
      timestamp: true
      bounding_box: true
      crop: True
      height: 500
      retain:
        default: 3
    record:
      enabled: True
      retain:
        days: 0
      events:
        retain:
          default: 5
          mode: motion
        pre_capture: 5
        post_capture: 15
rtmp:
  enabled: false

birdseye:
  enabled: True
  width: 1280
  height: 720
  quality: 8
  mode: continuous

live:
  height: 720
  quality: 8

Any other relevant information

No response

ajithprabhakar commented 6 months ago
image

The triggers you see for the Front Camera (2 Automation) are manual triggers I used for testing.

image
SgtBatten commented 6 months ago

The camera is named front, your home assistant entity says front_2. 3 options

  1. change the entity name,
  2. change the automation using yaml mode to remove the _2
  3. use the beta

Any of those will resolve it.