Clips is a thumbnail generation tool. It will receive a Frigate event once it is finished and turn it into a short 5 second video clip. After generation, it publishes an event to frigate/clips
topic which allows for automation (sending a notification of the recording).
Container Images Tags: 0.0.1
- MQTT
- Frigate
- Copy
docker-compose.yml
to the server running Frigate in Docker - Using the
config.yml
as a template, create a config file and place in a location accessible to Docker - Run
docker compose up -d
to run the project
- Frigate publishes
new
event of a detection to MQTT - Home Assistant triggers a new push notification to a device using the
after.id
property as atag
key from thetrigger.payload_json
. - Clips receives the MQTT
new
event message from thefrigate/events
topic and generates a clip if the event is anend
(detection is complete). - Clips publishes a complete event on the
frigate/clips
MQTT topic - Home assistant triggers a new push notification to update the existing notification using the
after.id
property as atag
key - User can see looping clip on mobile device
- Create or edit an existing Frigate notification automation
- Add a trigger of
MQTT event
trigging by event on topicfrigate/clips
- Using the
notify
service, publish a notification using the below block as a template:- service: notify.notify data: message: A {{ trigger.payload_json['after']['label'] }} was detected on the {{ trigger.payload_json['after']['camera'] }} camera. data: tag: "{{ trigger.payload_json['after']['id'] }}" group: frigate video: "https://<my_clips_endpoint>{{ trigger.payload_json['clip_url'] }}" push: sound: none
You can simplify the setup by using variables in your automation:
variables:
payload: "{{ trigger.payload_json }}"
after: "{{ payload.after }}"
label: "{{ after.label }}"
camera: "{{ after.camera }}"
clipPath: "{{ payload.clip_uri }}"
Notify
- service: notify.notify
data:
message: A {{ label }} was detected on the {{ camera }} camera.
data:
tag: "{{ id }}"
group: frigate
video: "https://<my_clips_endpoint>{{ clipPath }}"
push:
sound: none