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.
It's not in the car yet, but my plan is to power it with 12V using this 6~14V power input + fan hat. On the bench I've got it hooked up with a 12V supply powering it via that hat.

Thanks for that link. I just ordered that same HAT, as it seems to be exactly what I wanted (including the fan). I like that it also has a power switch. After some research, it appears to be hit-and-miss on connecting anything directly to the 12V battery and experiencing battery sensor errors, with no one reporting any issues when coming off the DC power from inside the cabin. There are three identified locations that can be tapped.
  1. The existing 12V DC ("cigarette lighter") plug in the center console. See this video.
  2. A port under the driver side console close to the left side. This now appears to be used for the EU trailer hitch power line but was previously unused (or still unused) in US models. See this video.
  3. A wire in the wiring bundle in the left panel space on the driver's side in the foot well. See this video.
I am hoping to find someplace to squeeze it inside the center console or dash area someplace out of sight and additionally slip a USB hub between the USB hub that is in the center console and the car to hook it up, so that I'm not taking up either of the two USB ports in the center console. Plus, if anyone gets wise to the whole USB dashcam thing and starts stealing USB devices that are in the center console to try and cover up break ins, well, they won't find it :)
This is really a big driver for me too in wanting to hide the media storage device, but I also want to leverage the Pi for more and that's why the Pi 4 is more interesting to me. A couple of things I want to add right off the bat:
  1. Rsync of the music library. The goal is to keep my entire music library automatically synced to the car when it connects to the wireless at home.
  2. Plex Server (in a Docker container). This, combined with running the Pi 4 as a wireless access point, gives me a streaming media option to other passengers like kids in the back or me while sitting at a Supercharger. The built in web browser doesn't yet suppprt video streaming, but if/when it does then I can possibly use the center console too for such purposes. Mobile devices until then.
 
Thanks for that link. I just ordered that same HAT, as it seems to be exactly what I wanted (including the fan). I like that it also has a power switch. After some research, it appears to be hit-and-miss on connecting anything directly to the 12V battery and experiencing battery sensor errors, with no one reporting any issues when coming off the DC power from inside the cabin. There are three identified locations that can be tapped.
  1. The existing 12V DC ("cigarette lighter") plug in the center console. See this video.
  2. A port under the driver side console close to the left side. This now appears to be used for the EU trailer hitch power line but was previously unused (or still unused) in US models. See this video.
  3. A wire in the wiring bundle in the left panel space on the driver's side in the foot well. See this video.

This is really a big driver for me too in wanting to hide the media storage device, but I also want to leverage the Pi for more and that's why the Pi 4 is more interesting to me. A couple of things I want to add right off the bat:
  1. Rsync of the music library. The goal is to keep my entire music library automatically synced to the car when it connects to the wireless at home.
  2. Plex Server (in a Docker container). This, combined with running the Pi 4 as a wireless access point, gives me a streaming media option to other passengers like kids in the back or me while sitting at a Supercharger. The built in web browser doesn't yet suppprt video streaming, but if/when it does then I can possibly use the center console too for such purposes. Mobile devices until then.
