Commit Graph

61 Commits

Author SHA1 Message Date
Sebastian Goscik
f109ec2a48 Bump version: 0.7.3 → 0.7.4 2022-08-21 20:51:08 +01:00
Sebastian Goscik
5ae43f08af Bump version: 0.7.2 → 0.7.3 2022-07-31 11:35:25 +01:00
Sebastian Goscik
1813bc0176 Bump version: 0.7.1 → 0.7.2 2022-07-17 20:04:03 +01:00
Sebastian Goscik
6fe18a193b Bump version: 0.7.0 → 0.7.1 2022-06-08 02:43:54 +01:00
Sebastian Goscik
13b11359fa Bump version: 0.6.0 → 0.7.0 2022-03-26 16:28:58 +00:00
Sebastian Goscik
f4a0c2bdcd Merge pull request #32 from ircmaxell/fix_disconnect_handling
Skip DISCONNECT events
2022-03-26 16:20:51 +00:00
Anthony Ferrara
f2c9ee5c76 Skip unwanted event types
e.g DISCONNECT events never have video associated with them, skip
processing if we encounter events of types we are not interested in.

Co-authored-by: Sebastian Goscik <sebastian.goscik@live.co.uk>
2022-03-26 16:15:36 +00:00
Sebastian Goscik
381f90f497 Add the ability to change the way the clip files are structured 2022-03-26 00:05:23 +00:00
Sebastian Goscik
52e72a7425 Bump version: 0.5.3 → 0.6.0 2022-03-18 21:44:32 +00:00
Sebastian Goscik
8bebeceaa6 Linter fixes 2022-03-18 21:44:32 +00:00
Sebastian Goscik
e2eb7858da Added support for doorbell ring events 2022-03-18 21:44:32 +00:00
Sebastian Goscik
453fed6c57 Added ability to choose which event types to backup
Co-authored-by: J3n50m4t <j3n50m4t@j3n50m4t.com>
2022-03-18 21:42:32 +00:00
Sebastian Goscik
ae323e68aa Actually assign new timestamps with proper timezones 2022-03-18 18:32:30 +00:00
Sebastian Goscik
4eec2fdde0 Bump version: 0.5.2 → 0.5.3 2022-03-11 23:10:53 +00:00
Sebastian Goscik
0a4a2401be Now uses timezone of the NVR for all timestamps 2022-03-10 22:35:14 +00:00
Sebastian Goscik
51e2446e44 Bump version: 0.5.1 → 0.5.2 2022-03-10 19:33:47 +00:00
Sebastian Goscik
92bb362f2b Changed quotes in delete coomand to " 2022-03-10 19:32:30 +00:00
Sebastian Goscik
71c86714c1 Bump version: 0.5.0 → 0.5.1 2022-03-07 22:39:20 +00:00
Sebastian Goscik
5bd4a35d5d Change ' quotes to " in rclone command
' does not work as expected in windows
2022-03-07 22:38:12 +00:00
Sebastian Goscik
298f500811 Bump version: 0.4.0 → 0.5.0 2022-03-06 18:18:59 +00:00
Sebastian Goscik
04694712d8 Added feature to check duration of downloaded clips if ffprobe is present 2022-03-06 18:18:59 +00:00
Sebastian Goscik
e3ed8ef303 Added delay before downloading clips
Unifi protect does not return full video clips if the clip is requested too soon.
There are two issues at play here:
  - Protect will only cut a clip on an keyframe which happen every 5s
  - Protect's pipeline needs a finite amount of time to make a clip available

Known Issues: It still seems to sometimes miss a single frame
2022-03-06 18:03:27 +00:00
Sebastian Goscik
43dd561d81 Rename RCloneException to more general SubprocessException 2022-03-06 17:59:00 +00:00
Sebastian Goscik
ad6b4dc632 Bump version: 0.3.1 → 0.4.0 2022-03-05 15:00:11 +00:00
Sebastian Goscik
2b46b5bd4a Added --version
Implements #15
2022-03-05 14:50:54 +00:00
Sebastian Goscik
9e164de686 Demote websocket retry logging
Previously `-v` showed a lot of spam meesaged for each time the check
was done, this is not particularly useful.
2022-02-24 23:54:29 +00:00
Sebastian Goscik
78e7b8fbb0 Bump version: 0.3.0 → 0.3.1 2022-02-24 21:24:16 +00:00
Sascha Bischoff
c9634ba10a Periodically check for websocket disconnect and re-init
Both network issues and restarts of Unifi Protect can cause the
websocket to disconnect. Once this happens, no more events are
recieved, and hence no events are stored via rclone.

