Commit Graph

11 Commits

Author SHA1 Message Date
JohnMark Sill
3e07d4eddb
feat: Timeline UI (#2830) 2022-02-27 08:04:12 -06:00
Blake Blackshear
0695bb097d revamp process clip 2022-02-18 21:18:26 -06:00
Blake Blackshear
c1132e6897 update ignore files 2021-10-23 08:21:15 -05:00
Sean Vig
84a0827aee Use dataclasses for config handling
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.
2021-05-23 20:38:57 -05:00
Blake Blackshear
b8f72a5bcb add devcontainer setup 2021-02-25 07:00:59 -06:00
Paul Armstrong
a803ab8577 test(web): add unit test framework 2021-02-20 08:20:17 -06:00
Paul Armstrong
c618867941 feat!: web user interface 2021-01-26 21:40:33 -06:00
Blake Blackshear
e8009c2d26 adding version endpoint 2021-01-26 21:40:33 -06:00
Blake Blackshear
724d8187c6 update gitignore 2021-01-26 21:40:33 -06:00
Blake Blackshear
a659019d1a move config example 2019-12-08 07:06:52 -06:00
blakeblackshear
86f5d8128d initial refactoring 2019-02-25 20:27:02 -06:00