Compare commits

...

38 Commits

Author SHA1 Message Date
Martin Weinelt
e16763cff9 Fallback from tflite-runtime to ai-edge-litert (#21876)
The fallback to tensorflow was established back in 2023, because we could
not provide tflite-runtime downstream in nixpkgs.

By now we have ai-edge-litert available, which is the successor to the
tflite-runtime. It still provides the same entrypoints as tflite-runtime
and functionality has been verified in multiple deployments for the last
two weeks.
2026-02-26 21:55:29 -07:00
Felipe Santos
b88186983a Increase maximum stream timeout to 15s (#21936)
* Increase maximum stream timeout to 15s

* Use predefined intervals instead for the stream timeout
2026-02-26 21:54:00 -07:00
Martin Weinelt
b4eac11cbd Clean up trailing whitespaces in cpu stats process cmdline (#22089)
The psutil library reads the process commandline as by opening
/proc/pid/cmdline which returns a buffer that is larger than just the
program cmdline due to rounded memory allocation sizes.

That means that if the library does not detect a Null-terminated string
it keeps appending empty strings which add up as whitespaces when joined.
2026-02-26 21:53:26 -07:00
Nicolas Mowen
9c3a74b4f5 Cleanup 2026-02-26 21:27:56 -07:00
Nicolas Mowen
91714b8743 Remove exceptions 2026-02-26 21:27:56 -07:00
Nicolas Mowen
e5087b092d Fix frame time access 2026-02-26 21:27:56 -07:00
Nicolas Mowen
5f02e33e55 Adapt to new Gemini format 2026-02-26 21:27:56 -07:00
nulledy
84760c42cb ffmpeg Preview Segment Optimization for "high" and "very_high" (#21996)
* Introduce qmax parameter for ffmpeg preview encoding

Added PREVIEW_QMAX_PARAM to control ffmpeg encoding quality.

* formatting

* Fix spacing in qmax parameters for preview quality
2026-02-26 21:27:56 -07:00
nulledy
bb6e889449 Allow API Events to be Detections or Alerts, depending on the Event Label (#21923)
* - API created events will be alerts OR detections, depending on the event label, defaulting to alerts
- Indefinite API events will extend the recording segment until those events are ended
- API event start time is the actual start time, instead of having a pre-buffer of record.event_pre_capture

* Instead of checking for indefinite events on a camera before deciding if we should end the segment, only update last_detection_time and last_alert_time if frame_time is greater, which should have the same effect

* Add the ability to set a pre_capture number of seconds when creating a manual event via the API. Default behavior unchanged

* Remove unnecessary _publish_segment_start() call

* Formatting

* handle last_alert_time or last_detection_time being None when checking them against the frame_time

* comment manual_info["label"].split(": ")[0] for clarity
2026-02-26 21:27:56 -07:00
Josh Hawkins
12506f8c80 Improve jsmpeg player websocket handling (#21943)
* improve jsmpeg player websocket handling

prevent websocket console messages from appearing when player is destroyed

* reformat files after ruff upgrade
2026-02-26 21:27:56 -07:00
FL42
fef1fb36cc feat: add X-Frame-Time when returning snapshot (#21932)
Co-authored-by: Florent MORICONI <170678386+fmcloudconsulting@users.noreply.github.com>
2026-02-26 21:27:56 -07:00
Eric Work
2db0269825 Add networking options for configuring listening ports (#21779) 2026-02-26 21:27:56 -07:00
Nicolas Mowen
a4362caa0a Add live context tool to LLM (#21754)
* Add live context tool

* Improve handling of images in request

* Improve prompt caching
2026-02-26 21:27:56 -07:00
Nicolas Mowen
fa0feebd03 Update to ROCm 7.2.0 (#21753)
* Update to ROCm 7.2.0

* ROCm now works properly with JinaV1

* Arcface has compilation error
2026-02-26 21:27:56 -07:00
Josh Hawkins
c78ab2dc87 Offline preview image (#21752)
* use latest preview frame for latest image when camera is offline

* remove frame extraction logic

* tests

* frontend

* add description to api endpoint
2026-02-26 21:27:56 -07:00
Nicolas Mowen
e76b48f98b Implement LLM Chat API with tool calling support (#21731)
* Implement initial tools definiton APIs

* Add initial chat completion API with tool support

* Implement other providers

* Cleanup
2026-02-26 21:27:56 -07:00
John Shaw
af2339b35c Remove parents in remove_empty_directories (#21726)
The original implementation did a full directory tree walk to find and remove
empty directories, so this implementation should remove the parents as well,
like the original did.
2026-02-26 21:27:56 -07:00
Nicolas Mowen
9b7cee18db Implement llama.cpp GenAI Provider (#21690)
* Implement llama.cpp GenAI Provider

* Add docs

* Update links

* Fix broken mqtt links

* Fix more broken anchors
2026-02-26 21:27:56 -07:00
John Shaw
d3260e34b6 Optimize empty directory cleanup for recordings (#21695)
The previous empty directory cleanup did a full recursive directory
walk, which can be extremely slow. This new implementation only removes
directories which have a chance of being empty due to a recent file
deletion.
2026-02-26 21:27:56 -07:00
Nicolas Mowen
ee2c96c793 Refactor Time-Lapse Export (#21668)
* refactor time lapse creation to be a separate API call with ability to pass arbitrary ffmpeg args

* Add CPU fallback
2026-02-26 21:27:56 -07:00
Eugeny Tulupov
542295dcb3 Update go2rtc to v1.9.13 (#21648)
Co-authored-by: Eugeny Tulupov <eugeny.tulupov@spirent.com>
2026-02-26 21:27:56 -07:00
Josh Hawkins
56c7a13fbe Fix incorrect counting in sync_recordings (#21626) 2026-02-26 21:27:56 -07:00
Josh Hawkins
88348bf535 use same logging pattern in sync_recordings as the other sync functions (#21625) 2026-02-26 21:27:56 -07:00
Josh Hawkins
b66e69efc9 Media sync API refactor and UI (#21542)
* generic job infrastructure

* types and dispatcher changes for jobs

* save data in memory only for completed jobs

* implement media sync job and endpoints

* change logs to debug

* websocket hook and types

* frontend

* i18n

* docs tweaks

* endpoint descriptions

* tweak docs
2026-02-26 21:27:56 -07:00
Josh Hawkins
63e7bf8b28 Add media sync API endpoint (#21526)
* add media cleanup functions

* add endpoint

* remove scheduled sync recordings from cleanup

* move to utils dir

* tweak import

* remove sync_recordings and add config migrator

* remove sync_recordings

* docs

* remove key

* clean up docs

* docs fix

* docs tweak
2026-02-26 21:27:56 -07:00
Nicolas Mowen
39ad565f81 Add API to handle deleting recordings (#21520)
* Add recording delete API

* Re-organize recordings apis

* Fix import

* Consolidate query types
2026-02-26 21:27:56 -07:00
Nicolas Mowen
9ef8b70208 Exports Improvements (#21521)
* Add images to case folder view

* Add ability to select case in export dialog

* Add to mobile review too
2026-02-26 21:27:56 -07:00
Nicolas Mowen
6b77952b72 Add support for GPU and NPU temperatures (#21495)
* Add rockchip temps

* Add support for GPU and NPU temperatures in the frontend

* Add support for Nvidia temperature

* Improve separation

* Adjust graph scaling
2026-02-26 21:27:56 -07:00
Andrew Roberts
3745f5ff93 Camera-specific hwaccel settings for timelapse exports (correct base) (#21386)
* added hwaccel_args to camera.record.export config struct

* populate camera.record.export.hwaccel_args with a cascade up to camera then global if 'auto'

* use new hwaccel args in export

* added documentation for camera-specific hwaccel export

* fix c/p error

* missed an import

* fleshed out the docs and comments a bit

* ruff lint

* separated out the tips in the doc

* fix documentation

* fix and simplify reference config doc
2026-02-26 21:27:56 -07:00
Nicolas Mowen
3297cab347 Refactor temperature reporting for detectors and implement Hailo temp reading (#21395)
* Add Hailo temperature retrieval

* Refactor `get_hailo_temps()` to use ctxmanager

* Show Hailo temps in system UI

* Move hailo_platform import to get_hailo_temps

* Refactor temperatures calculations to use within detector block

* Adjust webUI to handle new location

---------

Co-authored-by: tigattack <10629864+tigattack@users.noreply.github.com>
2026-02-26 21:27:56 -07:00
Nicolas Mowen
fc3545310c Export filter UI (#21322)
* Get started on export filters

* implement basic filter

* Implement filtering and adjust api

* Improve filter handling

* Improve navigation

* Cleanup

* handle scrolling
2026-02-26 21:27:56 -07:00
Josh Hawkins
dde738cfdc Camera connection quality indicator (#21297)
* add camera connection quality metrics and indicator

* formatting

* move stall calcs to watchdog

* clean up

* change watchdog to 1s and separately track time for ffmpeg retry_interval

* implement status caching to reduce message volume
2026-02-26 21:27:56 -07:00
Nicolas Mowen
004bb7d80d Case management UI (#21299)
* Refactor export cards to match existing cards in other UI pages

* Show cases separately from exports

* Add proper filtering and display of cases

* Add ability to edit and select cases for exports

* Cleanup typing

* Hide if no unassigned

* Cleanup hiding logic

* fix scrolling

* Improve layout
2026-02-26 21:27:56 -07:00
Josh Hawkins
85feb4edcb refactor vainfo to search for first GPU (#21296)
use existing LibvaGpuSelector to pick appropritate libva device
2026-02-26 21:27:56 -07:00
Nicolas Mowen
cffa54c80d implement case management for export apis (#21295) 2026-02-26 21:27:56 -07:00
Nicolas Mowen
48164f6dfc Create scaffolding for case management (#21293) 2026-02-26 21:27:56 -07:00
Nicolas Mowen
bc457743b6 Update version 2026-02-26 21:27:56 -07:00
Nicolas Mowen
451d6f5c22 Revert "Early 0.18 work (#22138)" (#22142)
This reverts commit d24b96d3bb.
2026-02-26 21:27:31 -07:00
9 changed files with 11 additions and 11 deletions

View File

@@ -22,7 +22,7 @@ from .api import RealTimeProcessorApi
try:
from tflite_runtime.interpreter import Interpreter
except ModuleNotFoundError:
from tensorflow.lite.python.interpreter import Interpreter
from ai_edge_litert.interpreter import Interpreter
logger = logging.getLogger(__name__)

View File

@@ -32,7 +32,7 @@ from .api import RealTimeProcessorApi
try:
from tflite_runtime.interpreter import Interpreter
except ModuleNotFoundError:
from tensorflow.lite.python.interpreter import Interpreter
from ai_edge_litert.interpreter import Interpreter
logger = logging.getLogger(__name__)
@@ -76,7 +76,7 @@ class CustomStateClassificationProcessor(RealTimeProcessorApi):
try:
from tflite_runtime.interpreter import Interpreter
except ModuleNotFoundError:
from tensorflow.lite.python.interpreter import Interpreter
from ai_edge_litert.interpreter import Interpreter
model_path = os.path.join(self.model_dir, "model.tflite")
labelmap_path = os.path.join(self.model_dir, "labelmap.txt")

View File

@@ -6,7 +6,7 @@ import numpy as np
try:
from tflite_runtime.interpreter import Interpreter, load_delegate
except ModuleNotFoundError:
from tensorflow.lite.python.interpreter import Interpreter, load_delegate
from ai_edge_litert.interpreter import Interpreter, load_delegate
logger = logging.getLogger(__name__)

View File

@@ -12,7 +12,7 @@ from ..detector_utils import tflite_detect_raw, tflite_init
try:
from tflite_runtime.interpreter import Interpreter
except ModuleNotFoundError:
from tensorflow.lite.python.interpreter import Interpreter
from ai_edge_litert.interpreter import Interpreter
logger = logging.getLogger(__name__)

View File

@@ -13,7 +13,7 @@ from frigate.detectors.detector_config import BaseDetectorConfig, ModelTypeEnum
try:
from tflite_runtime.interpreter import Interpreter, load_delegate
except ModuleNotFoundError:
from tensorflow.lite.python.interpreter import Interpreter, load_delegate
from ai_edge_litert.interpreter import Interpreter, load_delegate
logger = logging.getLogger(__name__)

View File

@@ -17,7 +17,7 @@ from .base_embedding import BaseEmbedding
try:
from tflite_runtime.interpreter import Interpreter
except ModuleNotFoundError:
from tensorflow.lite.python.interpreter import Interpreter
from ai_edge_litert.interpreter import Interpreter
logger = logging.getLogger(__name__)

View File

@@ -43,7 +43,7 @@ from frigate.video import start_or_restart_ffmpeg, stop_ffmpeg
try:
from tflite_runtime.interpreter import Interpreter
except ModuleNotFoundError:
from tensorflow.lite.python.interpreter import Interpreter
from ai_edge_litert.interpreter import Interpreter
logger = logging.getLogger(__name__)

View File

@@ -121,7 +121,7 @@ def get_cpu_stats() -> dict[str, dict]:
pid = str(process.info["pid"])
try:
cpu_percent = process.info["cpu_percent"]
cmdline = process.info["cmdline"]
cmdline = " ".join(process.info["cmdline"]).rstrip()
with open(f"/proc/{pid}/stat", "r") as f:
stats = f.readline().split()
@@ -155,7 +155,7 @@ def get_cpu_stats() -> dict[str, dict]:
"cpu": str(cpu_percent),
"cpu_average": str(round(cpu_average_usage, 2)),
"mem": f"{mem_pct}",
"cmdline": clean_camera_user_pass(" ".join(cmdline)),
"cmdline": clean_camera_user_pass(cmdline),
}
except Exception:
continue

View File

@@ -196,7 +196,7 @@ export default function UiSettingsView() {
</SelectTrigger>
<SelectContent>
<SelectGroup>
{[1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map((timeout) => (
{[1, 2, 3, 5, 8, 10, 12, 15].map((timeout) => (
<SelectItem
key={timeout}
className="cursor-pointer"