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.
What am I doing wrong here? Terminal says cannot find the file - do I have the path wrong or something?

I copied the file onto my local drive, edited it there, dropped it back onto the image mounted after creating with balenaEtcher.

To edit, open Terminal, type "vi " and drag the file from your drive into the terminal window. It'll automatically populate the correct path. Hit enter and you're in the editor. To save ":w". To quit ":q".
 
For whatever reason this just won't work in my setup. I have spent hours on this. It doesn't work. For whatever reason the 'one step setup' doesn't work. It's not placing the files needed and I cannot figure which are missing, why and how to resolve. Incredibly frustrating.

I am using the image referenced here: marcone/teslausb

Here's a screenshot to illustrate when I try to 're-run' the setup files from within Terminal.

View attachment 541994

Did you try to re-run:
/root/bin/setup-teslausb​

Type that command directly in terminal after you ssh to the pi and run sudo -i

If that fails, from the same prompt run:
/root/bin/remountfs_rw
rm /boot/TESLAUSB_SETUP_FINISHED
/root/bin/setup-teslausb​

If none of that works the contents the setup log file should show what's failing:
cat /boot/teslausb-headless-setup.log​

I just set this up today and it worked fine for me and I'm on a Mac as well.
 
  • Informative
Reactions: focher
Hi hrmax, the file is already there. I added my specifics to it (just edit my wfi credentials) then boot the Pi. I have renamed the file (removing the .sample at the end) at the same time. I also tried leaving with the .sample at the end in case the script was renaming. Really appreciate your input.

Also I believe you must fill out your archive share data in the config file, the setup script tries to connect to this archive and if it can't it will fail. You need to fill out these variables so that it knows where and how to connect to your archive:

export ARCHIVE_SERVER=your_archive_name_or_ip
export SHARE_NAME=your_archive_share_name
export SHARE_USER=username
export SHARE_PASSWORD=password
 
Last edited:
What am I doing wrong here? Terminal says cannot find the file - do I have the path wrong or something?


View attachment 541949

On macOS, external drives get mounted under the /Volumes directory. Since your drive is named boot and you are using nano in the macOS Terminal.app, the command line would be:

nano /Volumes/boot/teslausb_setup_variables.conf.sample

You can also type “nano “ and the drag the file from the Finder window into the Terminal window to have it type out a valid file path.
 
I copied the file onto my local drive, edited it there, dropped it back onto the image mounted after creating with balenaEtcher.

To edit, open Terminal, type "vi " and drag the file from your drive into the terminal window. It'll automatically populate the correct path. Hit enter and you're in the editor. To save ":w". To quit ":q".

Thanks...

I have tried this, once I type VI I get the 'intro' information. I then drag across the .sample file (from a new clean install) and I get the below. From here I am not able to do anything other than move the cursor to the left, there isn't anything to edit not can I paste in, return to a new line or anything else...

All this said, do I need to use Vi to edit? Can I not use Text Editor or Visual Basic?? I can edit the file with these tools but am speculating that maybe this changes the ability for the file to be read.

upload_2020-5-16_12-51-36.png
 
On macOS, external drives get mounted under the /Volumes directory. Since your drive is named boot and you are using nano in the macOS Terminal.app, the command line would be:

nano /Volumes/boot/teslausb_setup_variables.conf.sample

You can also type “nano “ and the drag the file from the Finder window into the Terminal window to have it type out a valid file path.

Thanks, I was able to access and write to the file and save it back using nano, however this still has not solved my main issue, once I boot the Pi, I am still only able to access it as the default [email protected] and not [email protected] which suggests to me the TeslaUSB setup is not executing... I just don't know what I am missing at this point...
 
Also I believe you must fill out your archive share data in the config file, the setup script tries to connect to this archive and if it can't it will fail. You need to fill out these variables so that it knows where and how to connect to your archive:

export ARCHIVE_SERVER=your_archive_name_or_ip
export SHARE_NAME=your_archive_share_name
export SHARE_USER=username
export SHARE_PASSWORD=password

I have not done this as I am not sure of where/how to configure, (I have Google Drive and OneDrive) but if this could be a cause of failure of the setup, I'll try this also to see if it does indeed fix the issue (setup is not occurring).
 
Did you try to re-run:
/root/bin/setup-teslausb​

Type that command directly in terminal after you ssh to the pi and run sudo -i

If that fails, from the same prompt run:
/root/bin/remountfs_rw
rm /boot/TESLAUSB_SETUP_FINISHED
/root/bin/setup-teslausb​

If none of that works the contents the setup log file should show what's failing:
cat /boot/teslausb-headless-setup.log​

I just set this up today and it worked fine for me and I'm on a Mac as well.

Thank you for your help.

I have tried this and here's what I am getting;

upload_2020-5-16_13-44-13.png
 

