Coder Social home page Coder Social logo

Comments (16)

marcone avatar marcone commented on July 17, 2024

It looks like when the Pi booted it started archiving files that it didn't archive previously. Since your network connection is quite slow (each 1-minute recording takes over 2 minutes to archive, per previous entries in the log), this took a while.
By clicking that button in the web interface you forced the drive to be connected to the car, but did so while still mounted on the Pi. This is generally a bad idea, because two computers (the Pi and the car) will be accessing the drive at the same time.
I'd recommend looking into getting a stronger wifi signal where you park your car (i.e. a wifi repeater or a dedicated AP), and configuring TeslaUSB to keep the car awake during archiving so that it completes archiving when you get home.
Also, you don't have to wait for the drive to show, you can just drive away and when the Pi loses its wifi connection it will stop archiving and connect the drive to the car.

from teslausb.

marcone avatar marcone commented on July 17, 2024

I'll keep this open because I've been meaning to change the startup sequence so it connects the drive right away. That would fix the problem you're seeing (though you'd still have problems archiving due to your slow connection).

from teslausb.

cmgraz avatar cmgraz commented on July 17, 2024

Good catch. I'm going to take a look at this in a little bit to make sure that if there's nothing archiving that it detects the Pi without issues.

from teslausb.

cmgraz avatar cmgraz commented on July 17, 2024

Just to make sure I'm understanding, you're saying that when the car wakes you'd have the Pi mount to the Tesla right away rather than mount to the network share?

And you were correct, when I got in the car before, when there was nothing to archive it automatically connected.

from teslausb.

cmgraz avatar cmgraz commented on July 17, 2024

I'm attaching another diagnostics file here. Sunday morning when I entered the car a little after 10, I experienced the same behavior where the Pi would not connect to the Tesla. Understanding now why, I did as advised and simply drove off which would have disconnected from the Wifi and then ultimately should have attached the pi to the Tesla without manual intervention.

But after driving and arriving at destination an few minutes later, it had still not connected. Even after a unplug, plug back in it didn't seem to connect. I went for my run and abotu an hour later came back and now it was able to see the device.

Anything noteworthy in the diagnostics to explain why it didn't seem to auto-connect after losing signal from wifi?

diagnostics.txt

from teslausb.

marcone avatar marcone commented on July 17, 2024

from teslausb.

cmgraz avatar cmgraz commented on July 17, 2024

On Sunday morning at 10:02 the Pi started up, saw there was nothing to archive and then proceeded with the normal start up sequence. This was apparently interrupted, because at 10:06 the Pi started up again. This, too, was apparently interrupted, because at 10:07 the Pi started up yet again.

I would assume there's no way to know what could have potentially interrupted the startup?

from teslausb.

marcone avatar marcone commented on July 17, 2024

Assuming the cable is good, the only reason for a restart would be a power interruption, e.g. the car goes to sleep and powers off the USB ports. It seems odd that it would do this twice within a minute of each other though.

From the logs it looks like you didn't configure TeslaUSB to use the Tesla API to keep the car awake during archiving, so that's something you might want to do.

from teslausb.

mSarheed avatar mSarheed commented on July 17, 2024

I have the exact same issue. On a M3 2019. USB not recognized. When I go to the webui and connect then it works fine.

from teslausb.

cmgraz avatar cmgraz commented on July 17, 2024

I have the exact same issue. On a M3 2019. USB not recognized. When I go to the webui and connect then it works fine.

Have you looked to see if the issue is because it's currently transferring files to your share?

Also, what happens when you drive away? Does it connect at some point?

from teslausb.

mSarheed avatar mSarheed commented on July 17, 2024

I have the exact same issue. On a M3 2019. USB not recognized. When I go to the webui and connect then it works fine.

Have you looked to see if the issue is because it's currently transferring files to your share?

Also, what happens when you drive away? Does it connect at some point?

I haven't looked at the log, so not sure if it's because it's transferring files.

So sometimes the red x on the camera icon disappears within a minute of entering the car/driving. I believe it's the pi powering up.. other times the red x won't disappear even though I've been driving for 10 minutes..

I will look at the log when it happens again.

from teslausb.

cmgraz avatar cmgraz commented on July 17, 2024

I'm still experiencing issues with USB connecting to host after departing from wifi.

