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

Not recording continuously #909

Open
Z33-6 opened this issue Jan 6, 2025 · 18 comments
Open

Not recording continuously #909

Z33-6 opened this issue Jan 6, 2025 · 18 comments

Comments

@Z33-6
Copy link

Z33-6 commented Jan 6, 2025

Describe the problem

I have installed the 20211106.2 without any problems and it works absolutely fine for sentry recordings but doesn’t quite work properly for dashcam recordings. Correct me if I am wrong but I thought TeslaUSB was supposed to continuously record when driving so that I do not need to manually save any footage. On all of my journeys so far since the install, I might get one or 2 clips saved which will be around a few minutes. This is usually well into my journey, so nothing from beginning to end continuously, only usually a few clips towards the end of the journey. What could be wrong? When parked with the car on, it seems to record more often but during the actual drive, not so much

Device

Raspberry Pi Zero 2 W

OS Image

Prebuilt TeslaUSB image

Car Model

Model 3

USB connection

Glove box

Logs

diagnostics.txt

Additional information

No response

@marcone
Copy link
Owner

marcone commented Jan 6, 2025

Perhaps SNAPSHOT_INTERVAL needs to be set for your location?

@Z33-6
Copy link
Author

Z33-6 commented Jan 6, 2025

How do I know what the interval needs to be for my location? I am in the UK that helps.

@marcone
Copy link
Owner

marcone commented Jan 6, 2025

You can start by just using the export SNAPSHOT_INTERVAL=480 line from the current config file. If that doesn't solve the issue, please download diagnostics from the web interface and attach them here.

@Z33-6
Copy link
Author

Z33-6 commented Jan 8, 2025

So I used the default export SNAPSHOT_INTERVAL=480 line and I think it may have made things worse. Yesterday it was just randomly recording 30-60 second clips a few times every hour. After a few hours of this, it would do nothing for the next few hours before going back to a few 30-60 seconds every hour. This was whilst the car was parked. I drove the car in the evening, doing two 30 minute trips and none of these trips were recorded. It looks like the trips occured in the few hours of nothing gap mentioned above.

@marcone
Copy link
Owner

marcone commented Jan 8, 2025

Does the car show a red dot on the camera icon? It kind of sounds like the car isn't seeing the Pi's drive, or only intermittently.
If you can, leave the car parked within wifi range and with sentry mode enabled for a few hours, then download diagnostics from the web interface.

@marcone
Copy link
Owner

marcone commented Jan 10, 2025

I missed that you said it works fine for sentry but not for dashcam. Could it be that you have a loose connection somewhere or a bad cable, and vibration from driving is making the car repeatedly lose and regain the connection to the Pi?

@Z33-6
Copy link
Author

Z33-6 commented Jan 10, 2025

I did a few trips yesterday evening and again both of those trips did not get recorded. On one occasion I even pressed the dashcam icon on screen to manually saved the recording. This displayed a green check mark to confirm it had been saved but the recording is nowhere to be seen in TeslaUSB nor can I see it from the Tesla App under the new dashcam clips section. I have attached the logs in the opening post so you can take a look.

@marcone
Copy link
Owner

marcone commented Jan 11, 2025

I don't see any obvious problems in the logs, though it's weird that when the free space manager deletes older snapshots to free up space that it sometimes deletes so many in a row. On my own device I see it delete up to 10 at a time to free up space, but in your logs I see it deleting up to 85 in a row.
When it's taking a new snapshot though, it always finds new files, so it does look like the car is continuously recording.

Where are you actually looking for these recordings and see them missing?

@Z33-6
Copy link
Author

Z33-6 commented Jan 12, 2025

I am looking for them under recent clips using the web ui. Yesterday I drove between 19:14 and 19:28 but its not showing in the recordings. Please see the screenshot attached to see that there is no recording that covers the time I was driving.

IMG_9614

Also, on a side note, I have noticed that when I am trying to access the folder for the current day’s recordings via the web ui, 9 times out of 10 I get a 500 Internal Server Error message displayed on screen instead. This doesnt happen for previous days’ folders

@marcone
Copy link
Owner

marcone commented Jan 12, 2025

Can you grab another diagnostics or archiveloop log and attach it here?

@Z33-6
Copy link
Author

Z33-6 commented Jan 12, 2025

Here is the archiveloop log file.

archiveloop.log

@marcone
Copy link
Owner

marcone commented Jan 12, 2025

So assuming that when you said that you drove yesterday between 19:14 and 19:28 you were talking about Friday the 10th of January, and that you're in the GMT time zone, here are the logs from around that period:

