NVR with realtime local object detection for IP cameras
TypeScript aicameragoogle-coralhome-assistanthome-automationhomeautomationmqttnvrobject-detectionrealtimertsptensorflow
Miscellaneous Fixes (#21166)
Josh Hawkins88a8de0b1c6e
diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.mdnew file mode 100644index 0000000000..6c14bb1660--- /dev/null+++ b/.github/copilot-instructions.md@@ -0,0 +1,2 @@+Never write strings in the frontend directly, always write to and reference the relevant translations file.+Always conform new and refactored code to the existing coding style in the project.diff --git a/docs/docs/configuration/genai/review_summaries.md b/docs/docs/configuration/genai/review_summaries.mdindex e83578490d..8a492f4b8f 100644--- a/docs/docs/configuration/genai/review_summaries.md+++ b/docs/docs/configuration/genai/review_summaries.md@@ -116,4 +116,4 @@ Along with individual review item summaries, Generative AI provides the abilityReview reports can be requested via the [API](/integrations/api#review-summarization) by sending a POST request to `/api/review/summarize/start/{start_ts}/end/{end_ts}` with Unix timestamps.-For Home Assistant users, there is a built-in service (`frigate.generate_review_summary`) that makes it easy to request review reports as part of automations or scripts. This allows you to automatically generate daily summaries, vacation reports, or custom time period reports based on your specific needs.+For Home Assistant users, there is a built-in service (`frigate.review_summarize`) that makes it easy to request review reports as part of automations or scripts. This allows you to automatically generate daily summaries, vacation reports, or custom time period reports based on your specific needs.diff --git a/docs/docs/configuration/masks.md b/docs/docs/configuration/masks.mdindex 4b57be9649..4a47225863 100644--- a/docs/docs/configuration/masks.md+++ b/docs/docs/configuration/masks.md@@ -28,7 +28,6 @@ To create a poly mask:5. Click the plus icon under the type of mask or zone you would like to create6. Click on the camera's latest image to create the points for a masked area. Click the first point again to close the polygon.7. When you've finished creating your mask, press Save.-8. Restart Frigate to apply your changes.Your config file will be updated with the relative coordinates of the mask/zone:diff --git a/docs/docs/configuration/reference.md b/docs/docs/configuration/reference.mdindex a375086cb1..6dde92fbef 100644--- a/docs/docs/configuration/reference.md+++ b/docs/docs/configuration/reference.md@@ -1002,10 +1002,6 @@ ui:# full: 8:15:22 PM Mountain Standard Time# (default: shown below).time_style: medium- # Optional: Ability to manually override the date / time styling to use strftime format- # https://www.gnu.org/software/libc/manual/html_node/Formatting-Calendar-Time.html- # possible values are shown above (default: not set)- strftime_fmt: "%Y/%m/%d %H:%M"# Optional: Set the unit system to either "imperial" or "metric" (default: metric)# Used in the UI and in MQTT topicsunit_system: metricdiff --git a/frigate/comms/webpush.py b/frigate/comms/webpush.pyindex 8902262722..a3d34c9301 100644--- a/frigate/comms/webpush.py+++ b/frigate/comms/webpush.py@@ -390,7 +390,20 @@ class WebPushClient(Communicator):message = payload["after"]["data"]["metadata"]["scene"]else:- title = f"{titlecase(', '.join(sorted_objects).replace('_', ' '))}{' was' if state == 'end' else ''} detected in {titlecase(', '.join(payload['after']['data']['zones']).replace('_', ' '))}"+ zone_names = payload["after"]["data"]["zones"]+ formatted_zone_names = []++ for zone_name in zone_names:+ if zone_name in self.config.cameras[camera].zones:+ formatted_zone_names.append(+ self.config.cameras[camera]+ .zones[zone_name]+ .get_formatted_name(zone_name)+ )+ else:+ formatted_zone_names.append(titlecase(zone_name.replace("_", " ")))++ title = f"{titlecase(', '.join(sorted_objects).replace('_', ' '))}{' was' if state == 'end' else ''} detected in {', '.join(formatted_zone_names)}"message = f"Detected on {camera_name}"if ended:diff --git a/frigate/config/ui.py b/frigate/config/ui.pyindex 2f66aeed31..8e0d4d77df 100644--- a/frigate/config/ui.py+++ b/frigate/config/ui.py@@ -37,9 +37,6 @@ class UIConfig(FrigateBaseModel):time_style: DateTimeStyleEnum = Field(default=DateTimeStyleEnum.medium, title="Override UI timeStyle.")- strftime_fmt: Optional[str] = Field(- default=None, title="Override date and time format using strftime syntax."- )unit_system: UnitSystemEnum = Field(default=UnitSystemEnum.metric, title="The unit system to use for measurements.")diff --git a/frigate/data_processing/real_time/custom_classification.py b/frigate/data_processing/real_time/custom_classification.pyindex c8f31db76a..25ec3bb863 100644--- a/frigate/data_processing/real_time/custom_classification.py+++ b/frigate/data_processing/real_time/custom_classification.py@@ -639,14 +639,14 @@ def write_classification_attempt(os.makedirs(folder, exist_ok=True)cv2.imwrite(file, frame)- files = sorted(- filter(lambda f: (f.endswith(".webp")), os.listdir(folder)),- key=lambda f: os.path.getctime(os.path.join(folder, f)),- reverse=True,- )-# delete oldest face image if maximum is reachedtry:+ files = sorted(+ filter(lambda f: (f.endswith(".webp")), os.listdir(folder)),+ key=lambda f: os.path.getctime(os.path.join(folder, f)),+ reverse=True,+ )+if len(files) > max_files:os.unlink(os.path.join(folder, files[-1]))except FileNotFoundError:diff --git a/web/public/locales/en/config/ui.json b/web/public/locales/en/config/ui.jsonindex fec0a95287..cdd91cb535 100644--- a/web/public/locales/en/config/ui.json+++ b/web/public/locales/en/config/ui.json@@ -13,11 +13,8 @@"time_style": {"label": "Override UI timeStyle."},- "strftime_fmt": {- "label": "Override date and time format using strftime syntax."- },"unit_system": {"label": "The unit system to use for measurements."}}-}\ No newline at end of file+}diff --git a/web/public/locales/en/views/classificationModel.json b/web/public/locales/en/views/classificationModel.jsonindex 1b1ec811ab..aecf3ca89d 100644--- a/web/public/locales/en/views/classificationModel.json+++ b/web/public/locales/en/views/classificationModel.json@@ -1,5 +1,5 @@{- "documentTitle": "Classification Models",+ "documentTitle": "Classification Models - Frigate","details": {"scoreInfo": "Score represents the average classification confidence across all detections of this object."},diff --git a/web/public/locales/en/views/explore.json b/web/public/locales/en/views/explore.jsonindex 3f057c38d0..6c938c1092 100644--- a/web/public/locales/en/views/explore.json+++ b/web/public/locales/en/views/explore.json@@ -77,7 +77,7 @@"millisecondsToOffset": "Milliseconds to offset detect annotations by. <em>Default: 0</em>","tips": "Lower the value if the video playback is ahead of the boxes and path points, and increase the value if the video playback is behind them. This value can be negative.","toast": {- "success": "Annotation offset for {{camera}} has been saved to the config file. Restart Frigate to apply your changes."+ "success": "Annotation offset for {{camera}} has been saved to the config file."}}},diff --git a/web/public/locales/en/views/settings.json b/web/public/locales/en/views/settings.jsonindex 22dae29de6..7ffd29007a 100644--- a/web/public/locales/en/views/settings.json+++ b/web/public/locales/en/views/settings.json@@ -534,7 +534,7 @@}},"toast": {- "success": "Zone ({{zoneName}}) has been saved. Restart Frigate to apply changes."+ "success": "Zone ({{zoneName}}) has been saved."}},"motionMasks": {@@ -558,8 +558,8 @@},"toast": {"success": {- "title": "{{polygonName}} has been saved. Restart Frigate to apply changes.",- "noName": "Motion Mask has been saved. Restart Frigate to apply changes."+ "title": "{{polygonName}} has been saved.",+ "noName": "Motion Mask has been saved."}}},@@ -583,8 +583,8 @@},"toast": {"success": {- "title": "{{polygonName}} has been saved. Restart Frigate to apply changes.",- "noName": "Object Mask has been saved. Restart Frigate to apply changes."+ "title": "{{polygonName}} has been saved.",+ "noName": "Object Mask has been saved."}}}diff --git a/web/src/types/frigateConfig.ts b/web/src/types/frigateConfig.tsindex 985fe3457f..94c9ba6e94 100644--- a/web/src/types/frigateConfig.ts+++ b/web/src/types/frigateConfig.ts@@ -6,7 +6,6 @@ export interface UiConfig {time_format?: "browser" | "12hour" | "24hour";date_style?: "full" | "long" | "medium" | "short";time_style?: "full" | "long" | "medium" | "short";- strftime_fmt?: string;dashboard: boolean;order: number;unit_system?: "metric" | "imperial";diff --git a/web/src/views/classification/ModelTrainingView.tsx b/web/src/views/classification/ModelTrainingView.tsxindex d6d03c6cc0..f9c1044efb 100644--- a/web/src/views/classification/ModelTrainingView.tsx+++ b/web/src/views/classification/ModelTrainingView.tsx@@ -84,6 +84,12 @@ export default function ModelTrainingView({ model }: ModelTrainingViewProps) {const [page, setPage] = useState<string>("train");const [pageToggle, setPageToggle] = useOptimisticState(page, setPage, 100);+ // title++ useEffect(() => {+ document.title = `${model.name} - ${t("documentTitle")}`;+ }, [model.name, t]);+// model stateconst [wasTraining, setWasTraining] = useState(false);