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.
Anyone having an issue where USB stops working altogether with a Raspberry pi plugged in? Got my pi working nicely, but every so often, power is cut to the USB ports, and the only way to get power back to USB (even after unplugging the pi) is to reboot the car. I'm wondering if the pi is drawing too much power. (Raspberry Pi Zero W)
 
Interesting, I'll give that a try. I was thinking about something along similar lines, which was to do the same thing to the USB cable, and then pulling power from a portable USB charger that charges inline. (i.e. it can supply power even when the car is on and charging it). That way the pi is always on without having to keep Sentry Mode on, and also provides some isolation from directly powering from the car.

Is the 12V plug always on? That would accomplish the same goal.
 
The pi behavior appears to vary depending on firmware versions. I'm currently losing connection, hoping a new version will fix this for me.

The 12v is not always on, it will power off when the car goes to sleep. I've set up a schedule routine using tasker and tesla plugin to turn on sentry mode for 30 minutes at 3am every night to allow the pi to be turned on and sync up before turning back off.
 
Thanks for the info on the 12v charger.

I'm currently powering my pi with this:
https://smile.amazon.com/gp/product/B01ASWX5PG/ref=oh_aui_search_asin_title?ie=UTF8&psc=1

Nice thing about this battery is that it fits comfortably in the console, and it allows pass-through charging. So when the car is sleeping, the pi runs off battery power. When the car isn't sleeping, it charges the battery while the pi continues to draw power from the battery. (for anyone wanting to do this, not all portable chargers allow pass-through charging, so if buying for this purpose, make sure the description says it allows pass-through)

Checked it this morning, and with the car sleeping most of the night, the pi used 12% battery. Which would give me a solid week of power if for some reason the car was asleep that long.
 
  • Informative
Reactions: akidesir
Thanks for the info on the 12v charger.

I'm currently powering my pi with this:
https://smile.amazon.com/gp/product/B01ASWX5PG/ref=oh_aui_search_asin_title?ie=UTF8&psc=1

Nice thing about this battery is that it fits comfortably in the console, and it allows pass-through charging. So when the car is sleeping, the pi runs off battery power. When the car isn't sleeping, it charges the battery while the pi continues to draw power from the battery. (for anyone wanting to do this, not all portable chargers allow pass-through charging, so if buying for this purpose, make sure the description says it allows pass-through)

Checked it this morning, and with the car sleeping most of the night, the pi used 12% battery. Which would give me a solid week of power if for some reason the car was asleep that long.

The Pi needs to be hooked up to the Tesla's USB via its OTG port. Based on the previous comments, do you have that connection (with the 5V wire cut) and then also the USB power connection from the battery?
 
The Pi needs to be hooked up to the Tesla's USB via its OTG port. Based on the previous comments, do you have that connection (with the 5V wire cut) and then also the USB power connection from the battery?

Yep. There's two USB ports on the Pi Zero. One for power, one for data. (Data port can also be used for power+data) I've got the Pi's data USB connected to Tesla data port, and the Pi's power USB plugged into the battery pack. When I'm parked at home and the car is sleeping, the Pi will stay on using the battery pack, which is nice because usually the car sleeps before the Pi can send all the video to Google Cloud. Keeping it powered means I can keep transferring data until its done.

I haven't cut the 5V wire on the data USB yet. Just haven't found time to do it yet.
 
I have a small powered USB hub on the Tesla data port, but powered by the 12v port. This setup appears to be reliable on current (2019.8.5) firmware. While some battery banks will do pass-through charging, almost all have shutdown circuitry when power draw is too low. I'm copying to a local source, so it finishes easily before the car goes to sleep, but if it were battery powered instead, you could shut down the Pi at the end of the archiving script and allow it to be cleanly booted when the car wakes. It should also be possible to detect the status of the Tesla data USB and shutdown when it goes away for sleep mode.
 
After many hours of work I got a version quasi working with a web interface. However, even though the files are on the pi I get the following error when trying to operate from the web interface: forbidden. See the screen shots below. Anyone have any idea what causes this? I have looked at file permissions and numerous things but cannot find the cause. When plugged into my iMac, I can open the files just fine. As you can see the web pages appear to work. It is only when I try to upload to google drive or preview that it won't work.
 

Attachments

  • Screen Shot 2019-04-08 at 9.06.07 AM.png
    Screen Shot 2019-04-08 at 9.06.07 AM.png
    133.5 KB · Views: 181
  • Screen Shot 2019-04-08 at 9.05.46 AM.png
    Screen Shot 2019-04-08 at 9.05.46 AM.png
    265.3 KB · Views: 131
  • Screen Shot 2019-04-08 at 9.05.24 AM.png
    Screen Shot 2019-04-08 at 9.05.24 AM.png
    272.5 KB · Views: 128
  • Screen Shot 2019-04-08 at 9.05.00 AM.png
    Screen Shot 2019-04-08 at 9.05.00 AM.png
    154.7 KB · Views: 125
  • Screen Shot 2019-04-08 at 9.04.26 AM.png
    Screen Shot 2019-04-08 at 9.04.26 AM.png
    137.3 KB · Views: 125
it's not a rumor, it's a fact. i can 100% confirm that on 5.15 12v is always on, even if sentry mode is turned off. the only question i have is whether or not it will turn itself off if you don't have anything drawing power from it - but if you leave something plugged in and turned on, it absolutely will not time itself out.

whether or not this applies to the USB as well is an open question, but i would imagine it does...