Fri 10 Jan 19:16:30 GMT 2025: taking snapshot of cam disk in /backingfiles/snapshots/snap-000734
Fri 10 Jan 19:16:39 GMT 2025: took snapshot
Fri 10 Jan 19:16:40 GMT 2025: comparing new snapshot with /backingfiles/snapshots/snap-000733/snap.bin
Fri 10 Jan 19:16:40 GMT 2025: making links for /tmp/snapshots/snap-000734, retargeted to /backingfiles/snapshots/snap-000734/mnt
Fri 10 Jan 19:17:12 GMT 2025: made all links for /tmp/snapshots/snap-000734
Fri 10 Jan 19:17:36 GMT 2025: low space, deleting /backingfiles/snapshots/snap-000650
Fri 10 Jan 19:25:12 GMT 2025: waiting up to 90 seconds for idle interval
Fri 10 Jan 19:25:14 GMT 2025: write in progress
Fri 10 Jan 19:25:22 GMT 2025: no longer writing, wrote 132227072
Fri 10 Jan 19:25:28 GMT 2025: no writes seen in the last 5 seconds
Fri 10 Jan 19:25:28 GMT 2025: taking snapshot of cam disk in /backingfiles/snapshots/snap-000735
Fri 10 Jan 19:25:37 GMT 2025: took snapshot
Fri 10 Jan 19:25:39 GMT 2025: comparing new snapshot with /backingfiles/snapshots/snap-000734/snap.bin
Fri 10 Jan 19:25:39 GMT 2025: making links for /tmp/snapshots/snap-000735, retargeted to /backingfiles/snapshots/snap-000735/mnt
Fri 10 Jan 19:26:12 GMT 2025: made all links for /tmp/snapshots/snap-000735
Fri 10 Jan 19:26:24 GMT 2025: low space, deleting /backingfiles/snapshots/snap-000651
Fri 10 Jan 19:34:12 GMT 2025: waiting up to 90 seconds for idle interval
Fri 10 Jan 19:34:18 GMT 2025: write in progress
Fri 10 Jan 19:34:26 GMT 2025: no longer writing, wrote 132730880
Fri 10 Jan 19:34:32 GMT 2025: no writes seen in the last 5 seconds
Fri 10 Jan 19:34:32 GMT 2025: taking snapshot of cam disk in /backingfiles/snapshots/snap-000736
Fri 10 Jan 19:34:41 GMT 2025: took snapshot
Fri 10 Jan 19:34:43 GMT 2025: comparing new snapshot with /backingfiles/snapshots/snap-000735/snap.bin
Fri 10 Jan 19:34:43 GMT 2025: making links for /tmp/snapshots/snap-000736, retargeted to /backingfiles/snapshots/snap-000736/mnt
Fri 10 Jan 19:35:08 GMT 2025: made all links for /tmp/snapshots/snap-000736

so it took 3 snapshots that cover some part of your drive, and each snapshot differed from the previous one, so it looks like the car was recording during that time (though technically it's possible the car didn't record anything new and only deleted previously recorded stuff).
These snapshots were deleted as part of a mass delete of 78 snapshots on Saturday starting at 12:27, which is why you will no longer see those recordings now.
Can you ssh into the Pi and do:

sudo -i
mount /mnt/cam
df -h /mnt/cam
umount /mnt/cam

and reply here what it says?

@Z33-6
Copy link
Author

Z33-6 commented Jan 12, 2025

Filesystem      Size  Used Avail Use% Mounted on
/dev/loop0      120G   46G   75G  38% /mnt/cam

@marcone
Copy link
Owner

marcone commented Jan 13, 2025

That looks fine. I am frankly at a loss as to why your setup is behaving the way it is. I will try adding some more logging to debug further.

@Z33-6
Copy link
Author

Z33-6 commented Jan 13, 2025

I’ll just reinstall it and see if that sorts this issue out.

Just to be clear, the dashcam is expected to continuously record without the need to manually (using horn or pressing icon) save the clips right?

Also, should the dashcam clips not stay on the sd card for longer than a few days? Its a 256gb card of which 120gb was selected for cam

@marcone
Copy link
Owner

marcone commented Jan 16, 2025

I’ll just reinstall it and see if that sorts this issue out.

Just to be clear, the dashcam is expected to continuously record without the need to manually (using horn or pressing icon) save the clips right?

Dashcam should record whenever the car is on. See here for more details.

Also, should the dashcam clips not stay on the sd card for longer than a few days? Its a 256gb card of which 120gb was selected for cam

TeslaUSB will keep older recordings until the space is needed for newer recordings. I would suggest setting CAM_SIZE a lot smaller than 120 GB though, unless you have a specific reason for it to be that large.

Did reinstalling fix the issue?

@Z33-6
Copy link
Author

Z33-6 commented Jan 17, 2025

TeslaUSB will keep older recordings until the space is needed for newer recordings. I would suggest setting CAM_SIZE a lot smaller than 120 GB though, unless you have a specific reason for it to be that large.

Is there a particular reason it should be a lot smaller? I have a 256 GB card which has no other use besides TeslaUSB, so I thought the more space I give it then the more recordings it can hold at once. I was actually thinking of just increasing it to over 200 GB.

Did reinstalling fix the issue?

The last 2 days I did a few short trips and they have appeared in my recordings so I just want to give it a few more days to see if the issue sorted itself out.

@marcone
Copy link
Owner

marcone commented Jan 17, 2025

I thought the more space I give it then the more recordings it can hold at once

That's now how TeslaUSB works. The CAM_SIZE you specify is the size of the drive that the car will see. Within that drive, the car will still only keep one hour of dashcam footage. To keep more than an hour, TeslaUSB needs to copy the older footage before the car deletes it. TeslaUSB needs space to store those copies, but if all the space is already used (because you specified 120G or even 200G for the drive size) then TeslaUSB can't do that.

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

2 participants