We add a task which checks that the websocket is connected every
minute. If the websocket is not connected, the connection is totally
reset. For a simple network issue, is should be sufficient to just
call pyunifiprotect's update(), but this doesn't work when protect has
been restarted. Given that this is a tool that should always be
running, we opt for the most extreme option of totally resetting the
connection, and re-establishing it from scratch.
2022-02-24 18:54:24 +00:00
Sebastian Goscik
e3fbb1be10 Bump version: 0.2.1 → 0.3.0 2022-02-22 23:40:36 +00:00
Sebastian Goscik
3e53d43f95 Add timeout to known download exceptions 2022-02-22 23:36:57 +00:00
Sebastian Goscik
90e50fd982 Fix: Properly handle unknown IDs
Today after adding a new camera for testing, it became
clear that the previous assumption that pyunifiprotect
would update its bootstrap when new cameras were
added was incorrect.
2022-02-22 23:36:30 +00:00
Sascha Bischoff
9f6ec7628c Add option to supply extra arguments to rclone
Add in the capability to pass extra arguments through to rclone. These
are passed verbatim, and are set to '' by default. They can be passed
either with --rclone-args or by setting the environment variable
RCLONE_ARGS.

For example. the expectation is that the end user can use these for
setting a bandwidth limit so that rclone uploading doesn't saturate
their internet bandwidth.
2022-02-22 15:25:27 +00:00
Sebastian Goscik
091b38b038 Bump version: 0.2.0 → 0.2.1 2022-02-21 23:12:42 +00:00
Sebastian Goscik
5e1803c06c corrected retry logging 2022-02-21 23:12:42 +00:00
Sebastian Goscik
66e1a1c01f Bump version: 0.1.1 → 0.2.0 2022-02-21 12:31:50 +00:00
Sebastian Goscik
b2d041ff09 Add missing f for fstrings in warning 2022-02-21 11:12:19 +00:00
Sebastian Goscik
61e54c3b5f Add known download exception 2022-02-21 11:12:19 +00:00
Sebastian Goscik
84cb32fabf Added debug logging of config settings 2022-02-21 11:12:19 +00:00
Sebastian Goscik
773b90ba4f Log camera ID -> name mapping at start
Makes it easier to figure out what the camera IDs are for ignoring them
2022-02-21 11:12:19 +00:00
Sebastian Goscik
0dd9e8e91b Add feature to ignore cameras
Implements #1
2022-02-21 11:12:19 +00:00
Sebastian Goscik
e491965e04 Lookup camera names in pyunifiprotect instead of a local map
Pyunifiprotect should keep the known cameras upto date, unlike the map
we were keeping before which was never updated after start.
2022-02-21 11:12:19 +00:00
Sebastian Goscik
0b1ccca4b2 linter fixes 2022-02-20 23:43:27 +00:00
Sebastian Goscik
3e1868b21f Added a retry delay 2022-02-20 21:33:21 +00:00
Sebastian Goscik
166e4b282b Added down/upload retries
Also improved logging of exception that occur to ensure unexpected exceptions are never passed silently
2022-02-20 21:21:30 +00:00
Sebastian Goscik
a22fa64587 Created custom exception class for rclone errors
Previously it used RuntimeExceptions which could also be raised from other source.
This also meant some exceptions could be passed silently which is no longer the case
2022-02-20 21:00:19 +00:00
Sebastian Goscik
358aebf49c typo 2022-02-20 17:52:20 +00:00
Sebastian Goscik
dd0ccfd64d Bump version: 0.1.0 → 0.1.1 2022-02-20 16:14:06 +00:00
Sebastian Goscik
e8c45c20a3 Document verbosity cli option 2022-02-19 22:50:15 +00:00
Sebastian Goscik
4fee4cbf44 Updated CLI description 2022-02-19 22:37:55 +00:00
Sebastian Goscik
b948c4ceb5 Fix typing and docstrings 2022-02-19 22:03:51 +00:00