Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

Anyone still rocking a Pi Zero W smart drive for TeslaCam on Sentry Mode?

This site may earn commission on affiliate links.
RecentClips are not automatically exported outside of the RPi at all, see marcone/teslausb and marcone/teslausb
If something happened that is not recorded by the SavedClips and you need to access the RecentClips (more than the usual 1 hour will be saved in the snapshots) you need to get them off the system manually.

Most of the conversation at marcone's GitHub site is way over my head, and I'm afraid I'm missing your point of the links you posted. I'd thought I'd read both here & there that it now was supported?

How does one "get them off the system manually"? They're not in my RecentClips folder, and they're not archiving to my server.

I can see that the snapshots have been created by ssh'ing to the RPi and looking at the /backingfiles and/or just viewing the archiveloop.log file. If I drill down to an individual snapshot directory, there's a folder in there with a "toc" extension ("table of contents," presumably)--it turns out that that's just a text file with a list of filenames... each of the back/front/left/right-plus-timestamp format of the dashcam vids. They certainly DO appear to "be there"...

...but I can't see how to "get to" them?
 
You can mount your CIFS share manually and copy the files to it while logged in on the RPi. It's pretty easy to add automatically copying the RecentClips along with the SavedClips but do you really want to keep complete video footage of all your drives? That quickly adds up to many gigabytes of data and hours and hours of video.

A simple (untested) patch is here:
RichieB2B/teslausb
Also archive RecentClips over CIFS · RichieB2B/teslausb@86e60ac
 
Last edited:
  • Helpful
Reactions: Jughead135
You can mount your CIFS share manually and copy the files to it while logged in on the RPi. It's pretty easy to add automatically copying the RecentClips along with the SavedClips but do you really want to keep complete video footage of all your drives? That quickly adds up to many gigabytes of data and hours and hours of video.

A simple (untested) patch is here:
RichieB2B/teslausb
Also archive RecentClips over CIFS · RichieB2B/teslausb@86e60ac

OK, thanks!

I'd also asked this question on the GitHub teslausb site, and marcone himself gave essentially the same answer (unsurprising). As I responded to him over there: this is a huge forehead-slap for me. In looking at the files in my archive and the files on the "flash drive" when I had the Pi plugged in to my PC, I completely forgot that what Windows is seeing is an emulation--it never occurred to me to set up a network drive to look at it.


OK, so keeping "everything" is completely untenable--got it. My thought had been to keep "X" days worth on the archive, combined with some file management tool to delete anything older than "X." Now that I see how that works, though, I guess I'm better off leaving it on the RPi*, and just accessing it if/when I need it...?

I'll play with your patches, thanks for the pointers. Now that I know everything is working properly, I can fiddle around to see what's best for me.

I'm finding Samba over my wifi is painfully slow--on the order of 1.5MBps. I see there's some commentary on this over on marcone's site, I haven't dug into it yet. Any suggestions on that?

Again, thanks for the help!!



*I have a 128GB micro SD card in the Pi, with CamSize & MusicSize set to 16GB each. Even with the system partitions and overhead, that leaves me with 80+GB of free space for the snapshots--which ought to easily cover any reasonable length of time. Is this the math you did re "many gigabytes of data and hours and hours of video"?
 
I am failing to get this setup...

I have loaded the Marconi image OK but when I attempt to SSH to [email protected] it is not found. I CAN SSH to [email protected] OK so obviously the 'setup' scripts aren't running. I have reloaded a clean image via etcher several times to no avail.

Any quick suggestions on why the proprietary scripts aren't running??

THANKS in advance!

I set this up a couple days ago (for the second time) and it appears that the default hostname code/logic isn't working as you have also encountered but everything else seems to have worked. In the config file there is a host name override that you can set (e.g. set to 'teslausb') and it should work as you are expecting.
 
I set this up a couple days ago (for the second time) and it appears that the default hostname code/logic isn't working as you have also encountered but everything else seems to have worked. In the config file there is a host name override that you can set (e.g. set to 'teslausb') and it should work as you are expecting.

Thanks for the help and quick reply! I have tried this and still no joy, it seems to ignore the setup files. I can still connect using the default [email protected].

It did create a setup log file which just shows instances of 'Thu 23 Jan 00:17:31 GMT 2020 : Detecting whether to update wpa_supplicant.conf' for each attempt. Again this seems to suggest the configuration files/scripts are not being referenced.

I am running on Mac so cannot use Notepad++ so am using Visual Studio. Could it be I have saved the amended file (teslausb_setup_variables.conf) in the wrong format? They show as Plain Text. It has to be something really simple/stupid on my part.