This was my most recent experience from departure to arrival home and steps taken:

On Mon 21 Aug are 16:20 I got in my car to depart. The USB was not connected to the host, presumably doing some sort of archiving.

By 16:22 I had departed and was outside of my wifi range. The Pi still did not connect to host.

By 16:33 I had arrived at my destination, still not connected to host. At this point I unplugged and then plugged the pi back in. I waited a couple of minutes, but it still did not connect.

I left for a run and returned to the vehicle around 17:35-17:40 time frame. At this point the USB was visible.

I began driving at 17:45 and returned home at 17:52.

teslaDiagnostics-2023-08-22.txt

from teslausb.

marcone avatar marcone commented on July 17, 2024

Looks like TeslaUSB was already running when you left around 16:20 (and had been for a while). The drive should already have been connected to the car because TeslaUSB connected it at 14:59:

Mon 21 Aug 14:59:54 EDT 2023: Connected usb to host.

Shortly after you left though, TeslaUSB restarted:

Mon 21 Aug 16:23:06 EDT 2023: Archive is unreachable.
Mon 21 Aug 16:23:06 EDT 2023: Waiting for archive to be reachable...
==============================================
Mon 21 Aug 16:18:06 EDT 2023: Starting archiveloop at 33.61 seconds uptime...

(the time jump is because Raspberry Pi doesn't have a battery backed clock, so on startup it initializes the current time from a previously saved timestamp. The real time of the restart is probably around 16:34, based on the 16-minute clock adjustment it ends up doing when you arrive back home at 17:52)

TeslaUSB connected the drive to the car at the 16:19 timestamp (which would have been about 16:35 actual time)

Mon 21 Aug 16:19:05 EDT 2023: Connected usb to host.

at the 17:16 timestamp (or about 17:32 real time), TeslaUSB took a snapshot. The car was writing to the drive, so at least that time, the car definitely saw the drive:

Mon 21 Aug 17:16:13 EDT 2023: write in progress

You can get a better idea of when the car actually saw the drive by looking at the RecentClips in the Recordings tab
of the TeslaUSB web interface and checking which recordings exist between 16:20 and 17:45.

Given the random restart while driving, it definitely seems like there's a problem with the USB port, the cable, or the Pi itself.

from teslausb.

cmgraz avatar cmgraz commented on July 17, 2024

The drive should already have been connected to the car because TeslaUSB connected it at 14:59:

This is hard to reconcile because when I got in the car at 16:20 the USB was not accessible for music and the dashcam had the x on it.

Shortly after you left though, TeslaUSB restarted:

Very interesting. By 16:23 I was definitely in transit so I wonder if some movement in the car had it disconnect due to a bad cable or something. I'll have to try another one.

TeslaUSB connected the drive to the car at the 16:19 timestamp (which would have been about 16:35 actual time)

This makes sense because at 16:33 I had unplugged and plugged it back in after arriving at my destination.

I'll begin to tinker with some of the variables like the cable & port and see if I get more consistent bootups/connections.

from teslausb.

marcone avatar marcone commented on July 17, 2024

The drive should already have been connected to the car because TeslaUSB connected it at 14:59:

This is hard to reconcile because when I got in the car at 16:20 the USB was not accessible for music and the dashcam had the x on it.

TeslaUSB connected the drive to the car at 14:59, and when it took snapshots of the drive at 15:11 and 16:10 it found new files, so the car was definitely recording to it.
This is why I suggested looking at the Recordings tab in the TeslaUSB web interface, because it will show you exactly when the car was recording.

from teslausb.

cmgraz avatar cmgraz commented on July 17, 2024

I'm not sure if anything with this has changed, but I just can't seem to get consistent working results with this.

I'd say about half the time when I first get in the car, within a couple minutes of being out of WiFi range I'm good to go. The other half the time the x remains until I unplug/plug in the device.

If I park, go do something, and return later, many times I see the x in the red circle. I then have to plug/unplug the RPi and wait a little bit for things to get going again.

I don't know that if maybe when the car goes into sentry mode there's not enough power to keep the rpi zero going? I rarely get sentry events now whereas before anytime someone got close to the car it would record to the native USB.

The other day someone dropped some pamphlet about god inside my cracked window, but the RPi did not catch the event.

I'll have to put the USB back in until I'm able to look into this some more.

from teslausb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.