Commit Graph

663 Commits

Author SHA1 Message Date
uvjustin
9df415b3f2
Fix VOD issues with longer keyframe intervals (#3671)
* Fix VOD issues with longer keyframe intervals

* Move probe function to util
Update comment

* Use recording duration for keyFrameDurations

* Remove unused early return

* Avoid clipping first clip
2022-08-26 06:32:34 -05:00
uvjustin
8c45dab9b8
Handle spaces in labels (#3679)
* Unquote label in flask routes
Encode label in Camera.jsx

* Don't use preprocessor

* Update nginx location for cacheable images
2022-08-25 07:32:30 -05:00
Nicolas Mowen
911d6fdfa7
Ensure bounding box is within camera frame (#3702)
* Ensure bounding box is within camera frame

* Account for 0 index
2022-08-24 07:39:47 -05:00
Blake Blackshear
37325c70ba fix plus enabled for addons 2022-07-22 08:12:58 -05:00
Blake Blackshear
3c46a33992 revert false warning messages 2022-07-20 06:55:06 -05:00
deviant77
ed1897db71
Add log message when discarding recording segments in cache (#3439)
* Add log message when discarding recording segments in cache

Currently Frigate silently discards recording segments in cache if there's more than "keep_count" for a camera, which can happen on high load/busy/slow systems.
This results in recording segments being lost with no apparent cause in the logs (even when set to debug).
This PR adds a warning log entry when discarding segments, in the same way as discarding corrupted segments

* Add explanatory warning and properly format cache_path warning

* lint fixes

Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>
2022-07-19 07:24:44 -05:00
Nick Mowen
061fb15a80 Reset motion to false on startup 2022-07-19 06:59:20 -05:00
Blake Blackshear
b36b63599b update stimeout to timeout 2022-07-05 11:55:55 -05:00
Josh Hawkins
7845995dfd Adjust threshold and contour_area with mqtt 2022-07-05 08:46:10 -05:00
Nicolas Mowen
c2465a46a8
Http tests (#3350)
* Set up for http tests

* Setup basics for testing and first test

* Add testing consts

* Cleanup db creation

* Add one more check to test

* Get event that does not exist

* Get events working with cleaner db

* Test retain / un-retain

* Test setting and deleting sub label

* Test getting list of sub labels

* Fix bug caught in tests

* Test deleting event

* Test geting list of events

* Expand test

* Test more event filters

* Write version module so tests don't fail on version import

* Test config

* Test recordings endpoint

* Formatting

* Remove unused imports

* Test stats

* Add cleanup files in const

* Add name to match other checks
2022-06-30 07:53:46 -05:00
Blake Blackshear
24d3a9cdd5 read plus api key from addon options 2022-06-30 07:19:40 -05:00
Blake Blackshear
bc078fcc88 remove deprecated max_seconds config option 2022-06-01 06:50:09 -05:00
Nicolas Mowen
5f9d477863
Update event filters naming and add sub label filter (#3194)
* Use default names so filters are more clear

* Add endpoint to get list of sub labels inside DB

* Fix crash on no internet

* Cleanups for sub_label http

* Add sub label selector to events UI

* Add event filtering for sub label

* Formatting files

* Reduce size of filters to fit on one line

* Add handler for tests

* Remove unused imports

* Only show the sub labels filter when there are sub labels in the DB

* Fix tests

* Use distinct instead of group_by

* Formatting

* Cleanup event logic
2022-05-29 09:47:43 -05:00
Nicolas Mowen
468febc434
Catch crash on no internet (#3246) 2022-05-26 10:04:33 -05:00
Blake Blackshear
7c8142174e mqtt motion adjustments 2022-05-15 07:45:04 -05:00
Nicolas Mowen
de244d6873
Send mqtt message when motion is detected (#3152)
* Send mqtt message when motion is detected

* Use object processing instead of passing mqtt client around

* Cleanup

* Formatting

* add comment

* Make off delay configurable.

* Handle updating each camera based on config off delay

* Formatting

* Update docker-compose.yml

* Fix processing issue

* Update mqtt docs

* Update main config docs

* Make sure multiple True values aren't published for the same motion

* Make sure multiple True values aren't published for the same motion

* Update payload to fit existing HA standard values

* Update docs to fit new values

* Update docs

* Update motion topic

* Use datetime.datetime and remove unused imports

* Cast to int

* Clarify motion detector behavior in docs

* Fix typo

Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>
2022-05-15 07:03:33 -05:00
Blake Blackshear
358d0521a1 fix plus active check and add logging 2022-05-12 06:29:43 -05:00
Blake Blackshear
691ed6a4c7 revamp recordings 2022-05-12 06:29:43 -05:00
Blake Blackshear
78e1782084 optimize query performance 2022-05-12 06:29:43 -05:00
Blake Blackshear
0d5ae9a399 cleanup 2022-05-12 06:29:43 -05:00
Blake Blackshear
d343a658ec batch deletes for massive cleanups 2022-05-12 06:29:43 -05:00
Nicolas Mowen
0bd3cff13b
Set event thumbnail cache timeout to 1 day (#3150)
* Set event thumbnail cache timeout to 1 day

* Pass max age as a param and set default to 30 days
2022-04-26 19:42:07 -05:00
Nicolas Mowen
5b71271b3c
Set motion switch on mqtt connection (#3149) 2022-04-26 19:09:53 -05:00
Nicolas Mowen
0a4d658c7f
Ability to enable / disable motion detection via MQTT (#3117)
* Starting working on adding motion toggle

* Add all info to mqtt command

* Send motion to correct funs

* Update mqtt docs

* Fixes for contingencies

* format

* mypy

* Tweak behavior

* Fix motion breaking frames

* Fix bad logic in detect set

* Always set value for motion boxes
2022-04-26 07:29:28 -05:00
Blake Blackshear
91539de3ff optimize caching of image data from api 2022-04-26 06:36:26 -05:00
Blake Blackshear
f2030d301f type fixes 2022-04-18 06:52:13 -05:00
Blake Blackshear
d890217447 Merge remote-tracking branch 'origin/master' into release-0.11.0 2022-04-18 06:45:30 -05:00
Sebastian Englbrecht
cafe0917c7 Typing: mypy fixes for
* __main__.py
 * app.py
 * models.py
 * plus.py
 * stats.py

In addition a new module was introduced: types
There all TypedDicts are included. Bitte geben Sie eine Commit-Beschreibung für Ihre Änderungen ein. Zeilen,
2022-04-17 08:55:38 -05:00
Sebastian Englbrecht
ebf4e43ced Modernizing Typing
All Dict, List were converted to dict, list, see: https://mypy.readthedocs.io/en/stable/builtin_types.html#generic-types
2022-04-17 08:55:38 -05:00
Blake Blackshear
a1afade9ba fix birdseye config 2022-04-16 09:08:10 -05:00
Blake Blackshear
b86b2d6602 cleanup print statements 2022-04-16 09:08:10 -05:00
Blake Blackshear
12abbc59d6 add lint check to workflow 2022-04-16 09:08:10 -05:00
Blake Blackshear
ec91466fe4 lint fixes 2022-04-16 09:08:10 -05:00
Josh Hawkins
65e0ec7826
Allow improve_contrast to be toggled via mqtt (#3011)
* Toggle improve_contrast for cameras via MQTT

* Process parameter to mqtt toggle improve_contrast

* Update mqtt docs for improve_contrast topic

* Spacing

* Add class variable and update in process_frames

* Pass to constructor

* pass by reference mistake

* remove parameter

* remove parameter
2022-04-16 08:52:02 -05:00
Nicolas Mowen
a5016afdd4
FEAT: Ability to reorder & ability to hide Cameras in UI (#2981)
* Add options for reordering and hiding cameras selectively

* Add newline at end of camera file

* Make each camera for birdseye togglable as well

* Update names to be less ambiguous

* Update defaults

* Include sidebar change

* Remove birdseye toggle (will be added in separate PR)

* Remove birdseye toggle (will be added in separate PR)

* Remove birdseye toggle (will be added in separate PR)

* Update sidebar to only sort cameras once

* Simplify sorting logic
2022-04-15 07:23:02 -05:00
Sebastian Englbrecht
41f58c7692 Add basic typing for multiple modules:
* log.py
 * video.py
 * watchdog.py
 * zeroconf.py
2022-04-15 07:01:43 -05:00
Sebastian Englbrecht
c6234bf548 fix depreciated import from collections 2022-04-15 07:01:43 -05:00
Sebastian Englbrecht
d995761419 Prepare mypy for typing checks 2022-04-15 07:01:43 -05:00
Nicolas Mowen
d749cf2e6b
Allow birdseye to be overridden at the camera level (#3083)
* Add camera level processing for birdseye

* Add camera level birdseye configruation

* Propogate birdseye from global

* Update docs to show that birdseye is overridable

* Fix incorrect default factory

* Update note to indicate values that can be overridden

* Cleanup config accessing

* Add tests for birdseye config behavior

* Fix mistake on test format

* Update tests
2022-04-15 06:59:30 -05:00
Nicolas Mowen
58c32857d3
Add latest frigate version to stats endpoints (#3038)
* Add latest version to stats in mqtt and http

* Update json to include new field

* Update to use requests

* Don't use incorrect exception
2022-04-11 07:10:19 -05:00
Nicolas Mowen
51fd18f56d
FEAT: Ability to set custom birdseye icon and birdseye docs (#2979)
* Show custom.png for birdseye icon if available

* Don't look for config value

* Add birdseye docs
2022-04-10 09:15:56 -05:00
Blake Blackshear
cef77fba01 add frontend for frigate+ submission 2022-04-10 09:11:16 -05:00
Blake Blackshear
e724fe3da6 add endpoint to submit to plus 2022-04-10 09:11:16 -05:00
Nick
045aac8933
Add object filter ratio (#2952)
* Add object ratio config parameters

Issue: #2948

* Add config test for object filter ratios

Issue: #2948

* Address review comments

- Accept `ratio` default
- Rename `bounds` to `box` for consistency
- Add migration for new field

Issue: #2948

* Fix logical errors

- field migrations require default values
- `clipped` referenced the wrong index for region, since it shifted
- missed an inclusion of `ratio` for detections in `process_frames`
- revert naming `o[2]` as `box` since it is out of scope!

This has now been test-run against a video, so I believe the kinks are
worked out.

Issue: #2948

* Update contributing notes for `make`

Issue: #2948

* Fix migration

- Ensure that defaults match between Event and migration script
- Deconflict migration script number (from rebase)

Issue: #2948

* Filter objects out of ratio bounds

Issue: #2948

* Update migration file to 009

Issue: #2948
2022-04-10 08:25:18 -05:00
Nicolas Mowen
923d07b1a4
BUG: Event stuck if recording & snapshot disabled while in-progress (#3023)
* Fix recording getting stuck bug

* Fix typo
2022-03-30 06:33:34 -05:00
Nicolas Mowen
b1cc64d4fa
FEAT: Ability to set sub labels for specific events (#2949)
* Add sub label to model and set / delete funs

* Add migrations for sub label

* Tweaks to API and model

* Show sublabel if available

* Cleanups

* Update docs

* Show person in UI title

* Fix typo and don't fail on no json

* Transfer sub labels for in progress events

* Remove sublabel reset

* Remove person only check

* Make default null

* Update docs and formatting

* Make default null

* Make nullable in migration

* Undo null

* Update model to accept null

* Update migration to accept null

* Don't set to default values

* Remove redundant defaults and update http logic

* Only need a single route

* Enforce 20 character limit in http

* Update docs to mention 20 character limit

* Cleanup

* Separate insert and update to make sure updated values are retained when event ends

* Use insert instead of replace

* Remove redundant if and have should_update_db include clip or snapshot requirement.
2022-03-17 07:18:43 -05:00
Nicolas Mowen
0abd0627df
FEAT: Replace best jpg endpoint (#2944)
* Added object thumbnail def and made camera tracked objects use it.

* Add object snapshot def

* Remove documentation for best.jpg

* Update docs for label thumbnail and snapshot defs
2022-03-11 07:56:39 -06:00
Blake Blackshear
1c9ba11e07 swr events refactor 2022-03-11 07:49:06 -06:00
707Alex707
83481afee1 remove print statement 2022-03-10 20:02:10 -06:00
Blake Blackshear
b1a2b0cda2 make dynamic contrast optional and disable by default 2022-03-10 19:46:55 -06:00