Skip to content

Commit

Permalink
Format project using Prettier (#802)
Browse files Browse the repository at this point in the history
  • Loading branch information
withinfocus authored Jan 2, 2024
1 parent 2b0bab7 commit 02f4f57
Show file tree
Hide file tree
Showing 14 changed files with 395 additions and 346 deletions.
159 changes: 79 additions & 80 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,90 +1,89 @@
name: "Bug report"
description: Create a new report
body:
- type: markdown
attributes:
value: |
**Is this the right place for my bug report?**
If you simply have a question, please check the [FAQ](/marcone/teslausb/wiki/FAQ) first, and/or check the [troubleshooting steps](/marcone/teslausb/wiki/Troubleshooting). If those do not answer your question use [Discord](https://discord.gg/b4MHf2x).
If you you are reporting a problem with teslausb itself, this is the right place.
If the problem is a more general Linux or Raspberry Pi OS problem, then [the Raspberry Pi forums](https://www.raspberrypi.org/forums) may offer some help
- type: markdown
attributes:
value: |
**Is this the right place for my bug report?**
If you simply have a question, please check the [FAQ](/marcone/teslausb/wiki/FAQ) first, and/or check the [troubleshooting steps](/marcone/teslausb/wiki/Troubleshooting). If those do not answer your question use [Discord](https://discord.gg/b4MHf2x).
If you you are reporting a problem with teslausb itself, this is the right place.
If the problem is a more general Linux or Raspberry Pi OS problem, then [the Raspberry Pi forums](https://www.raspberrypi.org/forums) may offer some help
- type: textarea
id: description
attributes:
label: Describe the problem
description: |
Add a clear and concise description of what you think the problem is, and how to reproduce it.
validations:
required: true
- type: textarea
id: description
attributes:
label: Describe the problem
description: |
Add a clear and concise description of what you think the problem is, and how to reproduce it.
validations:
required: true

- type: dropdown
id: devicemodel
attributes:
label: Device
description: What model device are you using?
multiple: false
options:
- Raspberry Pi Zero W
- Raspberry Pi Zero 2 W
- Raspberry Pi 4
- Radxa Zero
- Rock Pi 4C plus
- Other
validations:
required: true
- type: dropdown
id: devicemodel
attributes:
label: Device
description: What model device are you using?
multiple: false
options:
- Raspberry Pi Zero W
- Raspberry Pi Zero 2 W
- Raspberry Pi 4
- Radxa Zero
- Rock Pi 4C plus
- Other
validations:
required: true

- type: dropdown
id: image
attributes:
label: OS Image
description: Which OS did you install?
multiple: false
options:
- Prebuilt TeslaUSB image
- Armbian
- other
validations:
required: true
- type: dropdown
id: image
attributes:
label: OS Image
description: Which OS did you install?
multiple: false
options:
- Prebuilt TeslaUSB image
- Armbian
- other
validations:
required: true

- type: dropdown
id: carmodel
attributes:
label: Car Model
description: In which model car are you seeing the problem?
multiple: false
options:
- Model S
- Model 3
- Model X
- Model Y
validations:
required: true
- type: dropdown
id: carmodel
attributes:
label: Car Model
description: In which model car are you seeing the problem?
multiple: false
options:
- Model S
- Model 3
- Model X
- Model Y
validations:
required: true

- type: dropdown
id: usbconnection
attributes:
label: USB connection
description: How are you connecting to the car?
multiple: false
options:
- Center console
- Glove box
validations:
required: true
- type: dropdown
id: usbconnection
attributes:
label: USB connection
description: How are you connecting to the car?
multiple: false
options:
- Center console
- Glove box
validations:
required: true

- type: textarea
id: logs
attributes:
label: Logs
description: |
If the web interface is working, use it to download diagnostics and copy/paste or attach them here.
If the web interface is not working but you can ssh in to the Pi, run `sudo /root/bin/setup-teslausb diagnose` on the Pi to obtain diagnostics and attach them here.
- type: textarea
id: additional
attributes:
label: Additional information
description: |
Add any other relevant context for the problem.
- type: textarea
id: logs
attributes:
label: Logs
description: |
If the web interface is working, use it to download diagnostics and copy/paste or attach them here.
If the web interface is not working but you can ssh in to the Pi, run `sudo /root/bin/setup-teslausb diagnose` on the Pi to obtain diagnostics and attach them here.
- type: textarea
id: additional
attributes:
label: Additional information
description: |
Add any other relevant context for the problem.
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ blank_issues_enabled: false
contact_links:
- name: "⛔ Questions"
url: https://discord.gg/b4MHf2x
about: "Please do not use GitHub for asking questions. If you simply have a question, then the Discord is the best place to ask it. You may also find answers to your questions in the FAQ (in the \"Wiki\" tab)."
about: 'Please do not use GitHub for asking questions. If you simply have a question, then the Discord is the best place to ask it. You may also find answers to your questions in the FAQ (in the "Wiki" tab).'
- name: "⛔ Check if your problem has been reported already"
url: https://github.com/marcone/teslausb/issues
about: "Please check if the problem you're encountering has already been reported. Check both opened and closed issues, as well as the Wiki."

12 changes: 6 additions & 6 deletions .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Run ShellCheck
shell: bash
run: |
cd "${GITHUB_WORKSPACE}"
./check.sh
- uses: actions/checkout@v1
- name: Run ShellCheck
shell: bash
run: |
cd "${GITHUB_WORKSPACE}"
./check.sh
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
teslausb-www/html
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
language: shell
script:
- bash check.sh
- bash check.sh
28 changes: 15 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
## Intro

Raspberry Pi and other [SBCs](## "Single Board Computers") can emulate a USB drive, so can act as a drive for your Tesla to write dashcam footage to. Because the SBC has full access to the emulated drive, it can:
* automatically copy the recordings to an archive server when you get home
* hold both dashcam recordings and music files
* automatically repair filesystem corruption produced by the Tesla's current failure to properly dismount the USB drives before cutting power to the USB ports
* serve up a web UI to view or download the recordings
* retain more than one hour of RecentClips (assuming large enough storage)

- automatically copy the recordings to an archive server when you get home
- hold both dashcam recordings and music files
- automatically repair filesystem corruption produced by the Tesla's current failure to properly dismount the USB drives before cutting power to the USB ports
- serve up a web UI to view or download the recordings
- retain more than one hour of RecentClips (assuming large enough storage)

This video (not mine) has a nice overview of teslausb and how to install it:

Expand All @@ -19,20 +20,21 @@ If you are interested in having more detailed information about how TeslaUsb wor

### Assumptions

* You park in range of your wireless network.
* Your wireless network is configured with WPA2 PSK access.
- You park in range of your wireless network.
- Your wireless network is configured with WPA2 PSK access.

### Hardware

Required:
* [A Raspberry Pi or other SBC that supports USB OTG](https://github.com/marcone/teslausb/wiki/Hardware).
* A Micro SD card, at least 64 GB in size, and an adapter (if necessary) to connect the card to your computer.
* Cable(s) to connect the SBC to the Tesla (USB A/Micro B cable for the Pi Zero, USB A/Micro C cable for Pi 4, other SBCs vary)

- [A Raspberry Pi or other SBC that supports USB OTG](https://github.com/marcone/teslausb/wiki/Hardware).
- A Micro SD card, at least 64 GB in size, and an adapter (if necessary) to connect the card to your computer.
- Cable(s) to connect the SBC to the Tesla (USB A/Micro B cable for the Pi Zero, USB A/Micro C cable for Pi 4, other SBCs vary)

Optional:
* A case and/or cooler for the SBC. For the Raspberry Pi 4 I like the ["armor case"](https://www.amazon.com/s?k=Raspberry+Pi+4+Armor+Case) (available with or without fans), which appears to do a good job of protecting the Pi while keeping it cool.
* USB Splitter if you don't want to lose a front USB port. [The Onvian Splitter](https://www.amazon.com/gp/product/B01KX4TKH6) has been reported working by multiple people on reddit. Some SBCs require separate power and data connection, so may require a splitter or a USB hub to connect to the car.

- A case and/or cooler for the SBC. For the Raspberry Pi 4 I like the ["armor case"](https://www.amazon.com/s?k=Raspberry+Pi+4+Armor+Case) (available with or without fans), which appears to do a good job of protecting the Pi while keeping it cool.
- USB Splitter if you don't want to lose a front USB port. [The Onvian Splitter](https://www.amazon.com/gp/product/B01KX4TKH6) has been reported working by multiple people on reddit. Some SBCs require separate power and data connection, so may require a splitter or a USB hub to connect to the car.

## Installing

Expand All @@ -45,6 +47,6 @@ For pull requests, please split complex changes into multiple pull requests when

## Meta

This repo contains steps and scripts originally from [this thread on Reddit]( https://www.reddit.com/r/teslamotors/comments/9m9gyk/build_a_smart_usb_drive_for_your_tesla_dash_cam/)
This repo contains steps and scripts originally from [this thread on Reddit](https://www.reddit.com/r/teslamotors/comments/9m9gyk/build_a_smart_usb_drive_for_your_tesla_dash_cam/)

Many people in that thread suggested that the scripts be hosted on GitHub but the author didn't seem interested in making that happen, so GitHub user "cimryan" hosted the scripts on GitHub with the Reddit user's permission.
Loading

0 comments on commit 02f4f57

Please sign in to comment.