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.
Has anyone tested whether the ports are shut off entirely or just the +5V supply to the ports is? I wonder if you battery backed or separately powered the Pi, if it would continue to work.

One possible solution might be to connect a hub to the USB port, and to the hub connect both a regular thumbdrive (not used for anything in particular), plus the Pi device, that might cause it to always see a storage device. Though if it powers off the port if no devices are detected as being in use by sentry, that doesn't solve anything versus why it wasn't detecting the Pi in the first place.


I tried this approach using this: https://www.amazon.com/dp/B075Q5VLGK

Part of the problems I ran into were the battery pack, but I think the primary issue is the way the Tesla handles power & data swaps (i.e., not gracefully). Bottom line, I couldn't get it to work.

  • The "hub" feature of the X6 works as advertised when plugged into my PC, but I can't get it to work at all in the car. I have a simple (unpowered) 4-way USB hub I'm using in the car that works flawlessly, so it's apparently got something to do with the powered aspect of the X6. I cannot get anything plugged in to the X6 "hub" to be recognized by the car.
  • The powerbank feature of the X6 works as you'd expect, and the pass-through charging works fine as well. HOWEVER, it's not apparently up to UPS standards as far as the RPi is concerned: there's enough of a power fluctuation when the car turns off power to the USB port that the RPi reboots (just like you'd expect with a momentary power interruption).
  • I doctored up a USB cable to be "data only," and tried plugging the RPi in to both power & data: I used the "data only" cable to the normal USB port & the RPi data port; and another cable to the X6 & the RPi power port. This worked exactly how I hoped: the RPi stays powered up, regardless of the car and/or USB ports' status; and it's presenting two USB "flash drives" to the car at all times. The reason I want this is two-fold: one, no worries about the issue of keeping the car awake (don't care); and two, no delays on the "flash drives" being "plugged in" when starting to drive.
  • The problem with that last item is, it's unsustainable: without plugging the X6 in, the RPi will run it dry; and, plugging it in results in the problem in the second bullet, i.e., a power fluctuation that shuts down the RPi every time the car is shut down.

What I'd *really* like to do, if anyone has an elegant solution, is to get a constant (unswitched) +12V supply to a USB port (so, I guess, +5V is what I really want, or a means of converting). If anyone has figured out a way to leave the USBs on all the time, I'd love to know it. If not, I'm not opposed to installing something. Seems like the OBD-II port is the best answer for that, though I don't want wires hanging down....
 
My solution for now, until someone else comes up with a better one, is connecting the PI’s data USB port to one of the two Tesla’s USB ports but adjusted in such a way that it does not uses the power from this port (small strips of ducktape on both outer pins). The ‘power’ USB port of the PI is connected (via a power bank) to the cigarette port using a USB converter plug. Using the second USB port for power didn’t make the power bank switch from receiving power to giving power?!
All works fine with the only downside that the PI is rebooted whenever I leave the car and the power is cut from the cigarette port. The power bank takes over and the PI reboots. When I then enter the car, or not enter the car but activate Sentry Mode remotely, there is a power switch again (don’t ask me why this is on the cigarette port, but it is) and the PI reboots again. Either way the PI is up and running after +/- 60 seconds. It’s not ideal, but it works for now. The power bank I’m using is a 10.000mA, so I hope it will last through the nights. As soon as I start driving it’s charged again.

I wish it was early 2019 with software version 2019.x.x when the cigarette port was constantly powered and the PI draw it’s power from that port. Made our lives much easier....
 
I tried this approach using this: https://www.amazon.com/dp/B075Q5VLGK

Part of the problems I ran into were the battery pack, but I think the primary issue is the way the Tesla handles power & data swaps (i.e., not gracefully). Bottom line, I couldn't get it to work.

  • The "hub" feature of the X6 works as advertised when plugged into my PC, but I can't get it to work at all in the car. I have a simple (unpowered) 4-way USB hub I'm using in the car that works flawlessly, so it's apparently got something to do with the powered aspect of the X6. I cannot get anything plugged in to the X6 "hub" to be recognized by the car.
  • The powerbank feature of the X6 works as you'd expect, and the pass-through charging works fine as well. HOWEVER, it's not apparently up to UPS standards as far as the RPi is concerned: there's enough of a power fluctuation when the car turns off power to the USB port that the RPi reboots (just like you'd expect with a momentary power interruption).
  • I doctored up a USB cable to be "data only," and tried plugging the RPi in to both power & data: I used the "data only" cable to the normal USB port & the RPi data port; and another cable to the X6 & the RPi power port. This worked exactly how I hoped: the RPi stays powered up, regardless of the car and/or USB ports' status; and it's presenting two USB "flash drives" to the car at all times. The reason I want this is two-fold: one, no worries about the issue of keeping the car awake (don't care); and two, no delays on the "flash drives" being "plugged in" when starting to drive.
  • The problem with that last item is, it's unsustainable: without plugging the X6 in, the RPi will run it dry; and, plugging it in results in the problem in the second bullet, i.e., a power fluctuation that shuts down the RPi every time the car is shut down.

What I'd *really* like to do, if anyone has an elegant solution, is to get a constant (unswitched) +12V supply to a USB port (so, I guess, +5V is what I really want, or a means of converting). If anyone has figured out a way to leave the USBs on all the time, I'd love to know it. If not, I'm not opposed to installing something. Seems like the OBD-II port is the best answer for that, though I don't want wires hanging down....

Good to know that as long as it has power from elsewhere, it keeps working.

My plan for when I eventually got around to setting one up was to install mine behind the center console, and in-between the 2-port USB hub which is what you normally plug into and the car harness it's connected to, stuff another hub there that the Pi is plugged into. Then I could either source power by making a Y-cable that taps into the hub's power connection (separate from the data connection) or by tapping into the 12V outlet and running 12V up to there. Then just add whatever 12V to Pi power solution (I got one that has as 12V input and a fan on it, though the fan is pretty terrible, so I was planning on replacing it with a Noctua fan of the same size).

This would then both solve the power problem without having to make any holes anywhere, and also hides the device so that even if someone breaking into the car is clever enough to look for a plugged in thumb drive, they won't find one, and thus the footage would still be available...
 
Hi All,

I noticed a change in the way Tesla powers the USB ports in the Model S. As of 2020.20.12 (received this update last Saterday) my USB ports (on which I've connected my PI) are no longer powered when Sentry is enabled. The power is cut after +/- 90 seconds. As a result my PI is no longer recording when Sentry is enabled.

Do others experience the same? I've already done a reboot and power off. No luck with that. I'm now using a Power Bank, but I don't like having such device in the car, especially when looking at how hot the car gets in the summer. I don't want the Power Bank to ignite ;)

Is this issue specific to the S or all Tesla cars? Thanks
 
The problem with that solution is that the power to the 12V outlet is also switched. I would really like to find a way to change that....
Well, my preferred connection would be to the power for the USB hub, but if that is also turned off now ... then I guess the next best thing is running to the unused (presumably - since I have no hitch) 12V "hitch" connection, assuming that hasn't also been disabled at some point (lots of people use this for running radar detectors, or 12V power for any number of other things)...

Failing that, some kind of battery bank running off any of the above 12V supplies, to provide power when the car turns off the power ...
 
Failing that, some kind of battery bank running off any of the above 12V supplies, to provide power when the car turns off the power

‘I’m currently using such a power bank. The downside on the one I’m using, and I expect all of them to work like that, is that it briefly switches off the power to the PI (the output power) as soon as it detects an input power or when it loses input power. As a result the PI reboots of course. Not a big deal, but I would like the PI to stay powered on 100% of the time. The power bank is a 10.000mA and sufficient to provide power to the PI for a number of days. As soon as I start driving it’s charged again and pretty quickly.

I’ve been experimenting with using the Tesla USB hub (2 ports) as the input power and the cigarette lighter plug. Both are switched off after x number of seconds and (obviously) both cause the power bank to briefly switch off the output power.
 
I suspect that the software will need to be enhanced so that it can be set to use the API calls to keep the ports powered. Similar to the optional setting for video archiving where the Pi uses Tesla API calls to keep the car awake.
 
‘I’m currently using such a power bank. The downside on the one I’m using, and I expect all of them to work like that, is that it briefly switches off the power to the PI (the output power) as soon as it detects an input power or when it loses input power. As a result the PI reboots of course. Not a big deal, but I would like the PI to stay powered on 100% of the time. The power bank is a 10.000mA and sufficient to provide power to the PI for a number of days. As soon as I start driving it’s charged again and pretty quickly.

I’ve been experimenting with using the Tesla USB hub (2 ports) as the input power and the cigarette lighter plug. Both are switched off after x number of seconds and (obviously) both cause the power bank to briefly switch off the output power.
If you're not concerned about random lithium pack in your car, there's solutions to the power interruption such as

Raspberry Pi UPS HAT
 
Have you guys tried something like this: Controlled shutdown on power loss - Raspberry Pi Forums (capacitors to bridge that short transition period), or Bolt Portable Charger ? I set up a relay-type in my car (to power a dashcam; charges battery and runs dashcam off car power while driving, but after car sleeps it should have switched over to battery), but the power bank I have wouldn't switch on its own, and I haven't messed around with it since. It needed a power bank that was always on to detect a new load (which V75 USB Battery Pack claims to do).
 
I'm not having much luck with the setup of the Pi.

The installation stalls - here's the log file.


at 15 Jun 22:27:31 BST 2019 : Detecting whether to update wpa_supplicant.conf
Sat 15 Jun 22:27:31 BST 2019 : Wifi variables specified, and no /boot/WIFI_ENABLED. Building wpa_supplicant.conf.
Sat 15 Jun 22:27:31 BST 2019 : Rebooting...
Sat 15 Jun 22:28:17 BST 2019 : Detecting whether to update wpa_supplicant.conf
Sat 15 Jun 22:28:17 BST 2019 : Grabbing main setup file.
Sat 15 Jun 22:28:18 BST 2019 : get_script failed, retrying
Sat 15 Jun 22:28:21 BST 2019 : get_script failed, retrying
Sat 15 Jun 22:28:24 BST 2019 : get_script failed, retrying


Any help appreciated

i'm stuck at this exact spot. i can't get past here...it just keeps repeating the same get_script line over and over in the log file. how do i get past this?
 
Hey guys, I'm interested in getting teslausb set up for my 2020 model 3. I can see loads of forks on GitHub for it, not sure which ones the most up to date/ updated frequently?

Mainly interested in using the cameras to record the 1 hr long clips like a traditional dashcam and it auto-saving to my server when home.
 
Hey all - I'm 99% through Dave's great tutorial here and am literally stuck on the last command regarding the mutable link.

When I try to check if the link exists I get this:

total 4
drwxr-xr-x 2 root root 4096 Nov 25 03:29 rclone


Then when running

ln -s /mutable/configs/rclone /root/.config/rclone

I get

ln: failed to create symbolic link '/root/.config/rclone/rclone': File exists

Any idea what the deal is?

Thanks
 
Hey all - I'm 99% through Dave's great tutorial here and am literally stuck on the last command regarding the mutable link.

When I try to check if the link exists I get this:

total 4
drwxr-xr-x 2 root root 4096 Nov 25 03:29 rclone


Then when running

ln -s /mutable/configs/rclone /root/.config/rclone

I get

ln: failed to create symbolic link '/root/.config/rclone/rclone': File exists

Any idea what the deal is?

Thanks

Well, you appear to have a directory at /root/.config/rclone, rather than a symbolic link. And probably when you tried to then create a symlink at /root/.config/rclone, since there's a directory there, ln helpfully assumed you meant /root/.config/rclone/rclone, and apparently that exists too. Alternatively, 'rclone config' created the 'rclone' file in the 'rclone' directory, but either way, something is there now.

If you 'ln -s /root/.config/rclone/' and see 'lrwx ... rclone -> ...' as you expected to find at /root/.config/, then that's likely what happened, especially if there's anything else listed. It might also be that the rclone config file is 'rclone', in which case maybe you see something like '-rw-... rclone' instead.

If there's files in /root/.config/rclone/, and nothing yet in /mutable/configs/rclone/ (check with 'ls -l /mutable/configs/rclone/'), then I'd copy the files, remove the dir, and try to create the symlink again. Something like 'mv /root/.config/rclone/* /mutable/configs/rclone/', then 'rm -r /root/.config/rclone/', then do the symlink command again.
 
What I'd *really* like to do, if anyone has an elegant solution, is to get a constant (unswitched) +12V supply to a USB port (so, I guess, +5V is what I really want, or a means of converting). If anyone has figured out a way to leave the USBs on all the time, I'd love to know it. If not, I'm not opposed to installing something. Seems like the OBD-II port is the best answer for that, though I don't want wires hanging down....


I've finally found a solution I'm happy with: https://www.amazon.com/gp/product/B01H38IIY6/

A plug-in for the OBD-II outlet (power only) to a micro-USB connector, with enough cord to wind through into the center console. $10 bucks. There's a slightly more expensive model with a switch on it--I didn't want that one, assuming the switch would be a likely target for my feet to kick off inadvertently, and that the red switch would be very visible. I haven't tested either of those assumptions, since I only ordered the one--and, if I ever need to "turn it off," I'll simply unplug it. The cord exits the head of the plug at a 90° angle just about exactly where the plastic foot shield on the under-dash is, with enough wiggle room that it could run outside or inside the shield.

Of course, I wanted it inside & hidden. I had to remove a single screw (Torx head) at the rear/left of the shield in order to get the plug in the socket and maneuver my hands to run the wire inside (or you can plug it in directly without removing the screw, if you're happy with the wire exposed). From there, it was simple to route it behind the shield, over to the corner above the accelerator pedal & into the center console. I could've used an extra wrist & eyeballs on my fingertips :) for this next part: the hardest part of the whole job was getting it through the holes inside at the front of the center console so it would be inside the storage compartment without interfering with the sliding cover. I used a couple of zip-ties inside the compartment to make sure it stays put (and doesn't get caught up in the mechanism of the sliding door), and reinstalling the single Torx screw was as simple as taking it out had been.

Voila, I now have constant +5V power in my center console, without drilling or cutting. I may yet go that route--or, more likely, hire a professional car audio guy--an install actual USB power outlets... but, for now, I'm in business. The top 1/2" or so of the plug (upside down to fit in the socket) sticks out below the shield--but, it's basically invisible, since it's the same black color as the shield itself. Even if you were to go looking for it, all you'd see is a small "bump" in the shield where there used to be a hole. The entire wire is hidden, unless I go digging for the Pi in the center console.

The power plug is directly in the Pi's power-only USB; and I did the electrical-tape trick to make a data-only cable to plug the Pi's data port into the car. It's been up & running for two weeks now. During that time, I've done multiple local drives, a ~1,500-ish mile road trip, multiple super charging & level 1 / 2 charging, an OTA software update, a few touchscreen resets, used the in-car viewer, archived some "Saved" & "Sentry" files, sideloaded music & listened to same, etc.--in short, everything I could think of to use the Pi's features as well as anything I thought might interrupt power. Bottom line, the Pi ran fine, the TeslaUSB project ran fine, and the power never wavered. As far as I can tell in two weeks' observation, the 12V battery getting disconnected (or dying) is apparently the only way this power source would fail.

Code:
root@MimiPi:~# uptime
 13:18:36 up 14 days, 19:34,  1 user,  load average: 1.20, 1.36, 0.74

I've still got some small potatoes to deal with insofar as final placement of the wires, the Pi itself, etc. inside the center console. But, big picture: success! :D