I've pasted the contents of the above file below replacing my SSID and Password with placeholders...

Thanks again for any assistance.


#####################################################################
# SAMPLE CONFIGURATION FILE FOR TESLAUSB Pi Setup
#
# Example config file for teslausb_setup. Lines with "#" are comments/ignored.
# Remove the "#" before "export" to activate a line. Be sure to rename this file
# to "teslausb_setup_variables.conf" and place it in the "boot" folder of your
# SD card.
# Please check the latest version of this file at:
# marcone/teslausb
#
######################################################################

# Default variables for CIFS (Windows/Mac file sharing) setup
export ARCHIVE_SYSTEM=cifs
export ARCHIVE_SERVER=your_archive_name_or_ip
export SHARE_NAME=your_archive_share_name
export SHARE_USER=username
export SHARE_PASSWORD=password
# export cifs_version="3.0"

# Uncomment the following line and select drive if you want to use an external drive instead of built-in MicroSD card.
# External USB drive is supported only for RPi4.
# export USB_DRIVE=/dev/sda

# Uncomment to disable snapshots. This also disables samba and RecentClips-extension
#export SNAPSHOTS_ENABLED=false

# Recommendations on image sizes:
# Notes:
# * You can use relative sizes to the available space (e.g., 10%) or explicit sizes (e.g., 16G)
# * The /backingfiles partition holds both the camera and music disk images.
# * Please note that the setup script will reserve a fixed 6GB of free space regardless of sd card size.
# When using snapshots:
# Using images that fill the entire available space will make snapshots inoperable.
# The system removes snapshots when the available space on the /backingfiles partition falls
# below the size of the camera image.
# * CAM_SIZE should be a fairly small explicit value to leave room for the snapshots.
# The recommended size is between 8GB and 16GB.
# * MUSIC_SIZE should also be an explicit size but should be large enough to hold your music
# library (obviously).
# When not using snapshots:
# It is usually easiest to specify an explicit size for your music drive based on your actual
# library plus an expected growth factory. You can then set the camera size to a portion of the
# remaining space.
# * CAM_SIZE should still be a fairly small explicit value. The size is determined by the number of
# sentry mode and saved clips you expect to have before the RPi can offload them.
# * A single SentryClips/SavedClips event is about 1.2GB (MCU2.5) to 1.5GB (FSD) of data.
# * The hour of RecentClips is about 6.9GB (MCU2.5) to 8.8GB (FSD) of data.
# The car will delete clips from the RecentClips that are older than an hour.
# * MUSIC_SIZE can be an explicit or relative size but should be large enough to hold your music
# library (obviously).
export CAM_SIZE=16G
#export MUSIC_SIZE=128G

# If you want to automatically copy music from a CIFS share every time
# the Pi connects to wifi, set the following variable. The share is
# assumed to exist on the same server as the archive share. It can
# be the same share as the share used for backing up recordings, but
# the folder needs to be different.
# export musicsharename=your_music_share/music_folder

# Wifi setup information. Note that Raspberry Pi Zero W only supports 2.4 GHz wifi
export SSID='Myssid'
export WIFIPASS='password'

# If doing a headless (i.e. automatic) setup
export HEADLESS_SETUP=true

# uncomment to enable a samba/cifs server that makes the recordings
# available as a network share
#export SAMBA_ENABLED=true
# uncomment to enable guest access to the samba server
#export SAMBA_GUEST=true

# uncomment to enable teslausb to act as a wifi access point with the given
# SSID, so you can access it while on the road.
#export AP_SSID='TESLAUSB WIFI'
# Change this! The setup script will not accept the default 'password'
# Also note that the wifi password must be at least 8 characters.
#export AP_PASS='password'
# IP address is optional. The AP will give its clients IP addresses in the
# x.x.x.100-150 range so make sure you don't put the AP's IP address in
# that range.
#export AP_IP='192.168.66.1'

# uncomment if you want to set the time zone to something other than the default 'BST'
# Can be an actual time zone, or "auto" to attempt automatic timezone detection
# export TIME_ZONE="America/Los_Angeles"

# By default there is a 20 second delay between connecting to wifi and
# starting the archiving of recorded clips. Uncomment this to change
# the duration of that delay
# export archivedelay=20

# Uncomment if you want to override the default hostname of "teslausb"
export TESLAUSB_HOSTNAME=teslausb

# Uncomment if setting up Pushover push notifications
# export pushover_enabled=true
# export pushover_user_key=user_key
# export pushover_app_key=app_key

