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

fix for IOS clips #326

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 22 additions & 12 deletions Frigate_Camera_Notifications/Beta.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
blueprint:
name: Frigate Notifications (0.12.0.5c)
name: Frigate Notifications (0.12.0.5d)
author: SgtBatten
homeassistant:
min_version: 2024.6.0
min_version: 2024.11.0
description: |
## Frigate Notifications

Expand All @@ -12,8 +12,8 @@ blueprint:

### Software Version Requirements
- Minimum Home Assistant Version: 2024.6
- Minimum Frigate Version: 0.12.0
- Minimum Frigate Integration Version: 5.0.0
- Minimum Frigate Version: 0.14.0
- Minimum Frigate Integration Version: 5.5.2
- **Note:** "Enable the unauthenticated notification event proxy" must be ticked during setup
- An MQTT broker connected to Home Assistant and Frigate.
- Minimum iOS Version: 15.0
Expand Down Expand Up @@ -254,8 +254,10 @@ blueprint:
options:
- label: None
value: ""
- label: Clip
- label: Clip mp4
value: "{{base_url}}/api/frigate{{client_id}}/notifications/{{id}}/{{camera}}/clip.mp4"
- label: Clip m3u8 (IOS)
value: "{{base_url}}/api/frigate{{client_id}}/notifications/{{id}}/{{camera}}/master.m3u8"
color:
name: Notification Color - Android/TV only (Optional)
description: Set the color of the notification on your Android mobile device or TV.
Expand Down Expand Up @@ -598,6 +600,8 @@ blueprint:
options:
- label: View Clip
value: "{{base_url}}/api/frigate{{client_id}}/notifications/{{id}}/{{camera}}/clip.mp4"
- label: View Clip (IOS)
value: "{{base_url}}/api/frigate{{client_id}}/notifications/{{id}}/{{camera}}/master.m3u8"
- label: View Snapshot
value: "{{base_url}}/api/frigate{{client_id}}/notifications/{{id}}/snapshot.jpg"
- label: View Stream
Expand Down Expand Up @@ -630,6 +634,8 @@ blueprint:
options:
- label: View Clip
value: "{{base_url}}/api/frigate{{client_id}}/notifications/{{id}}/{{camera}}/clip.mp4"
- label: View Clip (IOS)
value: "{{base_url}}/api/frigate{{client_id}}/notifications/{{id}}/{{camera}}/master.m3u8"
- label: View Snapshot
value: "{{base_url}}/api/frigate{{client_id}}/notifications/{{id}}/snapshot.jpg"
- label: View Stream
Expand Down Expand Up @@ -666,6 +672,8 @@ blueprint:
options:
- label: View Clip
value: "{{base_url}}/api/frigate{{client_id}}/notifications/{{id}}/{{camera}}/clip.mp4"
- label: View Clip (IOS)
value: "{{base_url}}/api/frigate{{client_id}}/notifications/{{id}}/{{camera}}/master.m3u8"
- label: View Snapshot
value: "{{base_url}}/api/frigate{{client_id}}/notifications/{{id}}/snapshot.jpg"
- label: View Stream
Expand Down Expand Up @@ -704,6 +712,8 @@ blueprint:
value: silence-{{ this.entity_id }}
- label: View Clip
value: "{{base_url}}/api/frigate{{client_id}}/notifications/{{id}}/{{camera}}/clip.mp4"
- label: View Clip (IOS)
value: "{{base_url}}/api/frigate{{client_id}}/notifications/{{id}}/{{camera}}/master.m3u8"
- label: View Snapshot
value: "{{base_url}}/api/frigate{{client_id}}/notifications/{{id}}/snapshot.jpg"
- label: View Stream
Expand Down Expand Up @@ -1400,7 +1410,7 @@ action:
message: {{message}}
iOS sound: {{'Critical' if critical else 'disabled by alert once' if alert_once else 'enabled'}},
Android Sound: {{'disabled by alert once' if alert_once else 'enabled'}},
iOS url: {{'REDACTED' if base_url and redacted else base_url}}/api/frigate{{client_id}}/notifications/{{id}}/{{camera + '/clip.mp4' if video|length>0 and wait.trigger.payload_json['type'] == 'end' else attachment }}
iOS url: {{'REDACTED' if base_url and redacted else base_url}}/api/frigate{{client_id}}/notifications/{{id}}/{{camera + '/master.m3u8' if video|length>0 and wait.trigger.payload_json['type'] == 'end' else attachment }}
video: "{{video if not redacted or not base_url else video |replace(base_url, 'REDACTED')}}"

critical: {{critical}},
Expand Down Expand Up @@ -1500,8 +1510,8 @@ action:
subtitle: "{{subtitle}}"
url: "{{tap_action}}"
attachment:
url: "{{base_url}}/api/frigate{{client_id}}/notifications/{{id}}/{{camera + '/clip.mp4' if video|length>0 and wait.trigger.payload_json['type'] == 'end' else attachment }}"
content-type: "{{ 'mpeg4' if video|length>0 and wait.trigger.payload_json['type'] == 'end' else 'jpeg' }}"
url: "{{base_url}}/api/frigate{{client_id}}/notifications/{{id}}/{{camera + '/master.m3u8' if video|length>0 and wait.trigger.payload_json['type'] == 'end' else attachment }}"
content-type: "{{ 'application/vnd.apple.mpegurl' if video|length>0 and wait.trigger.payload_json['type'] == 'end' else 'jpeg' }}"
push:
sound:
name: "{{ iif(update, 'none', sound) }}"
Expand Down Expand Up @@ -1557,8 +1567,8 @@ action:
subtitle: "{{subtitle}}"
url: "{{tap_action}}"
attachment:
url: "{{base_url}}/api/frigate{{client_id}}/notifications/{{id}}/{{camera + '/clip.mp4' if video|length>0 and wait.trigger.payload_json['type'] == 'end' else attachment }}"
content-type: "{{ 'mpeg4' if video|length>0 and wait.trigger.payload_json['type'] == 'end' else 'jpeg' }}"
url: "{{base_url}}/api/frigate{{client_id}}/notifications/{{id}}/{{camera + '/master.m3u8' if video|length>0 and wait.trigger.payload_json['type'] == 'end' else attachment }}"
content-type: "{{ 'application/vnd.apple.mpegurl' if video|length>0 and wait.trigger.payload_json['type'] == 'end' else 'jpeg' }}"
push:
sound:
name: "{{ iif(update, 'none', sound) }}"
Expand Down Expand Up @@ -1611,8 +1621,8 @@ action:
subtitle: "{{subtitle}}"
url: "{{tap_action}}"
attachment:
url: "{{base_url}}/api/frigate{{client_id}}/notifications/{{id}}/{{camera + '/clip.mp4' if video|length>0 and wait.trigger.payload_json['type'] == 'end' else attachment }}"
content-type: "{{ 'mpeg4' if video|length>0 and wait.trigger.payload_json['type'] == 'end' else 'jpeg' }}"
url: "{{base_url}}/api/frigate{{client_id}}/notifications/{{id}}/{{camera + '/master.m3u8' if video|length>0 and wait.trigger.payload_json['type'] == 'end' else attachment }}"
content-type: "{{ 'application/vnd.apple.mpegurl' if video|length>0 and wait.trigger.payload_json['type'] == 'end' else 'jpeg' }}"
push:
sound:
name: "{{ iif(update, 'none', sound) }}"
Expand Down