Commit Graph

1756 Commits

Author SHA1 Message Date
Nicolas Mowen
25bb8c7a5a Fix breakages by manual_event_api branch (#6542)
* Fix breakages by manual_event_api branch

* More fixes
2023-05-22 17:29:10 -07:00
Nicolas Mowen
219f3b0534 Ability to manually create events through the API (#3184)
* Move to events package

* Improve handling of external events

* Handle external events in the event queue

* Pass in event processor

* Check event json

* Fix json parsing and change defaults

* Fix snapshot saving

* Hide % score when not available

* Correct docs and add json example

* Save event png db

* Adjust image

* Formatting

* Add catch for failure ending event

* Add init to modules

* Fix naming

* Formatting

* Fix http creation

* fix test

* Change to PUT and include response in docs

* Add ability to set bounding box locations in snapshot

* Support multiple box annotations

* Cleanup docs example response

Co-authored-by: Blake Blackshear <blake@frigate.video>

* Cleanup docs wording

Co-authored-by: Blake Blackshear <blake@frigate.video>

* Store full frame for thumbnail

* Formatting

* Set thumbnail height to 175

* Formatting

---------

Co-authored-by: Blake Blackshear <blake@frigate.video>
2023-05-22 17:29:09 -07:00
Sergey Krashevich
527c755bc2 Add go2rtc & remote detectors network bandwidth usage to System table (#6526)
* Add network bandwidth usage to System table display in System.jsx and update get_bandwidth_stats function in util.py to include go2rtc processes

* black...

* Add network bandwidth usage to system table in web UI and improve regex in get_bandwidth_stats function to include frigate detector processes

* black...

* Update bandwidth calculation to include both incoming and outgoing traffic

* black:(
2023-05-22 17:29:09 -07:00
Korneliusz Jarzębski
ed95222960 add ffmpeg bandwidth stats (#6492)
* add ffmpeg bandwidth stats

* add ffmpeg bandwidth stats

* Change column name

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* fix lint formatting

---------

Co-authored-by: Korneliusz Jarzębski <k.jarzebski@netverse.pl>
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2023-05-22 17:29:09 -07:00
Nicolas Mowen
00ae4ec5cc Don't fail if camera does not support presets (#6497) 2023-05-22 17:29:09 -07:00
Sergey Krashevich
822d136d34 Update DeepStack detector to set width and height from input image size (#6429) 2023-05-22 17:29:09 -07:00
Sergey Krashevich
ba4d240f82 Add cmdline information to CPU usage stats in get_cpu_stats() function and display it in the System page's ffmpeg table with a copy-to-clipboard button (#6430) 2023-05-22 17:29:09 -07:00
Sergey Krashevich
46ece01309 Fix error in parsing DeepStack response JSON and handle cases where predictions field is missing (#6463) 2023-05-22 17:29:09 -07:00
Blake Blackshear
ae62ef6019 Upgrade deps (#6395)
* update js build tools

* update frontend deps

* python updates

* update requests again
2023-05-22 17:29:09 -07:00
Sergey Krashevich
ccfc9fbc9a add go2rtc version (#6390)
Update System.jsx
2023-05-22 17:29:09 -07:00
Nicolas Mowen
d56288fd0a Timeline UI optimizations (#6367)
* Fix centering of bottom_center

* Make bottom_center overlap vertically

* Fix timeline icon behavior

* Make disclaimer hidden under aria label

* Don't literally say disclaimer
2023-05-22 17:29:09 -07:00
Sergey Krashevich
34b79fa466 Add Deepstack/CodeProject-AI.Server detector plugin (#6143)
* Add Deepstack detector plugin with configurable API URL, timeout, and API key

* Update DeepStack plugin to recognize 'truck' as 'car' for label indexing

* Add debug logging to DeepStack plugin for better monitoring and troubleshooting

* Refactor DeepStack label loading from file to use merged labelmap

* Black format

* add documentation draft

* fix link to codeproject website

* Apply suggestions from code review

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2023-05-22 17:29:09 -07:00
Stephen Horvath
3ca05b144d Fix site.webmanifest + add svg as favicon (#6304) 2023-05-22 17:29:09 -07:00
Peeter N
3cfb2c9c55 Do not show the loader during recordings api call (#6366)
* Do not show the loader during recordings api call

Showing the loader during the recordings API call will rerender the recordings list and rerenders the video player

* Fix defauting to 0 seekSeconds if recordings results are missings
2023-05-22 17:29:09 -07:00
Sergey Krashevich
3d4a630cb2 Implement NVML for NVIDIA GPU Stats (#6359)
* nvml

* black...black...black...

* small fix for avoid errors on strange GPUs and old drivers

* fix type errors

* fix type errors

* fix unittest process crash

where the tests for tests?..

* it's impossible to mock low-level library

* fix double % for other GPU types

* remove space before gpu statistic values
2023-05-22 17:29:09 -07:00
Nicolas Mowen
28f41d6e87 Add icon to explain in more detail the system stats / storage info (#6358)
* Add info icon with additional info for each process.

* Specify single CPU core

* Include storage in tooltips
2023-05-22 17:29:09 -07:00
Sergey Krashevich
b561bcebfa Hide PTZ Controls in Birdseye when no cameras support it (#6353)
* Refactor filter logic to exclude cameras with empty onvif host address

* Refactor filter logic to exclude cameras with empty onvif host address-2

* Apply suggestions from code review

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2023-05-22 17:29:09 -07:00
Sergey Krashevich
b0013ddaed Increase maximum event sub_label length to 100 characters (#6350)
* Increase maximum sub label length to 100 characters and update corresponding fields in models and API

* black format...
2023-05-22 17:29:09 -07:00
Sergey Krashevich
06dbf314d5 Refactor Process Stats and Bugfixes (#6344)
* test refactor process stats

* Update util.py

* bugfix

* black formatting

* add missing processes field to StatsTrackingTypes class

* fix python checks and tests...

* use psutil for calcilate cpu utilization on get_cpu_stats

* black...black...black...

* add cpu average

* calculate statiscts for logger process

* add P-ID for other processes in System.jsx

* Apply suggestions from code review

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* make page beautiful again :)

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2023-05-22 17:29:09 -07:00
Sergey Krashevich
c34233f5d4 Replace subprocess usage with os module for better performance and maintainability (#6298)
* avoid executing external tools by using Python's built-in os module to interact with the filesystem directly

* Refactor recording cleanup script to use os module instead of subprocess

* black format util.py

* Ooooops

* Refactor get_cpu_stats() to properly identify recording process
2023-05-22 17:29:09 -07:00
Blake Blackshear
007e3eff6a Bug fixes (#6332)
* fix timeline delete

* fix labelmap in config response

* create cache dirs if needed
2023-05-22 17:29:09 -07:00
Blake Blackshear
70793107ff add plus integration for models (#6328) 2023-05-22 17:29:09 -07:00
Nicolas Mowen
c8cdf63596 Refactor events to be more generic (#6320)
* Organize event table to be more generalized

* Add appropriate fields to data

* Move tracked object logic to own function

* Add source type to event queue

* rename enum

* Fix types that are used in webUI

* remove redundant

* Formatting

* fix typing

* Rename enum
2023-05-22 17:29:09 -07:00
Nicolas Mowen
736e32172f Cleanup timeline entries when relevant recording segments are removed (#6319)
* Cleanup timeline entries when relevant recording segments are removed

* Make timeline cleanup simpler

* Formatting
2023-05-22 17:29:09 -07:00
Nicolas Mowen
26f6388e31 Show other system processes in system page (#6276) 2023-05-22 17:29:09 -07:00
Nicolas Mowen
2368cd2dd3 Add annotation support (#6288) 2023-05-22 17:29:09 -07:00
Alin Balutoiu
c8251178e9 Add option to have cameras sorted inside the Birdseye stream (#5450)
* Add option to sort cameras inside Birdseye

* Make default order to be sorted alphabetically

* Add docs for sorting cameras

* Update index.md for cameras

* Remove irelevant comments
2023-05-22 17:29:09 -07:00
Nicolas Mowen
5943e6a56e Move recording management to separate process (#6248)
* Move recordings management to own process and ensure db multiprocess access

* remove reference to old threads

* Cleanup directory remover

* Mypy fixes

* Fix mypy

* Add support back for setting record via MQTT and WS

* Formatting

* Fix rebase issue
2023-05-22 17:29:07 -07:00
Blake Blackshear
2d12a5e519 dependency updates (#6246)
* python

* easy web deps
2023-05-22 17:28:50 -07:00
Nicolas Mowen
15da7e310a Support Controlling PTZ Cameras Via WebUI (#4715)
* Add support for ptz commands via websocket

* Fix startup issues

* Fix bugs

* Set config manually

* Add more commands

* Add presets

* Add zooming

* Fixes

* Set name

* Cleanup

* Add ability to set presets from UI

* Add ability to set preset from UI

* Cleanup for errors

* Ui tweaks

* Add visual design for pan / tilt

* Add pan/tilt support

* Support zooming

* Try to set wsdl

* Fix duplicate logs

* Catch auth errors

* Don't init onvif for disabled cameras

* Fix layout sizing

* Don't comment out

* Fix formatting

* Add ability to control camera with keyboard shortcuts

* Disallow user selection

* Fix mobile pressing

* Remove logs

* Substitute onvif password

* Add ptz controls ot birdseye

* Put wsdl back

* Add padding

* Formatting

* Catch onvif error

* Optimize layout for mobile and web

* Place ptz controls next to birdseye view in large layout

* Fix pt support

* Center text titles

* Update tests

* Update docs

* Write camera docs for PTZ

* Add MQTT docs for PTZ

* Add ptz info docs for http

* Fix test

* Make half width when full screen

* Fix preset panel logic

* Fix parsing

* Update mqtt.md

* Catch preset error

* Add onvif example to docs

* Remove template example from main camera docs
2023-05-22 17:28:50 -07:00
Blake Blackshear
e1e5192fd8 False positives (#6217)
* add false positive submission

* switch timeline events to x,y,w,h

* update docs

* fix type checks

* convert to upsert

* fix config test
2023-05-22 17:28:16 -07:00
dependabot[bot]
e70b18ab9c Bump actions/setup-python from 4.5.0 to 4.6.0 (#6192)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4.5.0 to 4.6.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4.5.0...v4.6.0)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-22 17:28:16 -07:00
Nicolas Mowen
f4801bd687 Use correct method for retrieving current unix time (#6218) 2023-05-22 17:28:16 -07:00
Nicolas Mowen
b1ef4b1936 Fix timeline event overlay when recordings mode is not all (#6215)
* Fix case where not all segments are saved in recording for timeline overlay

* Remove unused vars
2023-05-22 17:28:16 -07:00
Nicolas Mowen
d68ba26ed6 Fix substitution change (#6212) 2023-05-22 17:28:16 -07:00
Felipe Santos
f30ac98b27 Migrate default database path from /media/frigate to /config (#5219)
* Migrate db path to /config

* Ensure oneshot runs

* Put logic inside of Frigate's run

* Use new db default path in code

* Fix missing config dir

* Upgrade yq to 4.33.3
2023-05-22 17:28:16 -07:00
Nicolas Mowen
6fa887dc1a Metadata Timeline (#6194)
* Create timeline table

* Fix indexes

* Add other fields

* Adjust schema to be less descriptive

* Handle timeline queue from tracked object data

* Setup timeline queue in events

* Add source id for index

* Add other fields

* Fixes

* Formatting

* Store better data

* Add api with filtering

* Setup basic UI for timeline in events

* Cleanups

* Add recordings snapshot url

* Start working on timeline ui

* Add tooltip with info

* Improve icons

* Fix start time with clip

* Move player logic back to clips

* Make box in timeline relative coordinates

* Make region relative

* Get box overlay working

* Remove overlay when playing again

* Add disclaimer when selecting overlay points

* Add docs for new apis

* Fix mobile

* Fix docs

* Change color of bottom center box

* Fix vscode formatting
2023-05-22 17:28:16 -07:00
lucas_nz
45541ed244 Use browser timezone if not specified in config (#6205) 2023-05-22 17:28:16 -07:00
KtAlumi
7861a32ea1 Edit dsize order (#6172)
dsize could be (width, height).

Co-authored-by: kt.lu <kt.lu@latticeworkinc.com>
2023-05-22 17:28:16 -07:00
Blake Blackshear
1d115a7a68 update python deps (#6101) 2023-05-22 17:28:16 -07:00
Felipe Santos
ddc2790c60 Auto approve dependabot PRs (#5147) 2023-05-22 17:28:16 -07:00
Martin Weinelt
e08d2ae852 Migrate away from deprecated np.float (#5898)
It is an alias for the python float type, and got deprecated in 1.20 and
was removed in 1.24. The rest of the project already uses float32
(single), so I believe this is also correct here, as opposed to float64
(double).
2023-05-22 17:28:16 -07:00
Blake Blackshear
4f15a99060 update to 8.3.x (#6100) 2023-05-22 17:28:16 -07:00
dependabot[bot]
45f379cd4d Bump docker/build-push-action from 3 to 4 (#5319)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3 to 4.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-22 17:28:16 -07:00
Blake Blackshear
ef93cc24d3 update deps (#6093)
* update dev deps

* update deps

* docs deps

* python dev deps

* update python deps
2023-05-22 17:28:16 -07:00
Kevin David
33d7db3d36 docker-compose.yml: remove :ro for config.yml (#6086)
This should be editable by default from the UI
2023-05-22 17:28:16 -07:00
Nicolas Mowen
15d4429ef4 Remove deprecated retain_days config (#5952) 2023-05-22 17:28:16 -07:00
Blake Blackshear
a5f457b9a4 Remove arm32 (#5935)
* remove references to 32bit arm

* scheduled build to maintain actions cache
2023-05-22 17:28:16 -07:00
Blake Blackshear
52facaaf65 increment version 2023-05-22 17:28:14 -07:00
Robert Lagus
76dbab6a8b
[Docs] Snapshot config explanation. (#6439)
* Snapshot config explanation.

related to: https://github.com/blakeblackshear/frigate/issues/6434

* Update docs/docs/configuration/snapshots.md

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* Update docs/docs/configuration/snapshots.md

Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>
2023-05-17 07:45:09 -05:00