Commit Graph

673 Commits

Author SHA1 Message Date
Nicolas Mowen
66dc8c772b
Remove snapshot requirement for thumbnail event query (#4039) 2022-10-07 21:13:15 -05:00
Nicolas Mowen
65c211bb6d
Catch ffprobe empty stdout (#4016) 2022-10-04 19:56:04 -05:00
Nicolas Mowen
60ad38261b
Fix sub label access (#4015)
* Fix access

* Formatting
2022-10-04 18:49:37 -05:00
Blake Blackshear
8669c29e3d
don't overwrite segments that already exist (#3995) 2022-10-01 18:11:29 -05:00
Nicolas Mowen
f0e836e5b6
Update MQTT along with enabling motion detection (#3898) 2022-10-01 09:01:43 -05:00
Nicolas Mowen
a1ae5b67d8
Mqtt sub labels (#3899)
* Set sub label on object data if event is in progress

* Include sub_label in dict

* Don't need to set and passively get

* Formatting

* Don't expect event to be valid

* Update docs to reflect that sub label is included
2022-10-01 09:00:56 -05:00
Nicolas Mowen
53f7190d42
Set a timeout on github release check (#3969)
* Set a timeout on github release check

* Formatting
2022-10-01 08:58:23 -05:00
Nicolas Mowen
df40b96b44
BUG: Fixes and cleanup around region / bounding box calculation (#3879)
* -1 so ensure indexes are correct

* Catch case of zero division

* Due to the -1, it may be negative

* Ignore source of error

The error is occurring due to a detections bounding box starting beyond the frame, this should be immediately ignored

* Formatting

* Check horizontal placement as well

* Remove original frame clamping
2022-09-22 08:07:16 -05:00
Nick Mowen
1bc8d94312 Fix edge of frame after region adjustments 2022-09-15 06:33:32 -05:00
Nick Mowen
7e9f913ff6 Fix edge case where browser sends multiple requests to download file. 2022-09-15 06:32:54 -05:00
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