Attachments

  • upload_2020-5-16_13-44-4.png
    upload_2020-5-16_13-44-4.png
    543.2 KB · Views: 26
You forgot to do the sudo. Without it, you do not have enough permissions to do anything. The complete set of commands is:

sudo -i
export HEADLESS_SETUP=true
/etc/rc.local

I took out the remount because it is not needed if you do the sudo first.

But you will still need to fix your DNS issue before it will all work. The problem is that the pi either does not have internet access, or the DNS server IP address your pi is getting from your DHCP server is wrong.
 
Last edited:
  • Informative
Reactions: focher
You forgot to do the sudo. Without it, you do not have enough permissions to do anything. The complete set of commands is:

sudo -i
export HEADLESS_SETUP=true
/etc/rc.local

I took out the remount because it is not needed if you do the sudo first.

But you will still need to fix your DNS issue before it will all work. The problem is that the pi either does not have internet access, or the DNS server IP address your pi is getting from your DHCP server is wrong.

Thanks RichieB, I will try this again ASAP, I really appreciate your help and patience.
 
Your image shows /boot/tesla_setup_variables.conf while rc.local is complaining about /root/tesla_setup_variables.conf
The rc.local script moves the file from /boot/tesla_setup_variables.conf to /root/tesla_setup_variables.conf so the fact that it is still in /boot/ is bad. You can do the move yourself and try again:

sudo -i
/root/bin/remountfs_rw
mv /boot/tesla_setup_variables.conf /root/
/root/bin/setup-teslausb
 
Your image shows /boot/tesla_setup_variables.conf while rc.local is complaining about /root/tesla_setup_variables.conf
The rc.local script moves the file from /boot/tesla_setup_variables.conf to /root/tesla_setup_variables.conf so the fact that it is still in /boot/ is bad. You can do the move yourself and try again:

sudo -i
/root/bin/remountfs_rw
mv /boot/tesla_setup_variables.conf /root/
/root/bin/setup-teslausb

I created a file called root and moved the file into that and re-booted. It's still saying it cannot find it. I just don't understand why this is so hard, supposed to be a one click setup...

upload_2020-5-17_17-9-42.png

upload_2020-5-17_17-9-10.png
 

Attachments

  • upload_2020-5-17_17-7-53.png
    upload_2020-5-17_17-7-53.png
    1.1 MB · Views: 38
I created a file called root and moved the file into that and re-booted. It's still saying it cannot find it. I just don't understand why this is so hard, supposed to be a one click setup...

View attachment 542452
View attachment 542451

Open the file teslausb-headless-setup.log and post the contents here.
Since the file TESLAUSB_SETUP_STARTED exists, setup thinks that it got far enough to build the filesystem with the /boot folder where it moves the config file to.
 
Last edited:
Open the file teslausb-headless-setup.log and post the contents here.
Since the file TESLAUSB_SETUP_STARTED exists, setup thinks that it got far enough to build the filesystem with the /boot folder where it moves the config file to.

Thanks, here it is;