It appears there is 12V plugged into the center console USB hub as well. The USB hub has a regular (well, it's wrapped in an automotive snap connector to prevent vibration from disconnecting it) full sized type B connector, as well as a second power connector with 12V/gnd on it, though I'm not sure what that one's exact configuration is (I've only determined the type B connector from looking at parts on ebay, haven't taken my car apart yet)
 
It appears there is 12V plugged into the center console USB hub as well. The USB hub has a regular (well, it's wrapped in an automotive snap connector to prevent vibration from disconnecting it) full sized type B connector, as well as a second power connector with 12V/gnd on it, though I'm not sure what that one's exact configuration is (I've only determined the type B connector from looking at parts on ebay, haven't taken my car apart yet)
You have to be careful. The model 3 has a tendency to throw errors when more is drawn from a particular circuit than the engineers expected. That's why so many people are tapping the accessory circuit that is already designed for user supplied equipment to be attached to.
 
You have to be careful. The model 3 has a tendency to throw errors when more is drawn from a particular circuit than the engineers expected. That's why so many people are tapping the accessory circuit that is already designed for user supplied equipment to be attached to.
Someone already used this USB power connector to tap 12V to install a 12V accessory outlet (which they then used for more USB power to charge phones because they were using the USB ports for data purposes) : 12v Socket in Front bin

They claim that as long as you're not hooking up a 12V oven you should be fine :)

I'm sure if they're charging two phones off of it that running a Pi 4 will be okay also. Granted, untested, YMMV, etc.
 
Someone already used this USB power connector to tap 12V to install a 12V accessory outlet (which they then used for more USB power to charge phones because they were using the USB ports for data purposes) : 12v Socket in Front bin

They claim that as long as you're not hooking up a 12V oven you should be fine :)

I'm sure if they're charging two phones off of it that running a Pi 4 will be okay also. Granted, untested, YMMV, etc.
Are you saying there’s 12V behind the FRONT USB ports that can be tapped? Just wanting to clarify, because we all know about the 12V at the rear of the center console - because there’s a standard 12V plus there.
 
Are you saying there’s 12V behind the FRONT USB ports that can be tapped? Just wanting to clarify, because we all know about the 12V at the rear of the center console - because there’s a standard 12V plus there.
Yeah, look at the thread I linked. He even posted a wiring diagram of the (power, not USB) cable that connects to the USB hub. Though he didn't seem to post pictures of the actual splicing he did.

Granted, I haven't seen anyone else use this method yet, so YMMV. And if you have the entire console out, you could easily just run 12V from the existing socket in the arm rest.

When/if I finally get around to taking it apart I plan to see if I can identify the specific connectors used for both locations (so anyone wanting to do something similar knows what sort to get) and see about getting both male and female connectors so I can make Y-cables that go between the existing car wiring and the end device and splits off power for the Pi, without any cutting/splicing/soldering/etc of the vehicle wiring (so it can all be cleanly removed).
 
Wanted to share some learnings based on my attempts to use a Raspberry Pi 4 in the car:

1. It appears that a USB hub attached to the Pi's USB-C port with USB A connectors will not pass on the OTG functionality. The OTG functionality what would allow the Pi to look like a USB drive to the car the same as the Raspberry Pi Zero W.

2. The car will not connect to a wifi hotspot that does not have an Internet connection. It actually delivers two different errors at different times. One is clear that it cannot connect to the Internet, so aborts the wifi connection. The other is that it cannot obtain an IP address through DHCP and then aborts the wifi connection.

3. Plex works great for all purposes. First, I can add any media like movies, tv shows, music, or photos. Second, I added a library that access the TeslaCam folder. This allows for viewing the videos in the car.

Still working on things, but trying to document along the way so I can share the details when it's all working.
 
Wanted to share some learnings based on my attempts to use a Raspberry Pi 4 in the car:

1. It appears that a USB hub attached to the Pi's USB-C port with USB A connectors will not pass on the OTG functionality. The OTG functionality what would allow the Pi to look like a USB drive to the car the same as the Raspberry Pi Zero W.

2. The car will not connect to a wifi hotspot that does not have an Internet connection. It actually delivers two different errors at different times. One is clear that it cannot connect to the Internet, so aborts the wifi connection. The other is that it cannot obtain an IP address through DHCP and then aborts the wifi connection.

3. Plex works great for all purposes. First, I can add any media like movies, tv shows, music, or photos. Second, I added a library that access the TeslaCam folder. This allows for viewing the videos in the car.

Still working on things, but trying to document along the way so I can share the details when it's all working.

1 - are you meaning connecting a hub via USB C to female A adapter (such that the Pi 4 is the host device) doesn't work? If so that's not really a surprise, Pi Zero never supported full USB OTG capability (dynamic switching between host and device mode - was toggled via a configuration setting set at boot) and the type C port on the Pi 4 is really just a USB 2.0 in Type C clothing. However, connecting the Pi 4 as a device (not host) should work (i.e. Tesla USB port > Hub > male A to C cable > Pi 4), though I haven't actually tested an extra hub in the mix yet, the direct Tesla USB to Pi 4 has been tested to work, and Tesla normally supports a hub, so that shouldn't change anything...

2 - This is interesting and something I had wanted to test, though I think a more useful test would be whether you can connect to a hotspot that provides an IP but no default route. If the car will let you then access something on that IP's network (i.e., a web interface to view the tesla videos - not that you can actually play videos in the Tesla's browser at the moment, but perhaps with v10) while still using LTE as default route for everything else (i.e., you could connect to this non-Internet hotspot on the Pi, and not break maps/slacker/etc), then that would be great.

3 - Are you saying you have Plex working in the car's browser for video playback, or just that you use your phone to view them through Plex?
 
1 - are you meaning connecting a hub via USB C to female A adapter (such that the Pi 4 is the host device) doesn't work? If so that's not really a surprise, Pi Zero never supported full USB OTG capability (dynamic switching between host and device mode - was toggled via a configuration setting set at boot) and the type C port on the Pi 4 is really just a USB 2.0 in Type C clothing. However, connecting the Pi 4 as a device (not host) should work (i.e. Tesla USB port > Hub > male A to C cable > Pi 4), though I haven't actually tested an extra hub in the mix yet, the direct Tesla USB to Pi 4 has been tested to work, and Tesla normally supports a hub, so that shouldn't change anything...
You are correct, I'm just saying a USB hub from the Pi USB-C port kills the OTG functionality.

2 - This is interesting and something I had wanted to test, though I think a more useful test would be whether you can connect to a hotspot that provides an IP but no default route. If the car will let you then access something on that IP's network (i.e., a web interface to view the tesla videos - not that you can actually play videos in the Tesla's browser at the moment, but perhaps with v10) while still using LTE as default route for everything else (i.e., you could connect to this non-Internet hotspot on the Pi, and not break maps/slacker/etc), then that would be great.
I'll check whether my DHCP is giving out a default route. It's definitely handing out addresses, because I was connecting other devices to it. I suspect your hypothesis isn't true about still working without a testable Internet connection. I can test this at some point by changing the settings of the wifi network the car uses at home. I can disable DHCP on it to see if the car complains the same. My theory is that it's similar to how iOS targets a known address (captiva.apple.com) to determine whether the network connection is also providing an Internet connection. So that means needing to attach a hotspot to the Pi or something to that effect.

