GithubHelp home page GithubHelp logo

acolomba / blackvuesync Goto Github PK

View Code? Open in Web Editor NEW
135.0 135.0 14.0 678 KB

Hands-off synchronization of recordings from a BlackVue dashcam with a local directory over a LAN. Standalone script or docker image.

License: MIT License

Python 94.79% Dockerfile 1.71% Shell 3.50%

blackvuesync's People

Contributors

acolomba avatar komputerking avatar sathio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blackvuesync's Issues

Build arm and arm64 versions of the docker container.

Currently the build is only the amd64 version of the container. And I am not sure if this is built automatically.

See https://github.com/heydon-consulting/drupal-builder/blob/d58730e5dddc8d4f6aaf78bb7f803c8180a4eb8c/.github/workflows/build.yml#L42-L55 for an example on using the workflow to build docker images and push them automatically.

I currently have a Raspberry Pi in my garage to be close to my car. I had to build the docker image locally do I could deploy it. Having a full pc is not really an option just to build download the files from the dashcam.

Overwrite oldest files if disk quota is reached

Feature request

According to the docs MAX_USED_DISK causes download to stop if the quota is reached. Would be nice if the oldest files would be deleted instead, mimicking how dashcam recording works. Maybe behavior could be controlled by another parameter.

No GPS data for P|I recordings

if recording.type in ("N", "E", "M"):

This avoids importing .gps files for some recordings.
Not having any .gps file is problematic for the popular Dashcam Viewer. It requires .gps data on all files to work properly (bug on their part).
I suppose importing these .gps files was caising issues since you added this condition, but in that case, would it be possible to add something like this?

if recording.type in ("P", "I"):
    touch recording.base_filename+".gps"

not sure if there are other events than N, E, M, P, I.

Docker on Synology Log Folder Date Issue

I have the Docker container set up and running in Synology. When I look at the log in Docker, it always shows tomorrow's date and I am not sure where it is getting the date from. I have checked my synology and my date and time are right but it always seems like it's a day ahead of what the log should be. Today is 12/05 but if I look at the logs, it's making entries in the 12/06 log.

Screenshot 2023-12-05 at 7 19 23 PM Screenshot 2023-12-05 at 7 20 04 PM

Issue writing to folder

Hi, Awesome project, cant wait to get it running with my new dr900x

I have added it on my synology NAS, executed the docker-compose as root but I get the following error in the container logs
synology-docker

My Compose file

docker run -d --restart unless-stopped \ -v /volume1/docker/blackvue-sync:/recordings \ -e ADDRESS=172.xx.xx.xx \ -e PUID=$(id -u) \ -e PGID=$(id -g) \ -e TZ="Australia/Sydney" \ -e KEEP=52w \ --name Blackvue-Sync \ acolomba/blackvuesync

In my NAS, the folder is there
owner

Feature request: newest to oldest priority

Currently time downloads oldest to newest. It would be nice to have an additional priority option for reverse chronological order, newest to oldest.

Use case is I have a Raspberry Pi in my car that backs up footage every minute in case someone breaks in and steals the camera.

New file types aren't deleted by --keep switch

Thank you very much for a great tool!

Looks like 1.8 added support for downloading the new files that Blackvue's May 2021 firmware update added, but not for cleaning them up with the --keep switch. I have the following left behind:

I
IF
IR
A
AF
AR
T
TF
TR

(EG 20210525_175137_AF.mp4)

Thanks,
Adam

Script does not handle impact recording types

The script currently does not handle impact recording types ('I') which causes an exception when sorting the files after getting the list from the dashcam:

ERROR 'NoneType' object has no attribute 'datetime'

I think there will be more types of filenames according to: https://blackvue.com/major-update-improved-blackvue-app-ui-dark-mode-live-event-upload-and-more/.
The ones not metioned on that page are MNP.

The solution seems to be simple:
filename_re = re.compile(r"""(?P<base_filename>(?P\d\d\d\d)(?P\d\d)(?P\d\d)
_(?P\d\d)(?P\d\d)(?P\d\d))
_(?P[NEPM])
(?P[FR])
.(?Pmp4)""", re.VERBOSE)

Becomes:
filename_re = re.compile(r"""(?P<base_filename>(?P\d\d\d\d)(?P\d\d)(?P\d\d)
_(?P\d\d)(?P\d\d)(?P\d\d))
_(?P[MEATBOIRXGNP])
(?P[FR])
.(?Pmp4)""", re.VERBOSE)

And manual_event_sort_key gets updarted to something like:
def manual_event_sort_key(recording):
"""sorts by recording type, then datetime, then front/rear direction"""
return "MEATBOIRXGNP".find(recording.type), recording.datetime, "FR".find(recording.direction)

Thanks,

.gps, .thm & .3gf Files

Is it possible to tell the Docker container to not copy the .gps, .thm & .3gf extension files when copying the .mp4 files to Synology? I have a script set up to delete the extension files but they seem to be recopying back for whatever reason.

how to make the cam stay online

I wonder when i pull my car into the garage and shut it off... wont the camera turn off and it cant be downloaded? Is there a way to keep the camera on for some minutes after shutting the car off? How you do it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.