mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-10-30 10:20:30 +03:00
add configurable ttl for active alert notifications
Notifications sent while an alert was active always used a TTL of 0, so the push service dropped them if the device wasn't reachable at that moment and users only received the notification sent when the alert ended. A new `ttl` notifications option, settable globally or per camera, lets the push service retry these notifications for that many seconds. It defaults to 0, and the settings UI warns that a non-zero value can deliver stale notifications.
This commit is contained in:
@@ -108,6 +108,29 @@ Currently, only Chrome supports images in notifications. Safari and Firefox will
|
||||
|
||||
Different platforms handle notifications differently, some settings changes may be required to get optimal notification delivery.
|
||||
|
||||
### Notification TTL
|
||||
|
||||
By default, Frigate sends notifications for an active alert with a TTL of `0`, so the push service either delivers them immediately or drops them. If your device is briefly unreachable (asleep, switching from Wi-Fi to cellular, or on a weak signal), those notifications are lost and you only receive the notification sent when the alert ends, which is always kept for up to an hour.
|
||||
|
||||
Setting `ttl` tells the push service to keep retrying notifications sent while an alert is active for that many seconds. This makes delivery more reliable, but a notification delivered late will still say an object is detected, even if the object has already left. Keep the value small.
|
||||
|
||||
<ConfigTabs>
|
||||
<TabItem value="ui">
|
||||
|
||||
1. Navigate to <NavPath path="Settings > Camera configuration > Notifications" /> and select the desired camera.
|
||||
- Set **Notification TTL** to the number of seconds to keep retrying (e.g. `10`)
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="yaml">
|
||||
|
||||
```yaml
|
||||
notifications:
|
||||
ttl: 10 # retry an undelivered notification for up to 10 seconds
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</ConfigTabs>
|
||||
|
||||
### Android
|
||||
|
||||
Most Android phones have battery optimization settings. To get reliable Notification delivery the browser (Chrome, Firefox) should have battery optimizations disabled. If Frigate is running as a PWA then the Frigate app should have battery optimizations disabled as well.
|
||||
|
||||
Reference in New Issue
Block a user