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.
Well, it depends on your risk appetite. While the special SSID for my "internet of things" gives me some peace of mind, having passwordless ssh keys to my server on a RPi in my car does not appeal to me at all.

You could have it go to a new user with limited access. Worse case if your car is compromised they have limited access until you kill the associated key.
 
That's how things should always be for service accounts. Should someone steal your PI and wander over to your house, all they should be able to do is add new files to your TeslaCam share. Yes, write-only access is a thing (though it does preclude stateful tooling such as rsync)!
 
In my case, the wifi network the Pi is on is not the same as my home network (don’t ask - apartment life). So I’m actually sending the videos over the internet. My NAS/server already has SSH set up so I preferred to use rsync-over-SSH vs opening samba to the world (also I suspect the rsync/SSH approach is probably more reliable than samba in this scenario although I haven’t tested it).

Not really bothered about the CPU usage cost of SSH, as long as it works and the Pi doesn’t melt a hole through my car (not yet!).
 
I use rsync. What issues are you having? I followed the rsync section of the guide and worked fine.
Thanks. I eventually got it to work for the cam, but then realized that (r)syncing music in the other direction (ie to the car) wasn't even offered in principle yet. Surely there must be forks of Marcone's which do that.
Then I gave up and installed samba and everything might be working reasonably now. Except that the raspberry hung once already -- I noticed that dashcam was not on offer, so I had to pull out the USB and stick it back in to reboot. I don't want to have to stress about that all the time, so if it happens again I'll ditch the raspberry.

What I really want is for the raspberry to simply initiate, whenever it wakes up, a reverse ssh tunnel to a bigger server at work.
Then I could have that server wake up the car (ie turn on sentry mode, using the Tesla API) at 2am every night, initiate the sync and various operations from its end, and then turn the car (sentry) off again when complete. My bandwidth is free at night, and with the operation controlled from outside, I wouldn't have to worry about whether the raspberry has been on long enough each day to finish transferring.
 
This thread has been incredibly helpful, thank you to all who have posted!

Yeah, don't use camsize=100% unless your SD card is rather small. The Tesla will only store one hour no matter how much room there is, the code on the pi pulls them off to its internal partition so that you can keep more footage.

Quoting DopeGhoti here for the most succinct version of what many said here--this was my biggest stumbling block getting this set up, so I was especially glad to find this info.

For anyone else having trouble, marcone's GitHub page (README) refers anyone who has "never worked with Raspberry Pi before, don't know what a Windows share is, or just want to see what this is all about" to a YouTube vid which recommends the exact opposite, i.e., using the entire volume, with whatever small share set aside for music is desired. The sample configuration file included with the latest release version (teslausb-20190615, v1.3) also defaults to 100% cam size, with only the vaguest hints toward doing any differently.

As I say, this thread got me going in the right direction. The key is an inconspicuous and slightly ambiguous phrase found on the One Step Setup instructions:
marcone said:

That "lastest sample" incorporates all the changes discussed here, and is also better remarked. I highly recommend anyone starting on this be sure to copy/past from the online sample instead of using the one included with the download.

I haven't had a chance to go for a long enough drive to put it through it's paces, but, my Pi drive is working flawlessly for everything else. Thank you once again for everyone who posted here before!
 
  • Informative
Reactions: DopeGhoti
Not to poke a hornet's nest from another thread, but: if you do this, be sure the power bank you choose has pass-through charging. A lot of cheaper ones can recharge their batteries or send power to other devices, but not both at the same time.

Is there any such animal as a pass-through charger AND data hub?

Ideally I'd like to plug one USB cable into one USB port in the car, and let the car simultaneously charge the battery and feed data to the hub; and one USB cable into one USB port on the gadget, powering the RPi and connecting it to the car's data. I want the smallest form-factor available: this isn't really serving as a "charger" for anything, just keeping the RPi on long enough to do its thing for uploading vids.

car <---> battery/hub <---> RPi [where each connection represents a single USB cable]

The closest I've found is this:
https://www.amazon.com/gp/product/B075Q5VLGK

I can't quite find any documentation saying it will do what I want--it appears to need USB-C to do that??


