Miscellaneous fixes (#24970)
CI / ARM Build (push) Canceled after 0s
CI / Jetson Jetpack 6 (push) Canceled after 0s
CI / AMD64 Build (push) Canceled after 0s
CI / AMD64 Extra Build (push) Canceled after 0s
CI / AMD64 Smoke Test (push) Canceled after 0s
CI / ARM Extra Build (push) Canceled after 0s
CI / Synaptics Build (push) Canceled after 0s
CI / Assemble and push default build (push) Canceled after 0s

* analytics notifications flag and device grant warnings

- report notifications as on when any camera enables them, not only the global setting
- don't warn about device nodes the runtime users can already use, such as world-rw nodes in an unprivileged LXC

* clarify which stream the All Cameras dashboard uses

* add exception catchall for autotracking calibration

* only default review api after to 24 hours when no bounds are given

The review endpoint replaced a missing or zero `after` with 24 hours ago, so a `before`-only query older than 24 hours returned nothing and `after=0` couldn't mean no lower bound. The default now applies only when neither `before` nor `after` is sent, a `before`-only query has no lower bound, and both bounds use `is not None` checks. The Live dashboard alerts bar sends no bounds and keeps the 24 hour window.
This commit is contained in:
Josh Hawkins
2026-11-14 07:34:17 -07:00
committed by GitHub
parent 0e3dca5915
commit 7fd81171f0
8 changed files with 108 additions and 7 deletions
+29
View File
@@ -193,6 +193,35 @@ class TestAutotrackerPrediction(unittest.TestCase):
self.assertEqual(self._target_box([-1, -2, 1, 2], 0), 0.2)
class TestAutotrackerCalibrationFailure(unittest.IsolatedAsyncioTestCase):
async def test_calibration_failure_disables_autotracking(self) -> None:
tracker = _make_tracker()
camera_config = tracker.config.cameras[CAMERA]
camera_config.onvif.autotracking.calibrate_on_startup = True
tracker.tracked_object_history = {}
tracker.tracked_object_metrics = {}
tracker.move_metrics = {}
tracker.intercept = {}
tracker.move_coefficients = {}
tracker.zoom_time = {}
tracker.move_queues = {}
tracker.move_queue_locks = {}
tracker.onvif.loop = asyncio.get_running_loop()
tracker.onvif.cams = {CAMERA: {"init": True, "features": ["pt-r-fov"]}}
tracker.onvif.get_service_capabilities = AsyncMock(return_value=True)
tracker.onvif.get_camera_status = AsyncMock()
tracker._process_move_queue = AsyncMock()
tracker._calibrate_camera = AsyncMock(side_effect=RuntimeError("disconnected"))
tracker.autotracker_init[CAMERA] = False
with self.assertLogs("frigate.ptz.autotrack", level="ERROR"):
await tracker._autotracker_setup(camera_config, CAMERA, startup=True)
self.assertFalse(camera_config.onvif.autotracking.enabled)
self.assertFalse(tracker.autotracker_init[CAMERA])
self.assertFalse(tracker.calibrating[CAMERA])
class TestAutotrackerMoveQueue(unittest.IsolatedAsyncioTestCase):
async def test_absolute_zoom_does_not_overwrite_the_pan_tilt_sample(self) -> None:
tracker = _make_tracker()