Wed 22 Jan 23:46:18 GMT 2020 : Detecting whether to update wpa_supplicant.conf
Wed 22 Jan 23:50:21 GMT 2020 : Detecting whether to update wpa_supplicant.conf
Wed 22 Jan 23:51:31 GMT 2020 : Detecting whether to update wpa_supplicant.conf
Wed 22 Jan 23:51:31 GMT 2020 : Detecting whether to update wpa_supplicant.conf
Thu 23 Jan 00:17:32 GMT 2020 : Detecting whether to update wpa_supplicant.conf
Thu 23 Jan 00:17:31 GMT 2020 : Detecting whether to update wpa_supplicant.conf
Thu 23 Jan 00:18:31 GMT 2020 : Detecting whether to update wpa_supplicant.conf
Thu 23 Jan 00:18:31 GMT 2020 : Setup appears not to have completed, but you didn't provide a teslausb_setup_variables.conf.
Thu 23 Jan 00:18:31 GMT 2020 : Grabbing main setup file.
Thu 23 Jan 00:18:41 GMT 2020 : get_script failed, retrying
Thu 23 Jan 00:18:55 GMT 2020 : get_script failed, retrying
Thu 23 Jan 00:17:31 GMT 2020 : Detecting whether to update wpa_supplicant.conf
Thu 23 Jan 00:18:26 GMT 2020 : Detecting whether to update wpa_supplicant.conf
Thu 23 Jan 00:18:26 GMT 2020 : Setup appears not to have completed, but you didn't provide a teslausb_setup_variables.conf.
Thu 23 Jan 00:18:26 GMT 2020 : Grabbing main setup file.
Thu 23 Jan 00:18:37 GMT 2020 : get_script failed, retrying
Thu 23 Jan 00:18:50 GMT 2020 : get_script failed, retrying
Thu 23 Jan 00:19:03 GMT 2020 : get_script failed, retrying
Thu 23 Jan 00:19:17 GMT 2020 : get_script failed, retrying
Thu 23 Jan 00:19:30 GMT 2020 : get_script failed, retrying
Thu 23 Jan 00:19:43 GMT 2020 : get_script failed, retrying
Thu 23 Jan 00:19:57 GMT 2020 : get_script failed, retrying
Thu 23 Jan 00:20:10 GMT 2020 : get_script failed, retrying
Thu 23 Jan 00:20:23 GMT 2020 : get_script failed, retrying
Thu 23 Jan 00:20:36 GMT 2020 : get_script failed, retrying
Thu 23 Jan 00:20:50 GMT 2020 : get_script failed, retrying
Thu 23 Jan 00:21:03 GMT 2020 : get_script failed, retrying
Thu 23 Jan 00:21:16 GMT 2020 : get_script failed, retrying
Thu 23 Jan 00:21:29 GMT 2020 : get_script failed, retrying
Thu 23 Jan 00:21:43 GMT 2020 : get_script failed, retrying
Thu 23 Jan 00:21:56 GMT 2020 : get_script failed, retrying
Thu 23 Jan 00:22:09 GMT 2020 : get_script failed, retrying
Thu 23 Jan 00:22:23 GMT 2020 : get_script failed, retrying
Thu 23 Jan 00:17:31 GMT 2020 : Detecting whether to update wpa_supplicant.conf
Thu 23 Jan 00:17:32 GMT 2020 : Detecting whether to update wpa_supplicant.conf
Thu 23 Jan 00:18:18 GMT 2020 : Detecting whether to update wpa_supplicant.conf
Thu 23 Jan 00:18:18 GMT 2020 : Setup appears not to have completed, but you didn't provide a teslausb_setup_variables.conf.
Thu 23 Jan 00:18:18 GMT 2020 : Grabbing main setup file.
Thu 23 Jan 00:18:28 GMT 2020 : get_script failed, retrying
Thu 23 Jan 00:19:09 GMT 2020 : Detecting whether to update wpa_supplicant.conf
Thu 23 Jan 00:19:09 GMT 2020 : Setup appears not to have completed, but you didn't provide a teslausb_setup_variables.conf.
Thu 23 Jan 00:19:09 GMT 2020 : Grabbing main setup file.
Thu 23 Jan 00:19:20 GMT 2020 : get_script failed, retrying
Thu 23 Jan 00:19:33 GMT 2020 : get_script failed, retrying
Thu 23 Jan 00:19:46 GMT 2020 : get_script failed, retrying
Thu 23 Jan 00:19:59 GMT 2020 : get_script failed, retrying
Thu 23 Jan 00:20:13 GMT 2020 : get_script failed, retrying
Thu 23 Jan 00:17:32 GMT 2020 : Detecting whether to update wpa_supplicant.conf
Sun 17 May 18:59:59 BST 2020 : Detecting whether to update wpa_supplicant.conf
Sun 17 May 18:59:59 BST 2020 : Setup appears not to have completed, but you didn't provide a teslausb_setup_variables.conf.
Sun 17 May 18:59:59 BST 2020 : Grabbing main setup file.
Sun 17 May 19:00:00 BST 2020 : Starting setup.
Sun 17 May 19:00:57 BST 2020 : Detecting whether to update wpa_supplicant.conf
Sun 17 May 19:00:58 BST 2020 : Setup appears not to have completed, but you didn't provide a teslausb_setup_variables.conf.
Sun 17 May 19:00:58 BST 2020 : Starting setup.
Sun 17 May 19:01:48 BST 2020 : Detecting whether to update wpa_supplicant.conf
Sun 17 May 19:05:57 BST 2020 : Detecting whether to update wpa_supplicant.conf
Sun 17 May 19:05:57 BST 2020 : Setup appears not to have completed, but you didn't provide a teslausb_setup_variables.conf.
Sun 17 May 19:05:57 BST 2020 : Starting setup.
Sun 17 May 19:06:20 BST 2020 : Detecting whether to update wpa_supplicant.conf
Sun 17 May 19:06:20 BST 2020 : Setup appears not to have completed, but you didn't provide a teslausb_setup_variables.conf.
Sun 17 May 19:06:20 BST 2020 : Starting setup.
Sun 17 May 19:08:43 BST 2020 : Detecting whether to update wpa_supplicant.conf
Sun 17 May 19:08:43 BST 2020 : Setup appears not to have completed, but you didn't provide a teslausb_setup_variables.conf.
Sun 17 May 19:08:43 BST 2020 : Starting setup.
Sun 17 May 19:09:29 BST 2020 : Detecting whether to update wpa_supplicant.conf
Sun 17 May 22:02:31 BST 2020 : Detecting whether to update wpa_supplicant.conf