When an IPv6 address that doesn't map to an IPv4 address was checked
against an IPv4 trusted proxy, we'd hit an exception because
ip.ipv4_mapped was None. Fix this by verifying ipv4_mapped is not None
Co-authored-by: me <me@me>
* Fix showing review items that span over multiple days
* Simplify
* Fix tests
* Fix unchanged value
* Allow admin as default role and viewer as passed header for proxy auth
---------
Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
* fix i18n keys
* hide disable from context menu for viewers
* Fix auto live check for default dashboard and camera groups
Disabling the Automatic Live View switch in Settings should prevent streaming from occurring. Overriding any settings in a camera group will override the global setting. The check here incorrectly always returned false instead of undefined.
* clarify hardware accelerated enrichments
* clarify
* add note about detect stream to face rec docs
* add note about low end Dahuas for autotracking
* Catch invalid face box / image
* Video tab tweaks
With the changes in https://github.com/blakeblackshear/frigate/pull/18220, the video tab in the Tracked Object Details pane now correctly trims the in-browser HLS video. Because of keyframes and record/detect stream differences, we can manually subtract a couple of seconds from the event start_time to ensure the first few frames aren't cut off from the video
* Clarify
* Don't use Migraphx by default
* Provide better support for running embeddings on GPU
* correctly join cameras
* Adjust blur confidence reduction
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* Only check if an object is stationary to avoid mqtt snapshot
* docs heading tweak
* Add more API descriptions
* Add missing lib for new rocm onnxruntime whl
* Update inference times to reflect better rocm performance
* Cleanup resetting tracked object activity
* remove print
---------
Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
* Add option to not trim clip
* Improve API
* Update snapshot for new best objects
* Fix missing strings
* Convert to separate key
* Always include bounding box on snapshots
* improve autotracking relative zooming time calculation
* update proxy docs to note the need for comma separated header roles
* Add count translation
* tracked object lifecycle i18n fix
* update speed estimation docs
* clarity
* Re-initialize onvif information when toggling camera on live view
* Move time ago to card info and add face area
* Clarify face recognition docs
* Increase minimum face recognition area
* use clipFrom to in vod module endpoint to start at the correct time
* Cleanup media api
* Don't change duration
* Use search detail dialog for face library
* Move to segment based
* Cleanup
* Add back duration modification
* clean up docs
---------
Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
* Fix the `Any` typing hint treewide
There has been confusion between the Any type[1] and the any function[2]
in typing hints.
[1] https://docs.python.org/3/library/typing.html#typing.Any
[2] https://docs.python.org/3/library/functions.html#any
* Fix typing for various frame_shape members
Frame shapes are most likely defined by height and width, so a single int
cannot express that.
* Wrap gpu stats functions in Optional[]
These can return `None`, so they need to be `Type | None`, which is what
`Optional` expresses very nicely.
* Fix return type in get_latest_segment_datetime
Returns a datetime object, not an integer.
* Make the return type of FrameManager.write optional
This is necessary since the SharedMemoryFrameManager.write function can
return None.
* Fix total_seconds() return type in get_tz_modifiers
The function returns a float, not an int.
https://docs.python.org/3/library/datetime.html#datetime.timedelta.total_seconds
* Account for floating point results in to_relative_box
Because the function uses division the return types may either be int or
float.
* Resolve ruff deprecation warning
The config has been split into formatter and linter, and the global
options are deprecated.
* face library i18n fixes
* face library i18n fixes
* add ability to use ctrl/cmd S to save in the config editor
* Use datetime as ID
* Update metrics inference speed to start with 0 ms
* fix android formatted thumbnail
* ensure role is comma separated and stripped correctly
* improve face library deletion
- add a confirmation dialog
- add ability to select all / delete faces in collections
* Implement lazy loading for video previews
* Force GPU for large embedding model
* GPU is required
* settings i18n fixes
* Don't delete train tab
* webpush debugging logs
* Fix incorrectly copying zones
* copy path data
* Ensure that cache dir exists for Frigate+
* face docs update
* Add description to upload image step to clarify the image
* Clean up
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* fix onvif reinitialization
* api docs: clarify usage of clip.mp4 endpoint
* Always show train tab
* Add description to API
* catch lpr model inference exceptions
* always apply motion mask when using yolov9 plate detection
* lpr faq
* fix incorrect focus when reopening search detail dialog on video tab
* only use keyboard listener in face library when train tab is active
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* use async/await instead of asyncio.run()
* fix autotracking
* create cameras in same event loop that will use them
* more debug
* try using existing event loop instead of creating a new one
* merge dev
* fixes
* run get_camera_info onvifcontroller calls in dedicated loop
* move coroutine call with loop to api
* use asyncio for autotracking move queues
* clean up
* fix calibration
* improve exception logging
* frigate+ pane i18n fix
* catch more exceptions
* explore search result tooltip i18n fix
* i18n fix
* remove comments about deprecated strftime_fmt
* Catch producers exists but is None
* Formatting
* fix live camera view i18n
* Add default role config for proxy users
This allows users to specify a default role for users when using a proxy for auth. This can be useful for users who can't/don't want to define a header mapping for the remote-role header.
* update reference config and auth docs
* clarify face rec camera level config
* clarify auth docs
* Fix onnx not working with openvino
* Update openvino to fix failed npu plugin check
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* fix check for snapshot score
for manual events, snapScore is 0, so "0" gets displayed instead of a condition being evaluated.
* fix ongoing events from being returned for all review queries
The existing condition will include any record with a null end_time regardless of when it started, as long as the start_time is greater than the after param. With this fix, both the start time needs to be within the specified range, and for events that have already ended, their end time must be before the before param
* Base alert toggles on width not device class
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* Don't limit review summary query
The /review/summary endpoint was being restricted to the last 30 days, so unreviewed alerts and detections weren't showing in the calendar before that point. This change removes the WHERE clause so that the endpoint returns all results.
* fix
* remove unneeded test
we are now returning all results so we don't need to test for > month_ago
* fix
* Correctly ensure updates are more periodic when lpr or face detection is needed
* Cleanup
* Update api schema
* Don't update for stationary objects
* Simplify check
* Remove
* Section faces by event id
* Make score keeping more robust
* layout improvements
* Cleanup dialog
* Fix clicking behavior
* Add view in explore option
* math.round
* Don't require events
* Cleanup
* Remove selection
* Don't require
* Change dialog size with snapshot
* Use filename as key
* fix key
* Rework layout for mobile
* Handle mobile landscape
* Fix train issue
* Match logic
* Move deletion logic
* Fix reprocessing
* Support creating a new face
* Translations
* Do sorting in frontend
* Adjust unknown
* Cleanup
* Set max limit to faces to recognize
* Fix sorting
* Fix
* Don't assume landmark file is downloaded
* Rewrite build model task to be asynchronous so it doesn't block the pipeline
* Handle case where face recognition does not respond
* Cleanup
* Make daemon thread
* Add ability to update Frigate+ model to latest
* UI tweaks
* further UI tweaks
* UI tweaks: add width and height, fix select
* Add placeholder while API call in progress
* Fix Frigate+ enabled check
* Fix config change lost when reloading page
* Add persistent message requiring restart
* Drop down supported detectors and dimensions
* Add width and height to display
* Update FrigatePlusSettingsView.tsx
* Temp fix for Codespaces not loading
* Add i18n, format
* remove unneeded brackets
* missing colon
* Revert "Temp fix for Codespaces not loading"
This reverts commit 75b19674ce.
* Move database and config from homeassistant /config to addon /config
* Re-implement config migration for the add-on
* Align some terms
* Improve function name
* Use local variables
* Add model.path migration
* Fix homeassistant config path
* Ensure migration scripts run before go2rtc and frigate
* Migrate all files I know
* Add ffmpeg.path migration
* Update docker/main/rootfs/etc/s6-overlay/s6-rc.d/prepare/run
Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
* Improve some variable names and organization
* Update docs to reflect addon config dir
* Update live.md with /addon_configs
* Move addon config section to configuration doc
* Align several terminologies and improve text
* Fix webrtc example config title
* Capitalize Add-on in more places
* Improve specific add-on config dir docs
* Align bash and python scripts to prefer config.yml over config.yaml
* Support config.json in migration shell scripts
* Change docs to reflect config.yml is preferred over config.yaml
* If previous config was yaml, migrate to yaml
* Fix typo in edgetpu.md
* Fix formatting of Python files
* Remove HailoRT Beta add-on variant from docs
* Add migration for labelmap and certs
* Fix variable name
* Fix new_config_file var unset
* Fix addon config directories table
* Improve db migration to avoid migrating files like .db.bak
* Fix echo location
---------
Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
* Ensure doesn't fail due to missing dir
* Remove redundant settings from tabs
* Adjust selection method for mobile
* Fix button descendent error
* Ensure train is option on mobile
* Cleanup face images
* Cleanup
* Add api to run face recognition on image
* Rework save attempts option
* Cleanup mobile object pane buttons
* Adjust api signature
* Remove param
* Cleanup
* Set maximum number of face images to be kept
* Fix vertical camera scaling
* adjust wording
* Add attributes to search data
* Add button to train face from event
* Handle event id saving in API
* backend
* backend fixes
* api for search queries
* frontend
* docs
* add filterable scroll list to more filters pane for identifiers
* always publish identifier
* db migration
* db model
* assign admin role on password reset
* add role to jwt and api responses
* don't restrict api access for admins yet
* use json response
* frontend auth context
* update auth form for profile endpoint
* add access denied page
* add protected routes
* auth hook
* dialogs
* user settings view
* restrict viewer access to settings
* restrict camera functions for viewer role
* add password dialog to account menu
* spacing tweak
* migrator default to admin
* escape quotes in migrator
* ui tweaks
* tweaks
* colors
* colors
* fix merge conflict
* fix icons
* add api layer enforcement
* ui tweaks
* fix error message
* debug
* clean up
* remove print
* guard apis for admin only
* fix tests
* fix review tests
* use correct error responses from api in toasts
* add role to account menu