* fix: check HTTP response status before parsing JSON body
upload_image() calls r.json() before checking r.ok. If the server
returns an error response (401, 500, etc) with a non-JSON body,
this raises a confusing JSONDecodeError instead of the intended
'Unable to get signed urls' error message.
Move the r.ok check before the r.json() call.
* style: remove extra blank line for ruff
The name parameter was interpolated directly into the SQL query via
f-string, allowing SQL injection through crafted face name values.
Use a parameterized query with ? placeholder instead.
parse_preset_input() uses input[len(_user_agent_args) + 1] to find
the FPS placeholder, but preset-http-jpeg-generic does not include
_user_agent_args at the start of its list (only preset-http-mjpeg-generic
does). The FPS placeholder '{}' is at index 1, not index 3.
This means the detect_fps value overwrites '-1' (the stream_loop
argument) instead of the '{}' FPS placeholder, so the preset always
uses the literal string '{}' as the framerate.
When hwaccel_args is a list (not a preset string), the fallback in
parse_preset_hardware_acceleration_encode() calls
arg_map["default"].format(input, output) with only 2 positional args.
But PRESETS_HW_ACCEL_ENCODE_BIRDSEYE["default"] contains {0}, {1}, {2}
expecting ffmpeg_path as the first arg.
This causes IndexError: Replacement index 2 out of range for size 2
which crashes create_config.py on every go2rtc start, taking down
all camera streams.
Pass ffmpeg_path as the first argument to match the preset template.
In BirdsEyeFrameManager.__init__(), the numpy slice that copies the
custom logo (transparent_layer from custom.png alpha channel) onto
blank_frame has shape[0] and shape[1] swapped:
blank_frame[y:y+shape[1], x:x+shape[0]] = transparent_layer
shape[0] is rows (height) and shape[1] is cols (width), so the row
range needs shape[0] and the column range needs shape[1]:
blank_frame[y:y+shape[0], x:x+shape[1]] = transparent_layer
The bug is masked for square images where shape[0]==shape[1]. For
non-square images (e.g. 1920x1080), it produces:
ValueError: could not broadcast input array from shape (1080,1920)
into shape (1620,1080)
This silently kills the birdseye output process -- no frames are
written to the FIFO pipe, go2rtc exec ffmpeg times out, and the
birdseye restream shows a black screen with no errors in the UI.
In both expire_snapshots() and expire_clips(), the expired_events
query uses .iterator() for lazy evaluation, but the very next line
calls list(expired_events) inside an f-string for debug logging.
This consumes the entire iterator, so the subsequent for loop that
deletes media files from disk iterates over an exhausted iterator
and processes zero events.
Snapshots and clips for removed cameras are never deleted from disk,
causing gradual disk space exhaustion.
Materialize the iterator into a list before logging so both the
debug message and the cleanup loop use the same data.
The cosine similarity calculation is guarded by:
if not np.any(np.linalg.norm(velocities, axis=1))
This enters the block when ALL velocity norms are zero, then divides
by those zero norms. The condition should check that all norms are
non-zero before computing cosine similarity:
if np.all(np.linalg.norm(velocities, axis=1))
Also fixes debug log that shows average_velocity[0] for both x and y
velocity components (second should be average_velocity[1]).
The connect() function creates a WebSocket but never stores the
reference. The useEffect cleanup only closes the RTCPeerConnection
via pcRef, leaving the WebSocket open.
Each time the component re-renders with changed deps (camera switch,
playback toggle, microphone toggle), a new WebSocket is created
without closing the previous one. This leaks connections until the
browser garbage-collects them or the server times out.
Store the WebSocket in a ref and close it in the cleanup function.
cv2.imread with IMREAD_UNCHANGED loads the image as-is, but the code
unconditionally indexes channel 3 (birdseye_logo[:, :, 3]) assuming
RGBA format. This crashes with IndexError for:
- Grayscale PNGs (2D array, no channel dimension)
- RGB PNGs without alpha (3 channels, no index 3)
- Fully transparent PNGs saved as grayscale+alpha (2 channels)
Handle all image formats:
- 2D (grayscale): use directly as luminance
- 4+ channels (RGBA): extract alpha channel (existing behavior)
- 3 channels (RGB/BGR): convert to grayscale
Also fixes the shape[0]/shape[1] swap in the array slice that breaks
non-square images (related to #6802, #7863).
In BirdsEyeFrameManager.update(), the exception handler on line 756
resets self.active_cameras to [] (a list), but it is initialized as
set() and compared as a set throughout the rest of the code.
Since set() \!= [] evaluates to True even though both are empty, the
next call to update_frame() will incorrectly detect a layout change
and trigger an unnecessary frame rebuild after every exception.
escape_special_characters() returns a ValueError object instead of
raising it when the input path exceeds 1000 characters. The exception
object gets used as a string downstream instead of triggering error
handling.
When an existing tracked object's label or stationary status changes
(e.g. sub_label assignment from face recognition), the update handler
declares a new const newObjects that shadows the outer let newObjects.
The label and stationary mutations apply to the inner copy, but
handleSetObjects on line 148 reads the outer variable which was never
mutated. The update is silently discarded.
Remove the inner declaration so mutations apply to the outer variable
that gets passed to handleSetObjects.
gpu <= len(self._valid_gpus) should be gpu < len(self._valid_gpus).
The list is zero-indexed, so requesting gpu index equal to the list
length causes an IndexError. For example, with 2 valid GPUs (indices
0 and 1), requesting gpu=2 passes the check (2 <= 2) but
self._valid_gpus[2] is out of bounds.
The condition:
topic == DetectionTypeEnum.api.value or DetectionTypeEnum.lpr.value
evaluates as:
(topic == DetectionTypeEnum.api.value) or (DetectionTypeEnum.lpr.value)
Since DetectionTypeEnum.lpr.value is a non-empty string (truthy), the
second operand is always True regardless of topic. The intended check
is whether topic matches either enum value:
topic == DetectionTypeEnum.api.value or topic == DetectionTypeEnum.lpr.value
* fix double scrollbar in debug replay
* always hide ffmpeg cpu warnings for replay cameras
* add slovenian
* fix motion previews on safari and ios
match the logic used in ScrubbablePreview for manually stepping currentTime at the correct rate
* prevent motion recalibration when opening motion tuner
* add shm frame lifetime calculation and update UI for shared memory metrics
* consistent sizing on activity indicator in save buttons
* fix offline overlay overflowing on mobile when in grid mode
asyncio.SubprocessError does not exist — Python's asyncio module has no
such class. The correct exception is subprocess.SubprocessError, which
is available via the existing `import subprocess as sp` alias already
present in this file.
The invalid exception reference causes the except clause to raise a
NameError rather than catching the intended exception.
* refactor websockets to remove react-tracked
react 19 removed useReducer eager bailout, which broke react-tracked.
react-tracked works by wrapping state in a JavaScript Proxy. When a component reads state.someField, the proxy records that access. On the next state update, it compares only the fields each component actually touched and skips re-renders if those fields are unchanged. Under the hood, this relies on useReducer — and in React 18, useReducer had an "eager bail-out" that short-circuited rendering when the new state was === to the old state. React 19 removed that optimization, so every dispatch now schedules a render regardless, and the proxy comparison runs too late to prevent it.
useSyncExternalStore is a React primitive (added in 18, stable in 19) designed for exactly this pattern: subscribing to an external store:
useSyncExternalStore(
subscribe, // (listener) => unsubscribe — called when the store changes
getSnapshot // () => value — returns the current value for this subscriber
)
React calls getSnapshot during render and compares the result with Object.is. If the value is the same reference, the component bails out — no re-render. The key difference from react-tracked is that this bail-out is built into React's reconciler, not bolted on via proxy tricks and useReducer.
The per-topic subscription model makes this efficient. Instead of one global store where every subscriber has to check if their fields changed, each useWs("some/topic", ...) call subscribes only to that topic's listener set. When a message arrives for front_door/detect/state, only components subscribed to that exact topic get their listener fired → React calls their getSnapshot → Object.is compares the value → bail-out if unchanged. Components watching back_yard/detect/state are never even notified.
* remove react-tracked and react-use-websocket
* refactor usePolygonStates to use ws topic subscription
* fix TimeAgo refresh interval always returning 1s due to unit mismatch (seconds vs milliseconds)
older events now correctly refresh every minute/hour instead of every second
* simplify
* clean up
* don't resend onconnect
* clean up
* remove patch
* Improve title to better capture activity
* Improve efficiency of prompt
* Use json format for llama.cpp
* Cleanup prompt
* Add output format for other LLMs
Currently translated at 24.7% (268 of 1084 strings)
Translated using Weblate (Cantonese (Traditional Han script))
Currently translated at 63.5% (297 of 467 strings)
Translated using Weblate (Cantonese (Traditional Han script))
Currently translated at 100.0% (58 of 58 strings)
Translated using Weblate (Cantonese (Traditional Han script))
Currently translated at 100.0% (230 of 230 strings)
Translated using Weblate (Cantonese (Traditional Han script))
Currently translated at 86.9% (147 of 169 strings)
Added translation using Weblate (Cantonese (Traditional Han script))
Update translation files
Updated by "Squash Git commits" add-on in Weblate.
Added translation using Weblate (Cantonese (Traditional Han script))
Added translation using Weblate (Cantonese (Traditional Han script))
Translated using Weblate (Cantonese (Traditional Han script))
Currently translated at 0.2% (1 of 464 strings)
Added translation using Weblate (Cantonese (Traditional Han script))
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Languages add-on <noreply-addon-languages@weblate.org>
Co-authored-by: beginner2047 <leoywng44@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/common/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/common/yue_Hant/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-dialog/yue_Hant/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-cameras/yue_Hant/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-global/yue_Hant/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-system/yue_Hant/
Translation: Frigate NVR/Config - Cameras
Translation: Frigate NVR/Config - Global
Translation: Frigate NVR/common
Translation: Frigate NVR/components-dialog
Translation: Frigate NVR/views-system
Update translation files
Updated by "Squash Git commits" add-on in Weblate.
Added translation using Weblate (Korean)
Added translation using Weblate (Korean)
Added translation using Weblate (Korean)
Translated using Weblate (Korean)
Currently translated at 86.2% (50 of 58 strings)
Translated using Weblate (Korean)
Currently translated at 99.5% (227 of 228 strings)
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: John <john@akfn.net>
Co-authored-by: Languages add-on <noreply-addon-languages@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/common/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/common/ko/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-dialog/ko/
Translation: Frigate NVR/common
Translation: Frigate NVR/components-dialog
Update translation files
Updated by "Squash Git commits" add-on in Weblate.
Added translation using Weblate (Persian)
Added translation using Weblate (Persian)
Added translation using Weblate (Persian)
Translated using Weblate (Persian)
Currently translated at 99.0% (215 of 217 strings)
Co-authored-by: Amir reza Irani ali poor <amir1376irani@yahoo.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Languages add-on <noreply-addon-languages@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/common/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/common/fa/
Translation: Frigate NVR/common
Update translation files
Updated by "Squash Git commits" add-on in Weblate.
Added translation using Weblate (Swedish)
Added translation using Weblate (Swedish)
Added translation using Weblate (Swedish)
Translated using Weblate (Swedish)
Currently translated at 96.5% (56 of 58 strings)
Translated using Weblate (Swedish)
Currently translated at 92.5% (136 of 147 strings)
Translated using Weblate (Swedish)
Currently translated at 95.1% (217 of 228 strings)
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Languages add-on <noreply-addon-languages@weblate.org>
Co-authored-by: ThomasW <thomas.wursig@remote24.se>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/common/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/common/sv/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-dialog/sv/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-system/sv/
Translation: Frigate NVR/common
Translation: Frigate NVR/components-dialog
Translation: Frigate NVR/views-system
Currently translated at 0.1% (1 of 1082 strings)
Translated using Weblate (French)
Currently translated at 4.0% (1 of 25 strings)
Translated using Weblate (French)
Currently translated at 4.5% (1 of 22 strings)
Added translation using Weblate (French)
Update translation files
Updated by "Squash Git commits" add-on in Weblate.
Added translation using Weblate (French)
Added translation using Weblate (French)
Translated using Weblate (French)
Currently translated at 80.4% (720 of 895 strings)
Translated using Weblate (French)
Currently translated at 99.5% (227 of 228 strings)
Translated using Weblate (French)
Currently translated at 33.1% (154 of 464 strings)
Translated using Weblate (French)
Currently translated at 100.0% (147 of 147 strings)
Added translation using Weblate (French)
Translated using Weblate (French)
Currently translated at 100.0% (58 of 58 strings)
Translated using Weblate (French)
Currently translated at 100.0% (23 of 23 strings)
Translated using Weblate (French)
Currently translated at 93.8% (138 of 147 strings)
Translated using Weblate (French)
Currently translated at 96.4% (220 of 228 strings)
Translated using Weblate (French)
Currently translated at 81.0% (716 of 883 strings)
Co-authored-by: Apocoloquintose <bertrand.moreux@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Languages add-on <noreply-addon-languages@weblate.org>
Co-authored-by: eepy-furry <eepy-furry@users.noreply.hosted.weblate.org>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/common/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/common/fr/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-dialog/fr/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-cameras/fr/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-global/fr/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-groups/fr/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-validation/fr/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-exports/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/Config - Cameras
Translation: Frigate NVR/Config - Global
Translation: Frigate NVR/Config - Groups
Translation: Frigate NVR/Config - Validation
Translation: Frigate NVR/common
Translation: Frigate NVR/components-dialog
Translation: Frigate NVR/views-exports
Translation: Frigate NVR/views-settings
Translation: Frigate NVR/views-system
Currently translated at 2.9% (14 of 467 strings)
Translated using Weblate (Spanish)
Currently translated at 73.9% (17 of 23 strings)
Translated using Weblate (Spanish)
Currently translated at 72.1% (660 of 915 strings)
Translated using Weblate (Spanish)
Currently translated at 83.4% (141 of 169 strings)
Translated using Weblate (Spanish)
Currently translated at 56.0% (14 of 25 strings)
Translated using Weblate (Spanish)
Currently translated at 69.5% (16 of 23 strings)
Translated using Weblate (Spanish)
Currently translated at 73.1% (655 of 896 strings)
Translated using Weblate (Spanish)
Currently translated at 2.8% (13 of 464 strings)
Translated using Weblate (Spanish)
Currently translated at 1.7% (19 of 1082 strings)
Translated using Weblate (Spanish)
Currently translated at 63.6% (14 of 22 strings)
Translated using Weblate (Spanish)
Currently translated at 0.8% (9 of 1082 strings)
Translated using Weblate (Spanish)
Currently translated at 65.2% (15 of 23 strings)
Translated using Weblate (Spanish)
Currently translated at 81.0% (137 of 169 strings)
Translated using Weblate (Spanish)
Currently translated at 28.0% (7 of 25 strings)
Translated using Weblate (Spanish)
Currently translated at 1.0% (5 of 464 strings)
Translated using Weblate (Spanish)
Currently translated at 31.8% (7 of 22 strings)
Added translation using Weblate (Spanish)
Update translation files
Updated by "Squash Git commits" add-on in Weblate.
Added translation using Weblate (Spanish)
Added translation using Weblate (Spanish)
Added translation using Weblate (Spanish)
Co-authored-by: Gerard Ricart Castells <gerard.ricart@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Jorge Sandi <jorensanbar+weblate@gmail.com>
Co-authored-by: Languages add-on <noreply-addon-languages@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/common/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-cameras/es/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-global/es/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-groups/es/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-validation/es/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-exports/es/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-settings/es/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-system/es/
Translation: Frigate NVR/Config - Cameras
Translation: Frigate NVR/Config - Global
Translation: Frigate NVR/Config - Groups
Translation: Frigate NVR/Config - Validation
Translation: Frigate NVR/common
Translation: Frigate NVR/views-exports
Translation: Frigate NVR/views-settings
Translation: Frigate NVR/views-system
Currently translated at 13.7% (64 of 464 strings)
Translated using Weblate (Dutch)
Currently translated at 13.5% (63 of 464 strings)
Translated using Weblate (Dutch)
Currently translated at 4.7% (51 of 1082 strings)
Added translation using Weblate (Dutch)
Update translation files
Updated by "Squash Git commits" add-on in Weblate.
Added translation using Weblate (Dutch)
Added translation using Weblate (Dutch)
Added translation using Weblate (Dutch)
Translated using Weblate (Dutch)
Currently translated at 100.0% (58 of 58 strings)
Translated using Weblate (Dutch)
Currently translated at 100.0% (23 of 23 strings)
Translated using Weblate (Dutch)
Currently translated at 74.9% (671 of 895 strings)
Translated using Weblate (Dutch)
Currently translated at 93.1% (137 of 147 strings)
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Languages add-on <noreply-addon-languages@weblate.org>
Co-authored-by: Marijn <168113859+Marijn0@users.noreply.github.com>
Co-authored-by: Paul Bröerken <broerken@me.com>
Co-authored-by: marcel vanrooden <marcelvanrooden@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/common/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-dialog/nl/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-cameras/nl/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-global/nl/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-exports/nl/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-settings/nl/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-system/nl/
Translation: Frigate NVR/Config - Cameras
Translation: Frigate NVR/Config - Global
Translation: Frigate NVR/common
Translation: Frigate NVR/components-dialog
Translation: Frigate NVR/views-exports
Translation: Frigate NVR/views-settings
Translation: Frigate NVR/views-system
Update translation files
Updated by "Squash Git commits" add-on in Weblate.
Added translation using Weblate (Italian)
Added translation using Weblate (Italian)
Added translation using Weblate (Italian)
Translated using Weblate (Italian)
Currently translated at 100.0% (228 of 228 strings)
Translated using Weblate (Italian)
Currently translated at 100.0% (58 of 58 strings)
Translated using Weblate (Italian)
Currently translated at 100.0% (23 of 23 strings)
Translated using Weblate (Italian)
Currently translated at 100.0% (147 of 147 strings)
Co-authored-by: Gringo <ita.translations@tiscali.it>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Languages add-on <noreply-addon-languages@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/common/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/common/it/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-dialog/it/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-exports/it/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-system/it/
Translation: Frigate NVR/common
Translation: Frigate NVR/components-dialog
Translation: Frigate NVR/views-exports
Translation: Frigate NVR/views-system