* 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
* 📝✅🔧 - Make RTMP config global
Fixes#1671
* 📝✅🔧 - Make timestamp style config global
Fixes#1656
* fix test function names
* formatter
Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>
Use config data classes to eliminate some of the boilerplate associated
with setting up the configuration. In particular, using dataclasses
removes a lot of the boilerplate around assigning properties to the
object and allows these to be easily immutable by freezing them. In the
case of simple, non-nested dataclasses, this also provides more
convenient `asdict` helpers.
To set this up, where previously the objects would be parsed from the
config via the `__init__` method, create a `build` classmethod that does
this and calls the dataclass initializer.
Some of the objects are mutated at runtime, in particular some of the
zones are mutated to set the color (this might be able to be refactored
out) and some of the camera functionality can be enabled/disabled. Some
of the configs with `enabled` properties don't seem to have mqtt hooks
to be able to toggle this, in particular, the clips, snapshots, and
detect can be toggled but rtmp and record configs do not, but all of
these configs are still not frozen in case there is some other
functionality I am missing.
There are a couple other minor fixes here, one that was introduced
by me recently where `max_seconds` was not defined, the other to
properly `get()` the message payload when handling publishing mqtt
messages sent via websocket.