Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add external events to Frigate Event Log via MQTT or HTTP #11461

Closed
tubalainen opened this issue May 21, 2024 · 2 comments
Closed

Add external events to Frigate Event Log via MQTT or HTTP #11461

tubalainen opened this issue May 21, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@tubalainen
Copy link
Contributor

Describe what you are trying to accomplish and why in non technical terms
Ive got different sensors (such as PIRs etc) around my garden and would like to be able to send "external event triggers" to be logged in Frigate Events. Some of the sensors are far away from the camera but I would benefit greatly to start the "event" using an external trigger to catch even more events (mainly wild life in my case).

Describe the solution you'd like
This could be done via MQTT or via the existing HA-component/API. I would love for it to be via MQTT if possible.
It would show up just like any other triggered event with a label and the possibility to filter on the event.
The external event needs to be connected to be "per camera" to ensure that the AI doesnt double-trigger.
Ive been running Blue Iris in parallel to Frigate and have setup Blue Iris to trigger an event based on external sensors via MQTT or an HTTP trigger. Here is an example of my code for Blue Iris.

- id: cam1_3_9_person_detected_send_bi
  alias: "Frigate Cam 1 3 9 Framsidan send to BI"
  initial_state: 'on'
  trigger:
  - entity_id:
      - binary_sensor.cam1_framsidan_all_occupancy
      - binary_sensor.cam3_framsidan_all_occupancy
      - binary_sensor.cam9_uppfart_all_occupancy
      - binary_sensor.cam6_lekstugan_all_occupancy
      - binary_sensor.shelly_19_switch
      - binary_sensor.postinkast
      - binary_sensor.posttomning
      - binary_sensor.motion_sensor_ytterdorr_groventren_occupancy
    platform: state
    to: 'on'
  condition: []
  action:
    - service: shell_command.alert_bi
      data:
        url: 'https://ip:81/admin?trigger&camera=cam9_hd&user=user&pw=pass'
    - service: shell_command.alert_bi
      data:
        url: 'https://ip:81/admin?trigger&camera=cam3_hd&user=user&pw=pass'
    - service: shell_command.alert_bi
      data:
        url: 'https://ip:81/admin?trigger&camera=cam1_hd&user=user&pw=pass'
    - service: shell_command.alert_bi
      data:
        url: 'https://ip:81/admin?trigger&camera=cam8_hd&user=user&pw=pass'
    - service: shell_command.alert_bi
      data:
        url: 'https://ip:81/admin?trigger&camera=cam6_hd&user=user&pw=pass'

Describe alternatives you've considered
Dont think its possible? Right?

Additional context
Frigate is the best! Love it! Thanks guys!

@tubalainen tubalainen added the enhancement New feature or request label May 21, 2024
@NickM-27
Copy link
Sponsor Collaborator

This is already supported https://docs.frigate.video/integrations/api#post-apieventscamera_namelabelcreate

@tubalainen
Copy link
Contributor Author

tubalainen commented May 21, 2024

This is already supported https://docs.frigate.video/integrations/api#post-apieventscamera_namelabelcreate

MAH! Just got caught by my own absence from the Frigate community. Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants