- streamingPortal
- portal
- API_LOG_ALWAYS
- API_ERR_LEVEL
- API_CALL_LEVEL
- API_RETURN_LEVEL
- API_BODY_LEVEL
- API_REQUEST_LEVEL
- API_RESPONSE_LEVEL
- API_LOG_ALL
- CHARGE_STORAGE
- CHARGE_DAILY
- CHARGE_STANDARD
- CHARGE_RANGE
- SUNROOF_VENT
- SUNROOF_CLOSED
- MIN_TEMP
- MAX_TEMP
- FRUNK
- TRUNK
- streamingColumns
- setLogLevel(level)
Set the current logging level
- getLogLevel() ⇒
int
Get the current logging level
- setPortalBaseURI(uri)
Set the portal base URI
- getPortalBaseURI() ⇒
string
Get the portal base URI
- setStreamingBaseURI(uri)
Set the streaming base URI
- getStreamingBaseURI() ⇒
string
Get the streaming base URI
- getModel(vehicle) ⇒
string
Return the car model from vehicle JSON information
- vinDecode(vehicle) ⇒
object
Return an object containing properties decoded from the vehicle VIN
- getPaintColor(vehicle) ⇒
string
Return the paint color from vehicle JSON information
- getVin(vehicle) ⇒
string
Return the vehicle VIN from vehicle JSON information
- getShortVin(vehicle) ⇒
string
Return the vehicle VIN from vehicle JSON information
- login(credentials, callback) ⇒
object
Login to the server and receive OAuth tokens
- loginAsync(credentials) ⇒
Promise
Login to the server and receive OAuth tokens
- refreshToken(refresh_token, callback) ⇒
object
Retrieve new OAuth and refresh tokens using a refresh_token
- refreshTokenAsync(refresh_token) ⇒
Promise
Async call to retrieve new OAuth and refresh tokens using a refresh_token
- logout(authToken, callback)
Logout and invalidate the current auth token
- logoutAsync(authToken) ⇒
Promise
Logout and invalidate the current auth token
- vehicle(options, callback) ⇒
Vehicle
Return vehicle information on the requested vehicle
- vehicleAsync(options) ⇒
Promise
Return vehicle information on the requested vehicle
- vehicleById(options, callback) ⇒
Vehicle
Return vehicle information on the requested vehicle. Uses options.vehicleID to determine which vehicle to fetch data for.
- vehicleByIdAsync(options) ⇒
Promise
Return vehicle information on the requested vehicle. Uses options.vehicleID to determine which vehicle to fetch data for.
- vehicles(options, callback) ⇒
Array.<Vehicles>
Return vehicle information on ALL vehicles
- vehiclesAsync(options, callback) ⇒
Promise
Return vehicle information on ALL vehicles
- get_command(options, command, callback)
Generic REST call for GET commands
- get_commandAsync(options, command) ⇒
Promise
Generic Async REST call for GET commands
- post_command(options, command, body, callback)
Generic REST call for POST commands
- post_commandAsync(options, command, body) ⇒
Promise
Generic Async REST call for POST commands
- vehicleData(options, callback) ⇒
object
GET all vehicle data in a single call
- vehicleDataAsync(options) ⇒
Promise
Async version to GET all vehicle data in a single call
- vehicleConfig(options, callback) ⇒
object
GET the vehicle config
- vehicleConfigAsync(options) ⇒
Promise
Async version to GET the vehicle config
- vehicleState(options, callback) ⇒
object
GET the vehicle state
- vehicleStateAsync(options) ⇒
Promise
Async version to GET the vehicle state
- climateState(options, callback) ⇒
object
GET the climate state
- climateStateAsync(options) ⇒
Promise
GET the climate state
- nearbyChargers(options, callback) ⇒
object
GET nearby charging sites
- nearbyChargersAsync(options) ⇒
Promise
- driveState(options, callback) ⇒
object
GET the drive state
- driveStateAsync(options) ⇒
Promise
- chargeState(options, callback) ⇒
object
GET the charge state
- chargeStateAsync(options) ⇒
Promise
- guiSettings(options, callback) ⇒
object
GET the GUI settings
- guiSettingsAsync(options) ⇒
Promise
- mobileEnabled(options, callback) ⇒
object
GET the mobile enabled status
- mobileEnabledAsync(options) ⇒
Promise
- honkHorn(options, callback) ⇒
object
Honk the horn
- honkHornAsync(options) ⇒
Promise
- flashLights(options, callback) ⇒
object
Flash the lights
- flashLightsAsync(options) ⇒
Promise
- startCharge(options, callback) ⇒
object
Start charging the car
- startChargeAsync(options) ⇒
Promise
Start charging the car
- stopCharge(options, callback) ⇒
object
Stop charging the car
- stopChargeAsync(options) ⇒
Promise
Stop charging the car
- openChargePort(options, callback) ⇒
object
Open the charge port, or releases the latch if the charge port is open, a cable is plugged in, and charging is stopped
- openChargePortAsync(options) ⇒
Promise
Open the charge port, or releases the latch if the charge port is open, a cable is plugged in, and charging is stopped
- closeChargePort(options, callback) ⇒
object
Close the charge port for appropriately equipped vehicles
- closeChargePortAsync(options) ⇒
Promise
Close the charge port for appropriately equipped vehicles
- scheduleSoftwareUpdate(options, offset) ⇒
object
Schedule a firmware update
- scheduleSoftwareUpdateAsync(options, offset) ⇒
Promise
Schedule a firmware update
- cancelSoftwareUpdate(options) ⇒
object
Cancel a scheduled software update
- cancelSoftwareUpdateAsync(options) ⇒
Promise
Cancel a scheduled software update
- navigationRequest(options, subject, text, locale) ⇒
object
Send a navigation request to the car
- navigationRequestAsync(options, subject, text, locale) ⇒
Promise
Send a navigation request to the car
- mediaTogglePlayback(options) ⇒
object
Toggle media playback
- mediaTogglePlaybackAsync(options) ⇒
Promise
Toggle media playback
- mediaPlayNext(options) ⇒
object
Media play next track
- mediaPlayNextAsync(options) ⇒
Promise
Media play next track
- mediaPlayPrevious(options) ⇒
object
Media play previous track
- mediaPlayPreviousAsync(options) ⇒
Promise
Media play previous track
- mediaPlayNextFavorite(options) ⇒
object
Media play next favorite
- mediaPlayNextFavoriteAsync(options) ⇒
Promise
Media play next favorite
- mediaPlayPreviousFavorite(options) ⇒
object
Media play previous favorite
- mediaPlayPreviousFavoriteAsync(options) ⇒
Promise
Media play previous favorite
- mediaVolumeUp(options) ⇒
object
Media volume up
- mediaVolumeUpAsync(options) ⇒
Promise
Media volume up
- mediaVolumeDown(options) ⇒
object
Media volume down
- mediaVolumeDownAsync(options) ⇒
Promise
Media volume down
- speedLimitActivate(options, pin) ⇒
object
Activate speed limitation
- speedLimitActivateAsync(options, pin) ⇒
Promise
Activate speed limitation
- speedLimitDeactivate(options, pin) ⇒
object
Deactivate speed limitation
- speedLimitDeactivateAsync(options, pin) ⇒
Promise
Deactivate speed limitation
- speedLimitClearPin(options, pin) ⇒
object
Clear speed limitation pin
- speedLimitClearPinAsync(options, pin) ⇒
Promise
Clear speed limitation pin
- speedLimitSetLimit(options, limit) ⇒
object
Set speed limit
- speedLimitSetLimitAsync(options, limit) ⇒
Promise
Set speed limit
- setSentryMode(options, onoff) ⇒
object
Enable or disable sentry mode
- setSentryModeAsync(onoff) ⇒
Promise
Enable or disable sentry mode
- seatHeater(options, heater, level) ⇒
object
Remote seat heater
- seatHeaterAsync(options, heater, level) ⇒
Promise
Remote seat heater
- steeringHeater(options, level) ⇒
object
Remote steering heater
- seatHeaterAsync(options, level) ⇒
Promise
Remote steering heater
- maxDefrost(options, onoff) ⇒
object
Max Defrost
- maxDefrostAsync(options, onoff) ⇒
Promise
Remote steering heater
- windowControl(options, command, lat, lon) ⇒
object
Window control
- windowControlAsync(options, command, lat, lon) ⇒
Promise
Window control
- setChargeLimit(options, amt, callback) ⇒
object
Set the charge limit. Note: charging to 100% frequently is NOT recommended for long-term battery health!
- setChargeLimitAsync(options, amt) ⇒
Promise
Set the charge limit async and return Promise. Note: charging to 100% frequently is NOT recommended for long-term battery health!
- chargeStandard(options, callback) ⇒
object
Set the charge limit to (standard) 90%
- chargeStandardAsync(options) ⇒
Promise
- chargeMaxRange(options, callback) ⇒
object
Set charge limit to 100%
- chargeMaxRangeAsync(options) ⇒
Promise
- setChargingAmps(options, amps, callback) ⇒
object
Set the charging amps.
- setChargingAmpsAsync(options, amps) ⇒
Promise
Set the charging amps async and return Promise.
- setScheduledCharging(options, enable, time, callback) ⇒
object
Set the scheduled charging time.
- setScheduledCharging(options, enable, time) ⇒
Promise
Set the scheduled charging time async and return Promise.
- setScheduledDeparture(options, enable, departure_time, preconditioning_enabled, preconditioning_weekdays_only, off_peak_charging_enabled, off_peak_charging_weekdays_only, end_off_peak_time, callback) ⇒
object
Set the scheduled departure.
- setScheduledDeparture(options, enable, departure_time, preconditioning_enabled, preconditioning_weekdays_only, off_peak_charging_enabled, off_peak_charging_weekdays_only, end_off_peak_time) ⇒
Promise
Set the scheduled departure async and return Promise.
- doorLock(options, callback) ⇒
object
Lock the car doors
- doorLockAsync(options) ⇒
Promise
- doorUnlock(options, callback) ⇒
object
Unlock the car doors
- doorUnlockAsync(options) ⇒
Promise
- climateStart(options, callback) ⇒
object
Turn on HVAC system
- climateStartAsync(options) ⇒
Promise
- climateStop(options, callback) ⇒
object
Turn off HVAC system
- climateStopAsync(options) ⇒
Promise
- sunRoofControl(options, state, callback) ⇒
object
Set sun roof mode
- sunRoofControlAsync(options, state) ⇒
Promise
- sunRoofMove(options, percent, callback) ⇒
object
Set sun roof position
- sunRoofMoveAsync(options, percent) ⇒
Promise
- setTemps(options, driver, pass, callback) ⇒
object
Set the driver/passenger climate temperatures
- setTempsAsync(options, driver, pass) ⇒
Promise
- remoteStart(options, callback) ⇒
object
Remote start the car
- remoteStartAsync(options) ⇒
Promise
- openTrunk(options, which, callback) ⇒
object
Open the trunk/frunk
- openTrunkAsync(options, which) ⇒
Promise
- wakeUp(options, callback) ⇒
object
Wake up a car that is sleeping
- wakeUpAsync(options) ⇒
Promise
- setValetMode(options, onoff, pin, callback) ⇒
object
Turn valet mode on/off
- setValetModeAsync(options, onoff, pin) ⇒
Promise
- resetValetPin(options, callback) ⇒
object
Reset the valet pin
- resetValetPinAsync(options) ⇒
Promise
- calendar(options, entry, callback) ⇒
object
Set a calendar entry
- calendarAsync(options, entry) ⇒
Promise
- makeCalendarEntry(eventName, location, startTime, endTime, accountName, phoneName) ⇒
object
Create a calendar entry
- homelink(options, lat, long, string, callback) ⇒
object
Trigger homelink
- homelinkAsync(options, lat, long, string) ⇒
Promise
- products(options, callback) ⇒
Array.<products>
Return list of products
- productsAsync(options, callback) ⇒
Promise
Return list of products
- solarStatus(options, callback) ⇒
solarStatus
Return live status from solar installation
- solarStatusAsync(options, callback) ⇒
Promise
Return solar status information
- startStreaming(options, callback, onDataCb) ⇒
object
Start streaming car data
- nodeBack :
function
Node-style callback function
- optionsType :
object
TeslaJS options parameter
Kind: global variable
Default: wss://streaming.vn.teslamotors.com/streaming/
Kind: global variable
Default: https://owner-api.teslamotors.com
Kind: global variable
Default: 0
Kind: global variable
Default: 1
Kind: global variable
Default: 2
Kind: global variable
Default: 3
Kind: global variable
Default: 4
Kind: global variable
Default: 5
Kind: global variable
Default: 6
Kind: global variable
Default: 255
Kind: global variable
Default: 50
Kind: global variable
Default: 70
Kind: global variable
Default: 90
Kind: global variable
Default: 100
Kind: global variable
Default: vent
Kind: global variable
Default: close
Kind: global variable
Default: 15
Kind: global variable
Default: 28
Kind: global variable
Default: front
Kind: global variable
Default: rear
Kind: global variable
Default: ["elevation","est_heading","est_lat","est_lng","est_range","heading","odometer","power","range","shift_state","speed","soc"]
Set the current logging level
Kind: global function
Param | Type | Description |
---|---|---|
level | int |
logging level |
Get the current logging level
Kind: global function
Returns: int
- the current logging level
Set the portal base URI
Kind: global function
Param | Type | Description |
---|---|---|
uri | string |
URI for Tesla servers |
Get the portal base URI
Kind: global function
Returns: string
- URI for Tesla servers
Set the streaming base URI
Kind: global function
Param | Type | Description |
---|---|---|
uri | string |
URI for Tesla streaming servers |
Get the streaming base URI
Kind: global function
Returns: string
- URI for Tesla streaming servers
Return the car model from vehicle JSON information
Kind: global function
Returns: string
- vehicle model string
Param | Type | Description |
---|---|---|
vehicle | object |
vehicle JSON |
Return an object containing properties decoded from the vehicle VIN
Kind: global function
Returns: object
- vehicle properties
Param | Type | Description |
---|---|---|
vehicle | object |
vehicle JSON |
Return the paint color from vehicle JSON information
Kind: global function
Returns: string
- the vehicle paint color
Param | Type | Description |
---|---|---|
vehicle | object |
vehicle JSON |
Return the vehicle VIN from vehicle JSON information
Kind: global function
Returns: string
- the vehicle VIN
Param | Type | Description |
---|---|---|
vehicle | object |
vehicle JSON |
Return the vehicle VIN from vehicle JSON information
Kind: global function
Returns: string
- the short version of the vehicle VIN
Param | Type | Description |
---|---|---|
vehicle | object |
vehicle JSON |
Login to the server and receive OAuth tokens
Kind: global function
Returns: object
- {response, body, authToken, refreshToken}
Param | Type | Description |
---|---|---|
credentials | Object |
object of Tesla credentials |
credentials.username | string |
email address used on Tesla.com |
credentials.password | string |
password used on Tesla.command |
credentials.mfaPassCode | string |
MFA password |
credentials.mfaDeviceName | string |
MFA device name |
callback | nodeBack |
Node-style callback |
Login to the server and receive OAuth tokens
Kind: global function
Returns: Promise
- {response, body, authToken, refreshToken}
Param | Type | Description |
---|---|---|
credentials | Object |
object of Tesla credentials |
credentials.username | string |
email address used on Tesla.com |
credentials.password | string |
password used on Tesla.command |
credentials.mfaPassCode | string |
MFA password |
credentials.mfaDeviceName | string |
MFA device name |
Retrieve new OAuth and refresh tokens using a refresh_token
Kind: global function
Returns: object
- {response, body, authToken, refreshToken}
Param | Type | Description |
---|---|---|
refresh_token | string |
a valid OAuth refresh_token from a previous login |
callback | nodeBack |
Node-style callback |
Async call to retrieve new OAuth and refresh tokens using a refresh_token
Kind: global function
Returns: Promise
- {response, body, authToken, refreshToken}
Param | Type | Description |
---|---|---|
refresh_token | string |
a valid OAuth refresh_token from a previous login |
Logout and invalidate the current auth token
Kind: global function
Param | Type | Description |
---|---|---|
authToken | string |
Tesla provided OAuth token |
callback | nodeBack |
Node-style callback |
Logout and invalidate the current auth token
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
authToken | string |
Tesla provided OAuth token |
Return vehicle information on the requested vehicle
Kind: global function
Returns: Vehicle
- vehicle JSON data
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
callback | nodeBack |
Node-style callback |
Return vehicle information on the requested vehicle
Kind: global function
Returns: Promise
- vehicle JSON data
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
Return vehicle information on the requested vehicle. Uses options.vehicleID to determine which vehicle to fetch data for.
Kind: global function
Returns: Vehicle
- vehicle JSON data
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
callback | nodeBack |
Node-style callback |
Return vehicle information on the requested vehicle. Uses options.vehicleID to determine which vehicle to fetch data for.
Kind: global function
Returns: Promise
- vehicle JSON data
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
Return vehicle information on ALL vehicles
Kind: global function
Returns: Array.<Vehicles>
- array of vehicle JSON data
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
callback | nodeBack |
Node-style callback |
Return vehicle information on ALL vehicles
Kind: global function
Returns: Promise
- array of vehicle JSON data
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
callback | nodeBack |
Node-style callback |
Generic REST call for GET commands
Kind: global function
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
command | string |
REST command |
callback | nodeBack |
Node-style callback |
Generic Async REST call for GET commands
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
command | string |
REST command |
Generic REST call for POST commands
Kind: global function
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
command | string |
REST command |
body | object |
JSON payload |
callback | nodeBack |
Node-style callback |
Generic Async REST call for POST commands
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
command | string |
REST command |
body | object |
JSON payload |
GET all vehicle data in a single call
Kind: global function
Returns: object
- vehicle_data object
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
callback | nodeBack |
Node-style callback |
Async version to GET all vehicle data in a single call
Kind: global function
Returns: Promise
- vehicle_data object
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
GET the vehicle config
Kind: global function
Returns: object
- vehicle_config object
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
callback | nodeBack |
Node-style callback |
Async version to GET the vehicle config
Kind: global function
Returns: Promise
- vehicle_config object
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
GET the vehicle state
Kind: global function
Returns: object
- vehicle_state object
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
callback | nodeBack |
Node-style callback |
Async version to GET the vehicle state
Kind: global function
Returns: Promise
- vehicle_state object
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
GET the climate state
Kind: global function
Returns: object
- climate_state object
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
callback | nodeBack |
Node-style callback |
GET the climate state
Kind: global function
Returns: Promise
- climate_state object
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
GET nearby charging sites
Kind: global function
Returns: object
- climate_state object
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
callback | nodeBack |
Node-style callback |
Kind: global function
Returns: Promise
- climate_state object
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
GET the drive state
Kind: global function
Returns: object
- drive_state object
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
callback | nodeBack |
Node-style callback |
Kind: global function
Returns: Promise
- drive_state object
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
GET the charge state
Kind: global function
Returns: object
- charge_state object
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
callback | nodeBack |
Node-style callback |
Kind: global function
Returns: Promise
- charge_state object
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
GET the GUI settings
Kind: global function
Returns: object
- gui_settings object
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
callback | nodeBack |
Node-style callback |
Kind: global function
Returns: Promise
- gui_settings object
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
GET the mobile enabled status
Kind: global function
Returns: object
- mobile_enabled object
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
callback | nodeBack |
Node-style callback |
Kind: global function
Returns: Promise
- mobile_enabled object
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
Honk the horn
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
callback | nodeBack |
Node-style callback |
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
Flash the lights
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
callback | nodeBack |
Node-style callback |
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
Start charging the car
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
callback | nodeBack |
Node-style callback |
Start charging the car
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
Stop charging the car
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
callback | nodeBack |
Node-style callback |
Stop charging the car
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
Open the charge port, or releases the latch if the charge port is open, a cable is plugged in, and charging is stopped
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
callback | nodeBack |
Node-style callback |
Open the charge port, or releases the latch if the charge port is open, a cable is plugged in, and charging is stopped
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
Close the charge port for appropriately equipped vehicles
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
callback | nodeBack |
Node-style callback |
Close the charge port for appropriately equipped vehicles
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
Schedule a firmware update
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
offset | number |
delay in ms before installation begins |
Schedule a firmware update
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
offset | number |
delay in ms before installation begins |
Cancel a scheduled software update
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
Cancel a scheduled software update
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
Send a navigation request to the car
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
subject | string |
short-hand name for the destination |
text | string |
address details including things like name, address, map link |
locale | string |
the language locale, for example "en-US" |
Send a navigation request to the car
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
subject | string |
short-hand name for the destination |
text | string |
address details including things like name, address, map link |
locale | string |
the language locale, for example "en-US" |
Toggle media playback
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
Toggle media playback
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
Media play next track
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
Media play next track
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
Media play previous track
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
Media play previous track
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
Media play next favorite
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
Media play next favorite
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
Media play previous favorite
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
Media play previous favorite
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
Media volume up
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
Media volume up
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
Media volume down
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
Media volume down
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
Activate speed limitation
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
pin | number |
Activation pin code. Not the same as valet pin |
Activate speed limitation
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
pin | number |
Activation pin code. Not the same as valet pin |
Deactivate speed limitation
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
pin | number |
Activation pin code. Not the same as valet pin |
Deactivate speed limitation
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
pin | number |
Activation pin code. Not the same as valet pin |
Clear speed limitation pin
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
pin | number |
Activation pin code. Not the same as valet pin |
Clear speed limitation pin
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
pin | number |
Activation pin code. Not the same as valet pin |
Set speed limit
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
limit | number |
Speed limit in mph |
Set speed limit
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
limit | number |
Speed limit in mph |
Enable or disable sentry mode
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
onoff | boolean |
true to turn on sentry mode, false to turn off |
Enable or disable sentry mode
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
onoff | boolean |
true to turn on sentry mode, false to turn off |
Remote seat heater
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
heater | number |
Which heater to adjust (0-5) |
level | number |
Level for the heater (0-3) |
Remote seat heater
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
heater | number |
Which heater to adjust (0-5) |
level | number |
Level for the heater (0-3) |
Remote steering heater
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
level | number |
Level for the heater (0-3) |
Remote steering heater
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
level | number |
Level for the heater (0-3) |
Max Defrost
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
onoff | boolean |
true for on, false for off |
Remote steering heater
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
onoff | boolean |
true for on, false for off |
Window control
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
command | string |
Allowable values are 'vent' and 'close' |
lat | number |
User latitude (can be 0 if not 'close' command) |
lon | number |
User longitude (can be 0 if not 'close' command) |
Window control
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
command | string |
Allowable values are 'vent' and 'close' |
lat | number |
User latitude (can be 0 if not 'close' command) |
lon | number |
User longitude (can be 0 if not 'close' command) |
Set the charge limit. Note: charging to 100% frequently is NOT recommended for long-term battery health!
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
amt | int |
charge limit in percent |
callback | nodeBack |
Node-style callback |
Set the charge limit async and return Promise. Note: charging to 100% frequently is NOT recommended for long-term battery health!
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
amt | int |
charge limit in percent |
Set the charge limit to (standard) 90%
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
callback | nodeBack |
Node-style callback |
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
Set charge limit to 100%
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
callback | nodeBack |
Node-style callback |
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
Set the charging amps.
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
amps | int |
charging amps |
callback | nodeBack |
Node-style callback |
Set the charging amps async and return Promise.
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
amps | int |
charging amps |
Set the scheduled charging time.
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
enable | boolean |
true for on, false for off |
time | int |
time in minutes since midnight, 15min step |
callback | nodeBack |
Node-style callback |
Set the scheduled charging time async and return Promise.
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
enable | boolean |
true for on, false for off |
time | int |
time in minutes since midnight, 15min step |
setScheduledDeparture(options, enable, departure_time, preconditioning_enabled, preconditioning_weekdays_only, off_peak_charging_enabled, off_peak_charging_weekdays_only, end_off_peak_time, callback) ⇒ object
Set the scheduled departure.
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
enable | boolean |
true if (preconditioning_enabled |
departure_time | int |
time in minutes since midnight, 15min step |
preconditioning_enabled | boolean |
true for on, false for off |
preconditioning_weekdays_only | boolean |
true for on, false for off |
off_peak_charging_enabled | boolean |
true for on, false for off |
off_peak_charging_weekdays_only | boolean |
true for on, false for off |
end_off_peak_time | int |
time in minutes since midnight, 15min step |
callback | nodeBack |
Node-style callback |
setScheduledDeparture(options, enable, departure_time, preconditioning_enabled, preconditioning_weekdays_only, off_peak_charging_enabled, off_peak_charging_weekdays_only, end_off_peak_time) ⇒ Promise
Set the scheduled departure async and return Promise.
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
enable | boolean |
true if (preconditioning_enabled |
departure_time | int |
time in minutes since midnight, 15min step |
preconditioning_enabled | boolean |
true for on, false for off |
preconditioning_weekdays_only | boolean |
true for on, false for off |
off_peak_charging_enabled | boolean |
true for on, false for off |
off_peak_charging_weekdays_only | boolean |
true for on, false for off |
end_off_peak_time | int |
time in minutes since midnight, 15min step |
Lock the car doors
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
callback | nodeBack |
Node-style callback |
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
Unlock the car doors
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
callback | nodeBack |
Node-style callback |
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
Turn on HVAC system
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
callback | nodeBack |
Node-style callback |
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
Turn off HVAC system
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
callback | nodeBack |
Node-style callback |
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
Set sun roof mode
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
state | string |
one of "vent", "close" |
callback | nodeBack |
Node-style callback |
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
state | string |
one of "vent", "close" |
Set sun roof position
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
percent | int |
position in percent |
callback | nodeBack |
Node-style callback |
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
percent | int |
position in percent |
Set the driver/passenger climate temperatures
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
driver | number |
driver temp in Deg.C |
pass | number |
passenger temp in Deg.C |
callback | nodeBack |
Node-style callback |
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
driver | number |
driver temp in Deg.C |
pass | number |
passenger temp in Deg.C |
Remote start the car
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
callback | nodeBack |
Node-style callback |
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
Open the trunk/frunk
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
which | string |
FRUNK or TRUNK constant |
callback | nodeBack |
Node-style callback |
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
which | string |
one of "trunk", "frunk" |
Wake up a car that is sleeping
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
callback | nodeBack |
Node-style callback |
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
Turn valet mode on/off
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
onoff | boolean |
true for on, false for off |
pin | int |
pin code |
callback | nodeBack |
Node-style callback |
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
onoff | boolean |
true for on, false for off |
pin | int |
pin code |
Reset the valet pin
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
callback | nodeBack |
Node-style callback |
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
Set a calendar entry
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
entry | object |
calendar entry object |
callback | nodeBack |
Node-style callback |
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
entry | object |
calendar entry object |
Create a calendar entry
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
eventName | string |
name of the event |
location | string |
location of the event |
startTime | number |
Javascript timestamp for start of event |
endTime | number |
Javascript timestamp for end of event |
accountName | string |
name of the calendar account |
phoneName | string |
phone bluetooth name |
Trigger homelink
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
lat | number |
vehicle GPS latitude |
long | number |
vehicle GPS longitude |
string | string |
one of the tokens from vehicle JSON |
callback | nodeBack |
Node-style callback |
Kind: global function
Returns: Promise
- result
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
lat | number |
vehicle GPS latitude |
long | number |
vehicle GPS longitude |
string | string |
one of the tokens from vehicle JSON |
products(options, callback) ⇒ Array.<products>
Return list of products
Kind: global function
Returns: Array.<products>
- array of products JSON data
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
callback | nodeBack |
Node-style callback |
Return list of products
Kind: global function
Returns: Promise
- array of products JSON data
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
callback | nodeBack |
Node-style callback |
solarStatus(options, callback) ⇒ solarStatus
Return live status from solar installation
Kind: global function
Returns: solarStatus
- solarStatus JSON data
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
callback | nodeBack |
Node-style callback |
Return solar status information
Kind: global function
Returns: Promise
- solar JSON data
Param | Type | Description |
---|---|---|
options | optionsType |
options object |
callback | nodeBack |
Node-style callback |
Start streaming car data
Kind: global function
Returns: object
- result
Param | Type | Description |
---|---|---|
options | object |
{username, token, vehicle_id, columns[]} |
callback | nodeBack |
Node-style callback |
onDataCb | nodeBack |
Node-style callback |
Node-style callback function
Kind: global typedef
Param | Type | Description |
---|---|---|
error | function |
function which receives the error result |
data | function |
function which receives the data result |
TeslaJS options parameter
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
authToken | string |
Tesla provided OAuth token |
vehicleID | string |
Tesla provided long vehicle id |
[carIndex] | int |
index of vehicle within vehicles JSON |