diff --git a/docs/docs/configuration/notifications.md b/docs/docs/configuration/notifications.md index a923c2a61c..df44efb5ba 100644 --- a/docs/docs/configuration/notifications.md +++ b/docs/docs/configuration/notifications.md @@ -117,8 +117,8 @@ Setting `ttl` tells the push service to keep retrying notifications sent while a -1. Navigate to and select the desired camera. - - Set **Notification TTL** to the number of seconds to keep retrying (e.g. `10`) +1. Navigate to . + - Expand **Advanced Settings** and set **Notification TTL** to the number of seconds to keep retrying (e.g. `10`) diff --git a/frigate/comms/webpush.py b/frigate/comms/webpush.py index 465ea63306..78bfdfeb05 100644 --- a/frigate/comms/webpush.py +++ b/frigate/comms/webpush.py @@ -623,7 +623,7 @@ class WebPushClient(Communicator): # if event is ongoing open to live view otherwise open to recordings view direct_url = f"/review?id={reviewId}" if ended else f"/#{camera}" - ttl = 3600 if ended else self.config.cameras[camera].notifications.ttl + ttl = 3600 if ended else self.config.notifications.ttl logger.debug(f"Sending push notification for {camera}, review ID {reviewId}") diff --git a/web/public/locales/en/views/settings.json b/web/public/locales/en/views/settings.json index 55259a5305..421993d8f2 100644 --- a/web/public/locales/en/views/settings.json +++ b/web/public/locales/en/views/settings.json @@ -2052,7 +2052,7 @@ }, "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.", - "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." + "ttlDelay": "Notifications can arrive up to this many seconds late and still link to the live view after the review item has ended." }, "birdseye": { "objectTrackingDetectDisabled": "Birdseye includes tracked objects, but object detection is disabled for this camera. The camera will not appear in Birdseye.", diff --git a/web/src/components/config-form/section-configs/notifications.ts b/web/src/components/config-form/section-configs/notifications.ts index 1fa3114127..50f6b25511 100644 --- a/web/src/components/config-form/section-configs/notifications.ts +++ b/web/src/components/config-form/section-configs/notifications.ts @@ -7,7 +7,7 @@ const notifications: SectionConfigOverrides = { fieldOrder: ["enabled", "email"], fieldGroups: {}, hiddenFields: ["enabled_in_config"], - advancedFields: [], + advancedFields: ["ttl"], fieldMessages: [ { key: "profile-base-notifications-disabled", @@ -41,12 +41,11 @@ const notifications: SectionConfigOverrides = { enabled: { "ui:widget": "hidden" }, email: { "ui:widget": "hidden" }, cooldown: { "ui:widget": "hidden" }, - ttl: { "ui:widget": "hidden" }, enabled_in_config: { "ui:widget": "hidden" }, }, }, camera: { - hiddenFields: ["enabled_in_config", "email"], + hiddenFields: ["enabled_in_config", "email", "ttl"], }, }; diff --git a/web/src/components/config-form/sectionExtras/NotificationsSettingsExtras.tsx b/web/src/components/config-form/sectionExtras/NotificationsSettingsExtras.tsx index 98c2e9caaa..3db2a8203b 100644 --- a/web/src/components/config-form/sectionExtras/NotificationsSettingsExtras.tsx +++ b/web/src/components/config-form/sectionExtras/NotificationsSettingsExtras.tsx @@ -340,7 +340,7 @@ export default function NotificationsSettingsExtras({ set(nextNotifications, "enabled", desiredEnabled); const sanitizedNotifications = sanitizeSectionData( nextNotifications as ConfigSectionData, - ["enabled_in_config", "email"], + ["enabled_in_config", "email", "ttl"], ); onPendingDataChange("notifications", camera.name, sanitizedNotifications); pendingCameraOverridesRef.current.add(camera.name); @@ -490,7 +490,7 @@ export default function NotificationsSettingsExtras({ return (
-
+
{isAdmin && (