mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-10-30 02:10:35 +03:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
23e0c41fc0 |
@@ -1,2 +1,2 @@
|
|||||||
onnx == 1.14.0; platform_machine == 'aarch64'
|
onnx == 1.14.0; platform_machine == 'aarch64'
|
||||||
protobuf == 5.29.6; platform_machine == 'aarch64'
|
protobuf == 3.20.3; platform_machine == 'aarch64'
|
||||||
|
|||||||
@@ -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.
|
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
|
### 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.
|
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.
|
||||||
|
|||||||
@@ -623,7 +623,7 @@ class WebPushClient(Communicator):
|
|||||||
|
|
||||||
# if event is ongoing open to live view otherwise open to recordings view
|
# if event is ongoing open to live view otherwise open to recordings view
|
||||||
direct_url = f"/review?id={reviewId}" if ended else f"/#{camera}"
|
direct_url = f"/review?id={reviewId}" if ended else f"/#{camera}"
|
||||||
ttl = 3600 if ended else 0
|
ttl = 3600 if ended else self.config.cameras[camera].notifications.ttl
|
||||||
|
|
||||||
logger.debug(f"Sending push notification for {camera}, review ID {reviewId}")
|
logger.debug(f"Sending push notification for {camera}, review ID {reviewId}")
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,12 @@ class NotificationConfig(FrigateBaseModel):
|
|||||||
title="Cooldown period",
|
title="Cooldown period",
|
||||||
description="Cooldown (seconds) between notifications to avoid spamming recipients.",
|
description="Cooldown (seconds) between notifications to avoid spamming recipients.",
|
||||||
)
|
)
|
||||||
|
ttl: int = Field(
|
||||||
|
default=0,
|
||||||
|
ge=0,
|
||||||
|
title="Notification TTL",
|
||||||
|
description="Seconds the push service keeps retrying a notification sent while an alert is active if your device can't be reached. 0 delivers immediately or drops it. The notification sent when an alert ends is always kept for up to an hour.",
|
||||||
|
)
|
||||||
enabled_in_config: bool | None = Field(
|
enabled_in_config: bool | None = Field(
|
||||||
default=None,
|
default=None,
|
||||||
title="Original notifications state",
|
title="Original notifications state",
|
||||||
|
|||||||
Generated
+9
-9
@@ -2990,9 +2990,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@rjsf/utils/node_modules/fast-uri": {
|
"node_modules/@rjsf/utils/node_modules/fast-uri": {
|
||||||
"version": "4.2.3",
|
"version": "4.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-4.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-4.2.1.tgz",
|
||||||
"integrity": "sha512-I1PXwP5eAhlNlcdpjt9CgB59op2ZvZfxw+BkqGFVIUOgNpCVTcTqp3HhTX7brxj5vsip+nSY4nTvff+eIA76hg==",
|
"integrity": "sha512-TmHQgewjHtMq1E5QKA0tOE0yeYGQs25KZC/ziJpubRtWI15W92e6vPFydWOeZBVROSHBYw/QhD9d5OefdD6LDg==",
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "github",
|
"type": "github",
|
||||||
@@ -5399,9 +5399,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/fast-uri": {
|
"node_modules/fast-uri": {
|
||||||
"version": "3.1.9",
|
"version": "3.1.8",
|
||||||
"resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.9.tgz",
|
"resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.8.tgz",
|
||||||
"integrity": "sha512-hS/0Wt3Ya043oKXs0sIxrMpKQITXhMLIrVAKKXi4gozGC9v7YRWVnXIZzjNPTO02M9BdxLCWqK1yRXgNziVyJQ==",
|
"integrity": "sha512-GZMtZUTNRpOVIECoXwLNZS5xUGE+mVNbTB8h/7Rwh2TFWcBQiPzTgyZi05BF9UMZKkLJv8XBRJTlU7zg8+ZfMg==",
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "github",
|
"type": "github",
|
||||||
@@ -8669,9 +8669,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/postcss-selector-parser": {
|
"node_modules/postcss-selector-parser": {
|
||||||
"version": "6.1.5",
|
"version": "6.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.5.tgz",
|
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.4.tgz",
|
||||||
"integrity": "sha512-TEHFzb5KRDKaOgJ4TYE+0jyJtFbjLvkdVOu0fZ2b6MTWzoqZd4Le+61aEppWkvTlYePgOX4ATL1wsAIPMLTw6Q==",
|
"integrity": "sha512-bIoJLOmjCO1S9XdY/DcnR5hJxvrDir1PbGChrzXG3vw0/FOliy/fA3dmdhQ441kah4gKv+TwckGzex6wNS5cnQ==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"cssesc": "^3.0.0",
|
"cssesc": "^3.0.0",
|
||||||
|
|||||||
@@ -858,6 +858,10 @@
|
|||||||
"label": "Cooldown period",
|
"label": "Cooldown period",
|
||||||
"description": "Cooldown (seconds) between notifications to avoid spamming recipients."
|
"description": "Cooldown (seconds) between notifications to avoid spamming recipients."
|
||||||
},
|
},
|
||||||
|
"ttl": {
|
||||||
|
"label": "Notification TTL",
|
||||||
|
"description": "Seconds the push service keeps retrying a notification sent while an alert is active if your device can't be reached. 0 delivers immediately or drops it. The notification sent when an alert ends is always kept for up to an hour."
|
||||||
|
},
|
||||||
"enabled_in_config": {
|
"enabled_in_config": {
|
||||||
"label": "Original notifications state",
|
"label": "Original notifications state",
|
||||||
"description": "Indicates whether notifications were enabled in the original static configuration."
|
"description": "Indicates whether notifications were enabled in the original static configuration."
|
||||||
|
|||||||
@@ -154,6 +154,10 @@
|
|||||||
"label": "Cooldown period",
|
"label": "Cooldown period",
|
||||||
"description": "Cooldown (seconds) between notifications to avoid spamming recipients."
|
"description": "Cooldown (seconds) between notifications to avoid spamming recipients."
|
||||||
},
|
},
|
||||||
|
"ttl": {
|
||||||
|
"label": "Notification TTL",
|
||||||
|
"description": "Seconds the push service keeps retrying a notification sent while an alert is active if your device can't be reached. 0 delivers immediately or drops it. The notification sent when an alert ends is always kept for up to an hour."
|
||||||
|
},
|
||||||
"enabled_in_config": {
|
"enabled_in_config": {
|
||||||
"label": "Original notifications state",
|
"label": "Original notifications state",
|
||||||
"description": "Indicates whether notifications were enabled in the original static configuration."
|
"description": "Indicates whether notifications were enabled in the original static configuration."
|
||||||
|
|||||||
@@ -2051,7 +2051,8 @@
|
|||||||
"profileBaseDisabled": "Recording is disabled in this camera's base config, so enabling it in a profile has no effect. Enable recording in the base config and use a profile to disable it instead."
|
"profileBaseDisabled": "Recording is disabled in this camera's base config, so enabling it in a profile has no effect. Enable recording in the base config and use a profile to disable it instead."
|
||||||
},
|
},
|
||||||
"notifications": {
|
"notifications": {
|
||||||
"profileBaseDisabled": "No cameras have notifications enabled in their base config, so enabling them in a profile has no effect. Enable notifications in the base config of at least one camera."
|
"profileBaseDisabled": "No cameras have notifications enabled in their base config, so enabling them in a profile has no effect. Enable notifications in the base config of at least one camera.",
|
||||||
|
"ttlDelay": "If your device can't be reached when an alert is active, its notifications can arrive up to this many seconds late. It will still say an object is detected and open the live view, even if the object has already left."
|
||||||
},
|
},
|
||||||
"birdseye": {
|
"birdseye": {
|
||||||
"objectTrackingDetectDisabled": "Birdseye includes tracked objects, but object detection is disabled for this camera. The camera will not appear in Birdseye.",
|
"objectTrackingDetectDisabled": "Birdseye includes tracked objects, but object detection is disabled for this camera. The camera will not appear in Birdseye.",
|
||||||
|
|||||||
@@ -24,6 +24,15 @@ const notifications: SectionConfigOverrides = {
|
|||||||
camera.notifications.enabled_in_config,
|
camera.notifications.enabled_in_config,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: "notifications-ttl-delay",
|
||||||
|
field: "ttl",
|
||||||
|
messageKey: "configMessages.notifications.ttlDelay",
|
||||||
|
severity: "warning",
|
||||||
|
position: "after",
|
||||||
|
condition: (ctx) =>
|
||||||
|
typeof ctx.formData?.ttl === "number" && ctx.formData.ttl > 0,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
global: {
|
global: {
|
||||||
@@ -32,6 +41,7 @@ const notifications: SectionConfigOverrides = {
|
|||||||
enabled: { "ui:widget": "hidden" },
|
enabled: { "ui:widget": "hidden" },
|
||||||
email: { "ui:widget": "hidden" },
|
email: { "ui:widget": "hidden" },
|
||||||
cooldown: { "ui:widget": "hidden" },
|
cooldown: { "ui:widget": "hidden" },
|
||||||
|
ttl: { "ui:widget": "hidden" },
|
||||||
enabled_in_config: { "ui:widget": "hidden" },
|
enabled_in_config: { "ui:widget": "hidden" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user