Commit Graph

5007 Commits

Author SHA1 Message Date
Daniel
f68ff53bd9 fix MQTT disconnect reason code comparison bug
The mypy fixes introduced a bug where disconnect callback was comparing
reason_code == 0 instead of reason_value == 0. Since reason_code is a
ReasonCode object, it never equals integer 0, causing clean disconnects
to never be detected and infinite retry loops to occur.

Fixed by using reason_value (extracted from reason_code.value) for
numeric comparison, consistent with how we extract the value for logging.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-14 20:07:22 -04:00
Daniel
b0f189056a fix MQTT retry loop race condition with cleanup disconnect
Previously, the reconnection loop was calling client.disconnect() during cleanup,
which triggered the disconnect callback with code 0 ("Normal disconnection").
The callback would then exit early, preventing further reconnection attempts.

This creates a cleanup flag that prevents the disconnect callback from
stopping reconnection when we're intentionally cleaning up the old client
during retry attempts.

Fixes issue where MQTT would get stuck in retry loop without actually
attempting fresh connections.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-14 19:03:34 -04:00
Josh Hawkins
2d4a0cc584
false_positive endpoint needs to await send_to_plus call (#20069) 2025-09-14 11:31:07 -05:00
Nicolas Mowen
ff0430964c
Correctly calculate input data type for OV (#20066)
* Correctly calculate input data type for OV

* Formatting
2025-09-14 07:15:41 -06:00
GuoQing Liu
b08db4913f
feat: add github mirror download endpoint (#20007)
* feat: add github mirror download endpoint

* fix: fix face_embedding endpoint line

* fix: fix github raw endpoint

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>

---------

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
2025-09-14 06:51:56 -06:00
arthur simas
c74e86dff2
fix(web): handle undefined screen.orientation (#20064) 2025-09-14 06:51:39 -06:00
Nicolas Mowen
81d7c47129
Optimize OpenVINO and ONNX Model Runners (#20063)
* Use re-usable inference request to reduce CPU usage

* Share tensor

* Don't count performance

* Create openvino runner class

* Break apart onnx runner

* Add specific note about inability to use CUDA graphs for some models

* Adjust rknn to use RKNNRunner

* Use optimized runner

* Add support for non-complex models for CudaExecutionProvider

* Use core mask for rknn

* Correctly handle cuda input

* Cleanup

* Sort imports
2025-09-14 06:22:22 -06:00
Josh Hawkins
41ed013cc4
Check cameras param and continue to split for query (#20048) 2025-09-12 09:58:47 -06:00
Nicolas Mowen
751678c845
Fix cuda graph fallback (#20039) 2025-09-12 06:41:26 -05:00
Josh Hawkins
ed1e3a7c9a
Enhance user roles to limit camera access (#20024)
* update config for roles and add validator

* ensure admin and viewer are never overridden

* add class method to user to retrieve all allowed cameras

* enforce config roles in auth api endpoints

* add camera access api dependency functions

* protect review endpoints

* protect preview endpoints

* rename param name for better fastapi injection matching

* remove unneeded

* protect export endpoints

* protect event endpoints

* protect media endpoints

* update auth hook for allowed cameras

* update default app view

* ensure anonymous user always returns all cameras

* limit cameras in explore

* cameras is already a list

* limit cameras in review/history

* limit cameras in live view

* limit cameras in camera groups

* only show face library and classification in sidebar for admin

* remove check in delete reviews

since admin role is required, no need to check camera access. fixes failing test

* pass request with camera access for tests

* more async

* camera access tests

* fix proxy auth tests

* allowed cameras for review tests

* combine event tests and refactor for camera access

* fix post validation for roles

* don't limit roles in create user dialog

* fix triggers endpoints

no need to run require camera access dep since the required role is admin

* fix type

* create and edit role dialogs

* delete role dialog

* fix role change dialog

* update settings view for roles

* i18n changes

* minor spacing tweaks

* docs

* use badges and camera name label component

* clarify docs

* display all cameras badge for admin and viewer

* i18n fix

* use validator to prevent reserved and empty roles from being assigned

* split users and roles into separate tabs in settings

* tweak docs

* clarify docs

* change icon

* don't memoize roles

always recalculate on component render
2025-09-12 05:19:29 -06:00
Nicolas Mowen
ba650af6f2
Correctly cast to enum when loading plus config (#20031) 2025-09-11 16:39:34 -06:00
Nicolas Mowen
fad28a764c
Use CUDA graphs for object detection on Nvidia GPUs (#20027)
* Use CUDA graphs to improve efficiency of object detection

* Cleanup comments and typing
2025-09-11 10:20:25 -06:00
Nicolas Mowen
7c7ff49b90
Improve d-fine model export docs (#20020) 2025-09-11 06:17:08 -05:00
Nicolas Mowen
15729e0f19
Provide model type in header for ZMQ detector (#20000)
* Provide model type in header

* Formatting
2025-09-09 17:53:36 -05:00
Nicolas Mowen
037c4d1cc0
Don't block UI while pulling the stream live info (#19998) 2025-09-09 17:53:26 -05:00
laviddichterman
1613499218
Update object_detectors.md to document configuring image size in YOLO 9 (#19951)
* Update object_detectors.md for v16

* add configurability to IMG_SIZE for YOLOv9 export
* remove TensorRT detector as it's no longer supported in v16

* Revert removing NVIDIA TensorRT detector docs

Added documentation for NVidia TensorRT Detector, including model generation, configuration parameters, and example usage.

* Dumb copy/paste

* Enhance YOLOv9 export instructions in documentation

Updated YOLOv9 export command to include IMG_SIZE parameter and clarified model size options.
2025-09-09 14:27:30 -06:00
Nicolas Mowen
205fdf3ae3
Fixes (#19984)
* Always handle RKNN as NHWC in Frigate+ model loading

* Correct Intel stats

* Update inference time docs

* Update version

* Adjust inference speeds
2025-09-09 06:17:56 -06:00
Nicolas Mowen
f46f8a2160
More inference speed updates (#19974) 2025-09-08 10:39:33 -06:00
Josh Hawkins
880902cdd7
Add specific notes for frigate+ models in object detector docs (#19971) 2025-09-08 09:29:03 -05:00
Nicolas Mowen
c5ed95ec52
More inference speed updates (#19947)
* More inference speed updates

* Update hardware.md

* Update hardware.md

* Update index.md

* More inference speeds

* Update home-assistant.md

* Update object_detectors.md

* Update first_model.md
2025-09-08 07:43:04 -05:00
Josh Hawkins
751de141d5
Fix model selection type in Frigate+ settings pane (#19952)
* model type does not need to match config model type

As long as a model is supported by a detector, it should be available in the list

* fix missing semicolon

the web linter was complaining
2025-09-07 19:19:40 -06:00
Nicolas Mowen
0eb441fe50
Update inference times for yolov9 (#19946) 2025-09-07 14:59:48 -05:00
Josh Hawkins
7566aecb0b
Add note about Apple Silicon support in 0.17 (#19944) 2025-09-07 14:12:49 -05:00
Blake Blackshear
60714a733e
update docs for Frigate+ yolov9 (#19938)
* update docs for Frigate+ yolov9

* footnote memryx suport

* tweaks
2025-09-07 06:01:10 -05:00
Josh Hawkins
d7f7cd7be1
best thumbnail endpoint should pass correct extension param (#19930) 2025-09-05 06:33:57 -05:00
GuoQing Liu
6591210050
docs: fix reolink camera table display (#19926) 2025-09-05 06:01:26 -05:00
Craig
fd6e7afea9
Fix markdown table in camera_specific.md (#19919) 2025-09-05 06:00:51 -05:00
Josh Hawkins
b781f06f9c
Constrain width of export preview dialog (#19908)
Matches the other export preview dialog in Review
2025-09-04 08:08:07 -05:00
Nicolas Mowen
7e7b3288a8
Update live FAQ for camera distortion (#19907)
* Add item to FAQ about stream distortion

* Update updating docs

* Update link
2025-09-04 07:44:33 -05:00
Blake Blackshear
a8b7e5dd24 Merge remote-tracking branch 'origin/master' into dev 2025-09-04 06:33:22 -05:00
Nicolas Mowen
6505ae5fb5
Optimize cuda execution to run in single stream (#19896) 2025-09-03 08:53:30 -05:00
Nicolas Mowen
fe3eb24dfe
Update Reolink support docs (#19887) 2025-09-02 15:21:18 -05:00
Nicolas Mowen
e664cb2285
Set lower bound on retry interval (#19883) 2025-09-02 11:24:25 -05:00
Josh Hawkins
62047c80d5
Poll for camera status on tracking end instead of waiting (#19879) 2025-09-02 06:17:01 -06:00
Josh Hawkins
198e53bd42
Fix stream stats display (#19874)
* Fix stats calculations and labels

* fix linter from complaining

* fix mse calc

* label
2025-09-01 19:23:44 -05:00
Josh Hawkins
f7ed8b4cab
Autotracking improvements (#19873)
* Use asyncio lock when checking camera status

get_camera_status() can be called during normal autotracking movement and from routine camera_maintenance(). Some cameras cause one of the status calls to hang, which then subsequently hangs autotracking. A lock serializes access and prevents the hang.

* use while loop in camera_maintenance for status check

some cameras seem to take a little bit to update their status, don't assume the first call shows the motor has stopped
2025-09-01 19:18:50 -05:00
Dan
91d3a7b245 format MQTT code with ruff 2025-09-01 18:12:51 -04:00
Dan
44c07aac12 fix mypy errors with improved MQTT reliability implementation
- Add _reason_info helper method to extract reason names safely
- Update connect/disconnect callbacks to use string comparison instead of numeric
- Fix type annotations with proper Optional[Client] typing
- Resolve unreachable code warnings with type ignore comments for threading
- Improve error handling with robust try/finally blocks in stop method
- Maintain fresh client creation approach for reliable reconnection

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-01 18:08:01 -04:00
Josh Hawkins
bd255362d6
Ensure proxy group claim uses the configured separator character (#19869)
* Ensure group claim uses the configured separator character

* refactor to helper function

* tests

* clean up
2025-09-01 15:30:30 -06:00
Dan
3952035579 format MQTT code with ruff 2025-09-01 15:54:48 -04:00
Dan
a45915517f improve MQTT reconnection with fresh client creation approach
- Replace client.reconnect() with fresh client creation for each retry attempt
- Add proper cleanup of old client before creating new one
- Enhanced logging with detailed debugging info for disconnect reasons
- Use proven aiomqtt-style retry pattern for better reliability
- Each reconnection attempt now creates completely new MQTT client instance

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-01 15:32:04 -04:00
Josh Hawkins
55160f9235 fix more merge conflicts 2025-09-01 13:51:29 -05:00
Sergejs Romancevičs
8e7f0cfd51 Translated using Weblate (Russian)
Currently translated at 100.0% (118 of 118 strings)

Translation: Frigate NVR/views-system
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-system/ru/
2025-09-01 13:42:09 -05:00
Artyom Rybakov
9fd07bde48 Translated using Weblate (Russian)
Currently translated at 100.0% (118 of 118 strings)

Translation: Frigate NVR/views-system
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-system/ru/
2025-09-01 13:42:09 -05:00
Sergejs Romancevičs
efe707510e Translated using Weblate (Russian)
Currently translated at 100.0% (427 of 427 strings)

Translation: Frigate NVR/views-settings
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-settings/ru/
2025-09-01 13:42:09 -05:00
Artyom Rybakov
4cca09410f Translated using Weblate (Russian)
Currently translated at 100.0% (427 of 427 strings)

Translation: Frigate NVR/views-settings
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-settings/ru/
2025-09-01 13:42:09 -05:00
Artyom Rybakov
cc270e7d1e Translated using Weblate (Russian)
Currently translated at 100.0% (72 of 72 strings)

Translation: Frigate NVR/components-filter
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-filter/ru/
2025-09-01 13:42:09 -05:00
Artyom Rybakov
bba22bd456 Translated using Weblate (Russian)
Currently translated at 100.0% (46 of 46 strings)

Translation: Frigate NVR/components-camera
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-camera/ru/
2025-09-01 13:42:09 -05:00
Hosted Weblate
ecfe4448c8 Translated using Weblate (Swedish)
Currently translated at 46.1% (197 of 427 strings)

Translated using Weblate (Swedish)

Currently translated at 49.8% (213 of 427 strings)

Translated using Weblate (Swedish)

Currently translated at 100.0% (118 of 118 strings)

Translated using Weblate (Swedish)

Currently translated at 43.3% (185 of 427 strings)

Translated using Weblate (Swedish)

Currently translated at 47.3% (202 of 427 strings)

Translated using Weblate (Swedish)

Currently translated at 42.3% (181 of 427 strings)

Translated using Weblate (Swedish)

Currently translated at 42.3% (181 of 427 strings)

Translated using Weblate (Swedish)

Currently translated at 100.0% (72 of 72 strings)

Translated using Weblate (Swedish)

Currently translated at 100.0% (46 of 46 strings)

Translated using Weblate (Swedish)

Currently translated at 44.9% (192 of 427 strings)

Translated using Weblate (Swedish)

Currently translated at 44.9% (192 of 427 strings)

Translated using Weblate (Swedish)

Currently translated at 100.0% (116 of 116 strings)

Translated using Weblate (Swedish)

Currently translated at 33.6% (143 of 425 strings)

Translated using Weblate (Swedish)

Currently translated at 100.0% (122 of 122 strings)

Translated using Weblate (Swedish)

Currently translated at 100.0% (192 of 192 strings)

Translated using Weblate (Swedish)

Currently translated at 40.0% (171 of 427 strings)

Translated using Weblate (Swedish)

Currently translated at 99.1% (115 of 116 strings)

Translated using Weblate (Swedish)

Currently translated at 27.3% (115 of 420 strings)

Translated using Weblate (Swedish)

Currently translated at 94.2% (115 of 122 strings)

Translated using Weblate (Swedish)

Currently translated at 95.8% (184 of 192 strings)

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Kristian Johansson <knmjohansson@gmail.com>
Co-authored-by: revellion <revellion@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/audio/sv/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/common/sv/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-camera/sv/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-filter/sv/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-explore/sv/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-settings/sv/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-system/sv/
Translation: Frigate NVR/audio
Translation: Frigate NVR/common
Translation: Frigate NVR/components-camera
Translation: Frigate NVR/components-filter
Translation: Frigate NVR/views-explore
Translation: Frigate NVR/views-settings
Translation: Frigate NVR/views-system
2025-09-01 13:42:09 -05:00
Hosted Weblate
4d0982e9b0 Translated using Weblate (French)
Currently translated at 100.0% (118 of 118 strings)

Translated using Weblate (French)

Currently translated at 100.0% (427 of 427 strings)

Translated using Weblate (French)

Currently translated at 100.0% (118 of 118 strings)

Translated using Weblate (French)

Currently translated at 100.0% (61 of 61 strings)

Translated using Weblate (French)

Currently translated at 100.0% (427 of 427 strings)

Translated using Weblate (French)

Currently translated at 100.0% (46 of 46 strings)

Translated using Weblate (French)

Currently translated at 100.0% (72 of 72 strings)

Translated using Weblate (French)

Currently translated at 100.0% (425 of 425 strings)

Translated using Weblate (French)

Currently translated at 100.0% (116 of 116 strings)

Co-authored-by: Apocoloquintose <bertrand.moreux@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-camera/fr/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-filter/fr/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-facelibrary/fr/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-settings/fr/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-system/fr/
Translation: Frigate NVR/components-camera
Translation: Frigate NVR/components-filter
Translation: Frigate NVR/views-facelibrary
Translation: Frigate NVR/views-settings
Translation: Frigate NVR/views-system
2025-09-01 13:42:09 -05:00