Related question: How long does it take? These vids appear to be multi-gigabyte files--I don't expect that to reliably upload in the ~2 minutes it takes the car to turn off the power to the USB. If I can't find what I want for pass-through power AND data, I guess the answer is to plug a power AND a data cable in (then put a pass-through power only gadget inline)? Either that, or leave Sentry on at home?

How have you guys skinned this cat??
 
Last edited:
And, one "new" question of my own:

As I said in an earlier post, I installed the latest release version (teslausb-20190615, v1.3).

There are also two beta versions on the page: teslasusb-buster-20190922, v2.0-beta; and teslausb-20200122, v2.0-beta.2.

I figured as a guy who doesn't speak Linux and who's never touched a Raspberry Pi before, I'd better stick with final versions. My decision was helped by marcone's comments on the beta, "When using a Raspberry Pi Zero W, the old Stretch-based v1.3 image will also work." (I am indeed using a RPi Zero W.)

So far, so good, w/ v1.3 for me. Do I need to "care" about "upgrading"? Is it even an upgrade? What does the beta do for me that the previous version won't? What's the nutshell version of the difference between "Stretch" and "Buster" (bearing in mind that I don't speak Linux)?
 
Related question: How long does it take? These vids appear to be multi-gigabyte files--I don't expect that to reliably upload in the ~2 minutes it takes the car to turn off the power to the USB. If I can't find what I want for pass-through power AND data, I guess the answer is to plug a power AND a data cable in (then put a pass-through power only gadget inline)? Either that, or leave Sentry on at home?

How have you guys skinned this cat??
There's a simple solution to that scenario. Give your Pi configuration your Tesla account credentials. The Pi will then use those solely for the purpose of keeping the car awake if data transfer is still occurring. If the data transfers in the less than 2 minutes, nothing different happens. If the data transfer isn't done, the Pi will use the credentials to keep the car awake until the transfer completes.
 
There's a simple solution to that scenario. Give your Pi configuration your Tesla account credentials.

Yeah, saw that feature, and it gave me pause. Then I read marcone's discussion of the security implications (some gets your Pi, they get your car), and I've resisted the temptation thus far....

Anyone else / who all is using this feature? Am I making too big a deal out of it?


PS: PIN to drive is a non-starter for me. The whole goal of this project is to make it seamless--adding an aggravation (no matter how trivial) every time I get in the car runs contrary to that.
 
Follow-up:

Took a long drive yesterday (purely in the interest of science, you understand...! :D ), made sure to get both a "SavedClip" (honked the horn) and "SentryClip" recordings. Two different drives: one about :40 minutes (from which I got both saved clips, verified on the DashCam viewer); and the second of about 1:20 or so. Deliberately left Sentry Mode on when I got home to ensure it stayed awake. The Pi connected no problem and did its thing... mostly.

What I'd hoped/expected to happen was I'd get about 2 hours' worth of "RecentClips" (less the 2x ~:10 minutes or so for the two saved clips), along with the "SavedClips" and "RecentClips" recordings.

What I actually got was the saved & Sentry clips... but nothing for general dashcam in the Recent.
EDIT TO ADD: I should note, the dashcam recording icon was on the whole time (and, of course, it got the saved bit). I also verified it's recording by plugging the Pi directly into my PC and letting it boot up & produce it's "flash drives." There's a recording of my garage (well over an hour had passed since the drive by the time I looked, and I'd woken up the car fetching the Pi) in the expected place.

Here's the only thing I see in the conf file on the subject:
marcone said:
# Uncomment to disable snapshots. This also disables samba and RecentClips-extension
#export SNAPSHOTS_ENABLED=false

I have not un-commented it, because I do want to be using RecentClips.

Is there something else I need to be doing to enable it? Something like explicitly set SNAPSHOTS_ENABLED=true?
 
Last edited:
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.
Yes, that's the same approach (or limitation?) taken by Tesla's on-board dashcam viewer. Probably because there would be too many extraneous recordings to have to wade through if they were included.
 
Yeah, saw that feature, and it gave me pause. Then I read marcone's discussion of the security implications (some gets your Pi, they get your car), and I've resisted the temptation thus far....

Anyone else / who all is using this feature? Am I making too big a deal out of it?
I use it. If someone steals the Pi, I'd simply change my Tesla account password. This has the added benefit of expiring all of the tokens in use.
 
  • Informative
Reactions: Jughead135