# Uncomment if setting up Gotify push notifications
# export gotify_enabled=true
# export gotify_domain=https://gotify.domain.com
# export gotify_app_token=put_your_token_here
# export gotify_priority=5

# Uncomment if setting up IFTTT push notifications
# export ifttt_enabled=true
# export ifttt_event_name=put_your_event_name_here
# export ifttt_key=put_your_key_here

# Uncomment if setting up AWS SNS notifications
# export sns_enabled=true
# export aws_region=us-east-1
# export aws_access_key_id=put_your_accesskeyid_here
# export aws_secret_key=put_your_secretkey_here
# export aws_sns_topic_arn=put_your_sns_topicarn_here

# tesla_dashcam / Trigger file support.
# Uncomment any trigger_file_xxxxx below if you'd like to create trigger file(s) in the
# archive directory for the listed clip type after all clips have been transferred for that type.
# eg; export trigger_file_saved=ARCHIVE_UPLOADED would create a file in $ARCHIVE_BASE/SavedClips/ARCHIVE_UPLOADED on your CIFS / Samba server.
# This is useful if using ehendrix23/tesla_dashcam to further process clips.
# eg; tesla_dashcom --monitor --monitor_trigger $ARCHIVE_BASE/SavedClips/ARCHIVE_UPLOADED $ARCHIVE_BASE/SavedClips
#
# You may modify the value to your desired trigger filename, if you so choose. Remember to alter your tesla_dashcam trigger filename to match.
#.
# export trigger_file_saved=ARCHIVE_UPLOADED
# export trigger_file_sentry=ARCHIVE_UPLOADED

# TeslaUSB can optionally use the Tesla API to keep your car awake, so it can
# power the Pi long enough for the archiving process to complete. To enable
# that, please provide your Tesla account email and password below.
# TeslaUSB will only send your credentials to the Tesla API itself.
#
# NOTE: if you do this, it's highly recommended that you set up 'PIN to Drive'
# as if the Pi or the car is stolen, the thief has access to your Tesla account
# and could change the password, add their own devices as a key, steal the car,
# etc. If either is stolen, CHANGE YOUR TESLA PASSWORD IMMEDIATELY.
#
# ALSO NOTE: having sentry mode enabled in your Tesla will keep your car awake.
# But, make sure you have not excluded your home in the sentry mode settings.
#
# export [email protected]
# export tesla_password=teslapass
# Please also provide your vehicle's VIN, so TeslaUSB can keep the correct
# vehicle awake.
# export tesla_vin=5YJ3E1EA4JF000001

# Uncomment if you want to increase the size of the root
# filesystem so there's extra space for installing additional
# software. This only works if the backing store partition hasn't
# been created yet, i.e. during early setup, and requires an extra
# reboot. Sizes can be specified as for example "500M" or "2G"
# export INCREASE_ROOT_SIZE=500M

# Uncomment and change if you want setup scripts to be pulled
# from a different repo than github.com/marcone/teslausb
# export REPO=marcone

# Uncomment and change if you want a different branch than main-dev
# export BRANCH=main-dev
 
Are you putting the teslausb_setup_variables.conf file on the card after you load the image and before you fire up the card in the raspberry pi? Are you putting it in the root folder of the card? There should be a .sample file in the same folder already.
 
Hi hrmax, the file is already there. I added my specifics to it (just edit my wfi credentials) then boot the Pi. I have renamed the file (removing the .sample at the end) at the same time. I also tried leaving with the .sample at the end in case the script was renaming. Really appreciate your input.
 
I also find that frequently the pi@teslausb doesn't work in ssh... but [email protected] does (inserting whatever IP address you're using). I have no background in Linux or the SSH protocol, so I don't know if that's typical or not. Going directly to the IP works every time for me (when the Pi is up & running, of course).

Thanks for the info, the issue is I can reach it under default of [email protected] (or the IP variant as you suggest) so it appears that whatever scripting is on it to 'amend' the settings to become setup for 'TesaUSB' function as opposed to a standard raspberry pi is not happening/running. I am going to try another clean install and then run the setup file directly - emphasis on try I am not entirely sure how to...
 
Yes, using vi to edit the file.

What am I doing wrong here? Terminal says cannot find the file - do I have the path wrong or something?


upload_2020-5-15_12-48-2.png
 
For whatever reason this just won't work in my setup. I have spent hours on this. It doesn't work. For whatever reason the 'one step setup' doesn't work. It's not placing the files needed and I cannot figure which are missing, why and how to resolve. Incredibly frustrating.

I am using the image referenced here: marcone/teslausb

Here's a screenshot to illustrate when I try to 're-run' the setup files from within Terminal.

upload_2020-5-15_15-36-50.png