Hmm. This is not my experience. I have cheap dashcam that I use and prior to 2019.8.5, it worked great. The car would power on the 12V aux plug when it woke up and power it down when it was locked and went back to sleep. This meant the dashcam only recorded when the I was driving.

After the 2019.8.5 update, the 12V is enegerized for some random time after it locks, sometimes minutes, sometimes hours. Yesterday, the car woke up at 1:30am and went back to sleep at 3:30am causing my camera to record the interior of my garage for 2 hours and overwriting all the previous days footage.

Does anyone know if this behavior can be controlled? I want to go back to having the the 12V off when the car is asleep.
 
After many hours of work I got a version quasi working with a web interface. However, even though the files are on the pi I get the following error when trying to operate from the web interface: forbidden. See the screen shots below. Anyone have any idea what causes this? I have looked at file permissions and numerous things but cannot find the cause. When plugged into my iMac, I can open the files just fine. As you can see the web pages appear to work. It is only when I try to upload to google drive or preview that it won't work.

Check webserver log files?
 
Hmm. This is not my experience. I have cheap dashcam that I use and prior to 2019.8.5, it worked great. The car would power on the 12V aux plug when it woke up and power it down when it was locked and went back to sleep. This meant the dashcam only recorded when the I was driving.

After the 2019.8.5 update, the 12V is enegerized for some random time after it locks, sometimes minutes, sometimes hours. Yesterday, the car woke up at 1:30am and went back to sleep at 3:30am causing my camera to record the interior of my garage for 2 hours and overwriting all the previous days footage.

Does anyone know if this behavior can be controlled? I want to go back to having the the 12V off when the car is asleep.

yeah, the behavior i've seen has changed several times since this post. it's incredibly frustrating...sometimes it stays on forever, sometimes it doesn't.
 
Is there a way to use this setup with a usb ssd drive instead of a microsd card? The biggest hurdle I see is the single USB port on the pi...but I also see hubs are available. I'm trying to envision using an ssd drive for music and teslacam, but have the pi auto-copy dashcam footage off, and allow wireless access to the music folder for updating/adding while the car is in my garage. Possible?

Thanks.
 
Is there a way to use this setup with a usb ssd drive instead of a microsd card? The biggest hurdle I see is the single USB port on the pi...but I also see hubs are available. I'm trying to envision using an ssd drive for music and teslacam, but have the pi auto-copy dashcam footage off, and allow wireless access to the music folder for updating/adding while the car is in my garage. Possible?

Thanks.
Good question, but don’t think that it would be possible. If you have the Pi and a ssd drive both connected to a hub I don’t think the Pi would be able to access the ssd drive and vice versa.
 
Is there a way to use this setup with a usb ssd drive instead of a microsd card? The biggest hurdle I see is the single USB port on the pi...but I also see hubs are available. I'm trying to envision using an ssd drive for music and teslacam, but have the pi auto-copy dashcam footage off, and allow wireless access to the music folder for updating/adding while the car is in my garage. Possible?

What’s your objective? Total storage space over 256Gb? Something else?
 
What’s your objective? Total storage space over 256Gb? Something else?

Mostly as a way to avoid the constant writes to a microsd card which seems to cause problems after a shorter period of time than it would on an SSD. Even the endurance models don't seem rated for such abuse... But, yeah, I also happen to have 480gb SSDs lying around after upgrading them...
 
Mostly as a way to avoid the constant writes to a microsd card which seems to cause problems after a shorter period of time than it would on an SSD. Even the endurance models don't seem rated for such abuse... But, yeah, I also happen to have 480gb SSDs lying around after upgrading them...

Hmm -- rock and a hard place, for simple answers, I think.

Pi 3 builds do support booting from USB rather than flash, or you could still boot from flash but use the USB attached storage as the volatile storage. (Which would, for sure, simplify some of the unexpected power-down issues.)

However, the Zero/Zero W are the only ones with simple and native OTG support, but they only have the one real USB port. Ways forward toward your goal: assemble OTG support on a different Pi model that supports more USBs; find a way to attach USB/SATA drives through the flash port (heh); find a way to attach more USBs to the Zero W.

None of those sound fun to me.
 
Hmm -- rock and a hard place, for simple answers, I think.

Pi 3 builds do support booting from USB rather than flash, or you could still boot from flash but use the USB attached storage as the volatile storage. (Which would, for sure, simplify some of the unexpected power-down issues.)

However, the Zero/Zero W are the only ones with simple and native OTG support, but they only have the one real USB port. Ways forward toward your goal: assemble OTG support on a different Pi model that supports more USBs; find a way to attach USB/SATA drives through the flash port (heh); find a way to attach more USBs to the Zero W.

None of those sound fun to me.

Yeah, booting off microsd is fine, and was part of the plan. No need to bypass that tried and true method.

There seem to be plenty of ways to add USB to the pi zero. For example:

https://www.amazon.com/MakerSpot-4-Port-Stackable-Raspberry-Supply/dp/B01K9IVUYM

The question is how does this interact with the pi when it is in OTG mode...I'm hoping that OTG just works, and we could just mount the SSD that is connected to one of those USB ports...But it seems like no one is doing this. That makes me think it just can't work?


EDIT: It appears that these disable the usb ports on the pi itself...so that's how it "interacts". Oh well.
 
Last edited:
Honestly... at this point I just want a reliable smart device without CIFS or any of that... just storing the files for now... then I can augment it later as I develop a UI module that can be installed later.

We need a base repo with predictable storage of the camera files only... no music or anything... we can get music from Bluetooth on our phones...

If we get a base repo that is reliable and works with latest releases of Tesla software we are open to innovate / add other submodules as we go.