@C141medic, here are the instructions that I wrote up for people at work. These are really just a rehash of the information that is on the Readme file on the GitHub repo. Follow the link to
marcone/teslausb and read the information that is there by the project’s author. Follow the link to the One-step Setup guide.
If you’ve actually tried this and it failed, one thing that may be throwing you for a loop is the cifs_version variable. I needed to uncomment that setting and change the value to 2.0 to work with my Synology DS415play.
Edit: if your cifs path to your storage is \\synology\teslausb\
archiveserver=synology
sharename=teslausb
—
Hardware required:
- Always-on CIFS server at home. This could be a desktop computer you leave powered up at all times, but I use a Synology DS415play from several years ago that stores my local Time Machine backups, a large Plex Media Server library, as well as runs nightly bi-directional offsite backups between my house and a similar unit at my parents’ house 25 miles away.
- Raspberry Pi Zero W (Pi Zero with built-in wi-fi capabilities) - Raspberry Pi Zero W - $10
- Raspberry Pi Zero Case - Adafruit Raspberry Pi Zero Case $4.75
- 6” Micro USB to Male USB A Cable - USB cable - 6" A/MicroB $2.95
- Micro SD card – 32 GB or larger
Setup Instructions
- Create a new “teslacam” account on your NAS box; create a new “teslacam” CIFS file share on your NAS box; assign permissions to the new share where the new teslacam account and your normal account have access to the new share
- Download current software release from marcone/teslausb and extract image file from within zip file
- Download balenaEtcher from balenaEtcher - Home
- Flash image onto Micro SD card using balenaEtcher
- Mount new flash drive on your Mac/Windows/Linux computer to configure the setup process. In the root directory of the /boot volume on the SD card, there’s a teslausb_setup_variables.conf.sample file. Duplicate this to teslausb_setup_variables.conf in the same directory and edit the file as necessary
- I’ve highlighted the lines below that I needed to change.
- The cifs_version line needed to be uncommented and set to version 2.0 to work with the Synology DSM software. I figured this out by having a HDMI cable on the Pi Zero to see the mount.cifs error message and then ssh’ing into the box to debug further. You may or may not run into similar issues with your file server.
- If you edit the timezone line, you also need to uncomment the line
- Eject (Safely Remove) the /boot volume from your computer and insert the Micro SD card into the Pi Zero
- Plug the USB cable into the “USB” port on the Pi Zero. Do not use the PWR port! The PWR port is only valid for power, where the USB port can power the Pi Zero and also allow the computer to see the device on the USB bus. This took a while to figure out because everyone assumed it was obvious which port you would use.
- Test the Pi Zero by plugging the USB cable into your computer. On the first boot, it takes about 5 minutes to configure the Pi Zero. After that, it takes 30-60 seconds for the Pi Zero to boot. When it has booted, you will see the green status LED flash once every second. At this time, you should see a CAM volume on your computer. It will contain the required TeslaCam folder.
- Eject the CAM volume and disconnect the Pi Zero from your computer.
- Plug the Pi Zero into one of the front USB ports on your Tesla and the dashcam should be active
- When you arrive at home, the Pi Zero will automatically login to your wi-fi network and copy any new video files from the media to your NAS server
- Review the videos on your home computer my mounting the teslacam network share.
teslausb_setup_variables.conf
#####################################################################
# 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.
#
######################################################################
# Default variables for CIFS (Windows/Mac file sharing) setup
export ARCHIVE_SYSTEM=cifs
export archiveserver=your_archive_name_or_ip
export sharename=your_archive_share_name
export shareuser=username
export sharepassword=password
# export cifs_version="3.0"
export camsize=100%
# if you set camsize to less than 100%, but don't want music to use
# all the remaining space, you can specify how much space you want
# music to use by setting this variable
#export musicsize=4G
# 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='your_ssid'
export WIFIPASS='your_pass'
# If doing a headless (i.e. automatic) setup
export HEADLESS_SETUP=true
# uncomment to enable a samba server that exports the recordings
#export SAMBA_ENABLED=true
# uncomment to enable guest access to the samba server
#export SAMBA_GUEST=true
# uncomment if you want to set the time zone to something other than the default 'BST'
# Can be an actual timezone, or "auto" to attempt automatic timezone detection
# export timezone="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-Model3
# Uncomment if setting up Pushover push notifications
# export pushover_enabled=false
# export pushover_user_key=user_key
# export pushover_app_key=app_key
# Uncomment if setting up Gotify push notifications
# export gotify_enabled=false
# 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=false
# export ifttt_event_name=put_your_event_name_here
# export ifttt_key=put_your_key_here
# 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.
# 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 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