Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aduyng/tesla-client
A NodeJS application to report my Tesla status
https://github.com/aduyng/tesla-client
firebase firebase-database nodejs tesla-api
Last synced: 3 months ago
JSON representation
A NodeJS application to report my Tesla status
- Host: GitHub
- URL: https://github.com/aduyng/tesla-client
- Owner: aduyng
- License: mit
- Created: 2019-06-19T12:31:25.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-09T11:43:39.000Z (almost 2 years ago)
- Last Synced: 2024-06-29T10:33:24.871Z (5 months ago)
- Topics: firebase, firebase-database, nodejs, tesla-api
- Language: JavaScript
- Homepage:
- Size: 763 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-mmm - unofficial Tesla API client
README
# tesla-client
A collection of Firebase Cloud functions to report the car status using Tesla Unofficial APII set up this repo with my Raspberry Pi as a cronjob to report the status of the vehicle very 30 minutes.
## Installation
(Replace `/home/pi/tesla-client` to your installation folder)
1. Clone this repository
```bash
git clone https://github.com/aduyng/tesla-client.git /home/pi/tesla-client
```
1. Install dependencies
```bash
cd /home/pi/tesla-client
[sudo] npm install forever --global
npm install --production
```
1. Follow the instruction here: https://firebase.google.com/docs/admin/setup to set up your firebase project and obtain the parameters for `initializeApp()`. Download the service account JSON file and save it to `/home/pi/tesla-client/private/firebase-service-account-key.json`
1. Enter environment variables in `/home/pi/tesla-client/.env`
```bash
TESLA_CLIENT_ID=
TESLA_CLIENT_SECRET=
TESLA_ACCOUNT_USERNAME=
TESLA_ACCOUNT_PASSWORD=
FIREBASE_API_KEY=
FIREBASE_AUTH_DOMAIN=
FIREBASE_DATABASE_URL=
FIREBASE_PROJECT_ID=
FIREBASE_STORAGE_BUCKET=
FIREBASE_MESSAGING_SENDER_ID=
FIREBASE_APP_ID=
GOOGLE_APPLICATION_CREDENTIALS=/home/pi/tesla-client/private/firebase-service-account-key.json
CRON_SCHEDULE="*/5 * * * *"
```
1. Start with `forever`
```bash
forever start /home/pi/tesla-client/forever.json
```## Development
Run `npm run dev` to start the development