Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Watch filesystem for new files, instantly copy to share #482

Closed
rmariboe opened this issue May 12, 2020 · 8 comments
Closed

Comments

@rmariboe
Copy link

I'm building a setup where the Pi is constantly online (either via LTE dongle or LTE connected wifi router in car) and connected to NAS through OpenVPN - thus, the Pi never leaves/reaches wifi connectivity and therefore, I assume nothing will trigger archiving.

Request is to add a filesystem watcher for files that are created, triggering a copy when they are closed. Is this viable?

@marcone
Copy link
Owner

marcone commented May 12, 2020

There is no filesystem for the Pi to watch: the car writes the files to a filesystem in a disk image, which isn't mounted on the Pi while it is accessed by the car.
In order to do what you describe, teslausb would have to look at the content of that disk image at regular intervals, which is technically possible, and something I hope to get to eventually, but it wouldn't be as instant as you seem to be asking for.

@marcone
Copy link
Owner

marcone commented May 12, 2020

Closing this in favor of the older issue #171 which is asking for the same thing.

@marcone marcone closed this as completed May 12, 2020
@rmariboe
Copy link
Author

Ah, and after spending a few hours looking for a good way to monitor the filesystem being written through the USB mount, I'm about to give up on that path. Guess I'll just force_sync once every few minutes or so...

@marcone
Copy link
Owner

marcone commented May 12, 2020

teslausb disconnects the drive from the car while archiving (because you shouldn't have two different computers accessing the same disk at the same time), so you would be interrupting any sentry recordings in progress.

@rmariboe
Copy link
Author

rmariboe commented May 13, 2020

Damned, feared as much. So I'll have to create a custom script mounting the cam_disk and the archive and copying the files I guess - wonder what'll happen if the car starts deleting files while they are being copied :)

Might want to do the snapshot thing just to be safe...

@amirasn
Copy link

amirasn commented Apr 15, 2021

Hi @rmariboe . Did you succeed in implementing the solution for Pi to be constantly online ?

@scifiguy000
Copy link

I also have had situations where I would like to review Sentry clips remotely. On one occasion, my car was hit in a parking lot. I got a Sentry notification on my phone, but when I looked through the camera view, the driver had already left. I only found out much later when I went to my car that it had been hit. If I had a way to review the event that triggered the alert, I would have known to call police immediately. It worked out eventually, because the police tracked the hit and run driver by license plate from my Sentry videos, and the other party confessed (and, luckily, they were insured).

I'm using Rclone and a cellular hotspot. Would periodically executing "touch /tmp/archive_is_unreachable" trigger Sentry clip uploads (in this case, Google Drive)? I assume the car would miss any Sentry events happening while archiving.

@amirasn
Copy link

amirasn commented Aug 28, 2024

@scifiguy000 Interesting use case! We have developed a product that does that and also comes with an app that you can track your trips and make video request based the trips you make: https://discord.com/channels/629413353223225355/629413353223225357/1268029806440747110

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants