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

USB Drive for Sentry Mode and more

This site may earn commission on affiliate links.
Many of the bulkier USB devices seem to be prone to intermittent USD plug/socket electro-mechanical issues. So make sure that the USB plug has a robust fit and is adequately supported - my SD card adaptor is velcro'd to the underside of the phone shelf.
Can i ask which adapter you have? should I be looking at a neat one likehttps://www.amazon.co.uk/Anker®-Rea...897175&sprefix=anker+micro+sd+,aps,174&sr=8-3
or one with a wire like
https://www.amazon.co.uk/Anker-Upgraded-Version-High-Speed-Support/dp/B00PBXPM68/ref=dp_ob_title_ce

Or am i other thinking this? does the card reader actually affect performance?

Also, are either of these ok:
https://www.amazon.co.uk/gp/product/B07CYFR48N/ref=ox_sc_act_title_2?smid=A3P5ROKL5A1OLE&psc=1
https://www.amazon.co.uk/gp/product/B07FCMKK5X/ref=ox_sc_act_title_1?smid=A3P5ROKL5A1OLE&psc=1

Please feel free to offer your opinions
 
Not cheap, but £30 can score you a Raspberry Pi Zero - Wifi variant
https://www.amazon.co.uk/Raspberry-...words=raspberry+pi+zero&qid=1582900171&sr=8-6

As for the Tesla DashCam side as folk have mentioned:
- PiZero(wifi) can work great, but you need to be mindful of the configuration file you throw onto it as using the bare minimum defaults can leave you with a device that's only managing 1 to 2 mb/s when you should realistically be able to score between 20-40 mb/s.

Ultimately the PiZero is not as simple as a straight up USB approach, but it does grant you more control over how the recordings are handled. I've not spent terribly long troubleshooting the configuration, but I have noticed that the moment i step outside standard WPA-PSK and 2.4Ghz wifi to anything more 'modern' i.e. WPA-PSK2/3 and 5Ghz Wifi, the connectivity fails and back to the drawing board.

In a two day span of parking in towns/cities and well trodden areas, i've managed to get about 20-25GB of footage accrued on the drive, so based on my scenario 256GB works out well at allowing enough time to 'retain' the footage before cycling back round and overwriting the old stuff - if in under two weeks i dont already need the footage then i would be deleting it anyway.

A good way to test the whole setup would be to grab a laptop and run it in Mobile Hotspot mode - on Windows this is just a few clicks to create a hotspot (whilst remaining connected to your source wifi/network).
- Give your PiZero(wifi) the hotspot configuration (in my case, set to 2.4ghz because life hates me) and then anytime your car is within 10 meters or so you've then got "the option" at any point to have the files uploaded on your own terms vs having your Pi constantly trying to latch on to your home network.

Obviously the Pi will only remain powered whilst the car is alive (i personally dont see the point in giving the Pi the API details to the car to 'keep it alive'), so next best thing would be to grab either a usb power pack that supports passthrough charging (simple option) or source a PiJuiceZero (secondary board that sits on top of the PiZero) and plug into that a dedicated battery to keep the whole thing small/manageable.
- Got the 1200mah pack hooked up to the PiJuice on my PiZero, and comfortably getting 2-3hours (anecdotally) of life without any external power from the car (goes without saying that the car would charge the pack up whilst the tesla is turned on).

Good thing to note is that if you struggle with sourcing a PiZero with Wifi, then a Pi 4b would work exactly the same as the configuration is near interchangeable i.e. you can remove the configured TeslaUSB SD card from the PiZero (wif) and pop it into a RaspPi-4b and it will boot up, emulate the USB drives and join your wifi quite happily - only now with the added bonus that its Wifi range/bandwidth is much higher.
- Downside being it uses double-triple the juice on average.

Long post, but hope it helps.
 

My personal preference is a adaptor with a lead. They seem to be slightly larger units so would be less tightly packed plus you are not taking the weight on the USB plug/socket which seems to be a weak point. The Anker one looks ideal.

That samsung endurance unit is very expensive - my sandisk endurance was £30 for same size give or take a few p. I think 128GB is the sweet spot.
The sandisk extreme you linked is not an endurance card.
 
  • Helpful
Reactions: Joelly and Gatsojon
Sure, will send over once back at the laptop later today.

Ta, at the moment, I am struggling to find out how to encrypt the user id and password for connecting to my home computer as it shows a plain text in the configuration. The wifi password can be encrypted with this way though. Raspberry Pi is new to me, and I am quite surprised how insecure the default setting is. :eek:

# Default variables for CIFS (Windows/Mac file sharing) setup
export ARCHIVE_SYSTEM=cifs
export archiveserver=your_server_name
export sharename=your_share_name
export shareuser=share_user_name
export sharepassword=share_user_password
# export cifs_version="3.0"
 
Ta, at the moment, I am struggling to find out how to encrypt the user id and password for connecting to my home computer as it shows a plain text in the configuration. The wifi password can be encrypted with this way though. Raspberry Pi is new to me, and I am quite surprised how insecure the default setting is. :eek:

# Default variables for CIFS (Windows/Mac file sharing) setup
export ARCHIVE_SYSTEM=cifs
export archiveserver=your_server_name
export sharename=your_share_name
export shareuser=share_user_name
export sharepassword=share_user_password
# export cifs_version="3.0"

Are you creating a specific user on home PC for this remote access?
It's about balancing risk and personally I would have no problem with this as plain text.

*Little geek mode* any doubt I've always used rysnc protocol that uses preshared keys over ssh.
cwRsync - Rsync for Windows | itefix.net

Similarly if your wifi/router supports multiple SSIDs I'd create an SSID with basic security just for the Pi and then hide the SSID.

Get it working as basic as possible then start adding complexity.
 
Last edited:
Are you creating a specific user on home PC for this remote access?
It's about balancing risk and personally I would have no problem with this as plain text.

*Little geek mode* any doubt I've always used rysnc protocol that uses preshared keys over ssh.
cwRsync - Rsync for Windows | itefix.net

Similarly if your wifi/router supports multiple SSIDs I'd create an SSID with basic security just for the Pi and then hide the SSID.

Get it working as basic as possible then start adding complexity.

Agreed on the simplicity first.

Using my laptop to throw out the rasp-pi 'dirty' hotspot means the risk is heavily mitigated - if anyone nabbed the pi all they get are worthless credentials
 
Are you creating a specific user on home PC for this remote access?
It's about balancing risk and personally I would have no problem with this as plain text.

*Little geek mode* any doubt I've always used rysnc protocol that uses preshared keys over ssh.
cwRsync - Rsync for Windows | itefix.net

Similarly if your wifi/router supports multiple SSIDs I'd create an SSID with basic security just for the Pi and then hide the SSID.

Get it working as basic as possible then start adding complexity.

I am using a company managed Mac at home, and it seems I cannot connect to the Mac with other user accounts. That's why I am trying to encrypt the password. Also, it seems I need to buy a separate router to have multiple SSIDs.

Yes, I am trying to make it as simple as possible, but the security concern is high...
 
I am using a company managed Mac at home, and it seems I cannot connect to the Mac with other user accounts. That's why I am trying to encrypt the password. Also, it seems I need to buy a separate router to have multiple SSIDs.

Yes, I am trying to make it as simple as possible, but the security concern is high...

I'm not particularly familiar with the underlinings if Mac user security and policy lockdowns, but potential it's purposefully locked by design (if company Mac) so you can't add accounts.

My scenario was to avoid having the Pi know my home networks, so utilised the Windows 10 simple 'mobile hotspot' mode to throw out the WiFi for the car.

My assumption (not tried) is that you could equally have your phone act as a traditional mobile hotspot - 'laptop/desktop' <connect-to-hotspot> 'your rasp-pi in car'
- so long as there is network line of sight to whichever share you configured then you're golden.

In lazy/easy terms:
1. Build the Pi and confirm it attaches to your network (confirming your 'share' system can attach and see the same network)
2. Set the pi config with the target share details and rerun the config build (can just reflash and build from scratch as only takes a few minutes if you're not comfy rerunning it when built)
3. Test by plugging in the pi and turning on sentry mode / causing an event to be written, see if content is visible by plugging in the pi to your system of choice to access it's usb shares
4. Turn on your designated hotspot and see if share gets written to.

Will be at the laptop within the hour so will send over the teslausb and WiFi config files that you can pop in the initial 'boot' folder
 
Ta, at the moment, I am struggling to find out how to encrypt the user id and password for connecting to my home computer as it shows a plain text in the configuration. The wifi password can be encrypted with this way though. Raspberry Pi is new to me, and I am quite surprised how insecure the default setting is. :eek:

# Default variables for CIFS (Windows/Mac file sharing) setup
export ARCHIVE_SYSTEM=cifs
export archiveserver=your_server_name
export sharename=your_share_name
export shareuser=share_user_name
export sharepassword=share_user_password
# export cifs_version="3.0"


Uploaded a 'clean' copy of the config i'm currently running.

No doubt whatsoever there will be a better and more efficient config out there, but at least for myself these are working fine. Good to note that the wpa_supplicant 'shouldn't' normally be needed, but for whatever reason having the SSID details in the main setup_variables failed miserably for me - however popping them in the supplicant seemed to work! Shouldn't be that way, but i've not spent much time digging in to troubleshoot.

All the smarter individuals/those that have spent longer looking into it - advice always welcome :)

1. Have added some brief comments around the specific changes I made
2. rename the files to .conf (.txt currently to allow their upload)
3. Edit with your details as required - note i'm using the normal "DashCam" as my destination - this translates to an existing C:\DashCam on my laptop when the files are uploaded. I give the "bob" user privileges to write to here and alls good.
4. Pop the files into the boot folder of your flashed raspi sd card ready for first boot.

A good thing to stress is that should you ever get the chance, to change the default root password on the Pi when all is running as you need it to be - from Marcones teslausb git page "marcone/teslausb", instruction to do this from any machine supporting ssh access (nix/osx/windows with putty etc)

ssh [email protected]
sudo -i
cd bin
./remountfs_rw
passwd pi
reboot

As is quite rightly pointed out:
"Remember that the root user has a copy of your configuration file. Try the best you can to protect it. If your Pi is taken or car is stolen and you enabled the optional "use Tesla API to keep your car awake" feature, change your Tesla account password QUICKLY! Remember that if they don't have a "key" or your Tesla Account and Password, the car will not drive for them. Also consider activating a Drive Password on your Tesla. Its only 4 digits, but that's a lot of combinations to guess."

It's for this specific point I'm using the hotspot method:
- Full control over the wifi the Pi utilises
- Mitigated risk should the Pi be compromised and someone gets access to the sd card
- Not utilising the Tesla API to keep the car alive for the same reason (can just use passthrough charging on a powerbank)

Hope this helps.
 

Attachments

  • teslausb_setup_variables.txt
    2.7 KB · Views: 36
  • wpa_supplicant.txt
    173 bytes · Views: 38
I am using a company managed Mac at home, and it seems I cannot connect to the Mac with other user accounts. That's why I am trying to encrypt the password. Also, it seems I need to buy a separate router to have multiple SSIDs.

Yes, I am trying to make it as simple as possible, but the security concern is high...
Could you push to another Pi to act as the storage server? If you have the dosh a NAS box is a good investment.
 
Small and neat is not necessarily good. The card will get very warm and may lead to problems. Same card as us. A further reduction of £5 since I purchased.
Im a sucker for simle design
IMG_3878.jpg
 
As for the Tesla DashCam side as folk have mentioned:
- PiZero(wifi) can work great, but you need to be mindful of the configuration file you throw onto it as using the bare minimum defaults can leave you with a device that's only managing 1 to 2 mb/s when you should realistically be able to score between 20-40 mb/s.


Actually, I was hoping to see the configuration including the speed boot you mentioned above, but thanks anyway.