Skip to content
TeslaGAS is a library that helps writing scripts that communicate with your Tesla
JavaScript
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
node_modules/clasp
.clasp.json
.gitignore
Code.js
appsscript.json
auth.js
owner-api.js
package-lock.json
readme.md
request.js
rest.js
utils.js

readme.md

TeslaGAS

Created by Riel Notermans, Zzapps

TeslaGAS is a library that helps writing scripts that communicate with your Tesla

Installation

Add the library to your script project

1yBq3EEmlgUJWGk6Ygo9pDWSL7XvvxJyQti629OtrIeje6mSZJAMvDNuq Name it 'TeslaApi'

Usage

function getCar() {
 //create api 
 var api = TeslaApi.getTeslaApi("username", "password");

 //find your vehicle ID by name
 var id = api.getVehicleId("vehicle_name");

 //connect to your car
 var car = api.getVehicle(id); 
}

Current methods

//set preconditioning on max (defrost mode) 
car.set_preconditioning_max(Boolean); 

//turn on or off airco
car.auto_conditioning_start()   
car.auto_conditioning_stop() 
 
//set temperatures
car.set_temps(driver_temp, passenger_temp) 

Contributing

Pull requests are welcome. All API methods can use the same structure (see source), I wanted the API to be as user friendly as possible.

Please make sure to update tests as appropriate.

License

MIT

You can’t perform that action at this time.