3 - Are you saying you have Plex working in the car's browser for video playback, or just that you use your phone to view them through Plex?
I didn't check the scenario of using the car's browser because it could never connect to the Pi's wif. I will try this, knowing it won't fully work. Video might play, similar to how the browser will display (choppy) video from Google Meet. As Audio doesn't work in the browser for Google Meet, it might run into the same issue. Anyone with their car on the same network as an existing Plex server could try it too.

True that we'll see what Tesla adds to the codec support in the browser for v10. I'm cautiously optimistic.
 
Last edited:
Has anyone managed to get this to work with Google Drive?

I've followed the instructions to the letter, but it never seems to upload the videos anywhere, no obvious errors in the archiveloop.log either.

If anyones got a 'dummys guide' that is proven to work for Google Drive uploads, could you share please? :)
 
I'll settle for a dummy's guide to just getting this setup and running. I've been wanting to pull the trigger on this project for a while, but I'm intimidated by the programming & setup of the Pi, and I consider myself pretty tech-savvy.
If you go with the Pi Zero W and use the marcone/teslausb image then it's pretty easy and straightforward. Some of us are hacking on the newer Pi models and seeing if we can get some enhanced functionality. Don't mind us!
 
If you go with the Pi Zero W and use the marcone/teslausb image then it's pretty easy and straightforward. Some of us are hacking on the newer Pi models and seeing if we can get some enhanced functionality. Don't mind us!
@gmtom1 this is true. You essentially burn the downloaded image to an SD card, then edit one text file to enter your wifi info and what place it's supposed to upload the files to, then stick the SD card in the pi and boot... let it go for a few min while it configures itself and you're done.
 
Has anyone managed to get this to work with Google Drive?

I've followed the instructions to the letter, but it never seems to upload the videos anywhere, no obvious errors in the archiveloop.log either.

If anyones got a 'dummys guide' that is proven to work for Google Drive uploads, could you share please? :)

Google drive does not work for me either. Re-flashed several times, pretty sure it's not me.
 
Reassuring that it's not just me either, although frustrating it doesn't work!
Excuse the Pi noob response but I thought the earlier versions prior to the Marcone build had the capability to upload to google and other cloud services. I think (don’t flame me if I’m mistaken) you also had to enable Rsync and set up your cloud drive parameters. Don’t feel bad, I’m still trying to figure out how to upload the files to my Synology NAS. I put in all the information for the Synology in the .conf file but no luck.

Ie: archive server: ip of Synology
Sharename: shared folder in Synology-wonder if I have to use this? //volume1/shared folder name
Shareuser: user name to log onto Synology
Share password: password to log on to Synology
 
@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
 
Last edited: