tesla_api 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/apiary.apib +0 -710
- data/docs/SUMMARY.md +9 -5
- data/docs/api-basics/vehicles.md +2 -0
- data/docs/miscellaneous/README.md +9 -0
- data/docs/miscellaneous/endpoints.md +407 -0
- data/docs/vehicle/commands/README.md +45 -4
- data/docs/vehicle/commands/alerts.md +24 -0
- data/docs/vehicle/commands/charging.md +97 -0
- data/docs/vehicle/commands/climate.md +46 -0
- data/docs/vehicle/commands/doors.md +24 -0
- data/docs/vehicle/commands/media.md +92 -0
- data/docs/vehicle/commands/navigation.md +33 -0
- data/docs/vehicle/commands/remotestart.md +17 -0
- data/docs/vehicle/commands/softwareupdate.md +30 -0
- data/docs/vehicle/commands/speedlimit.md +74 -0
- data/docs/vehicle/commands/sunroof.md +19 -0
- data/docs/vehicle/commands/trunk.md +17 -0
- data/docs/vehicle/commands/valet.md +35 -0
- data/docs/vehicle/commands/wake.md +26 -0
- data/docs/vehicle/optioncodes.md +4 -0
- data/docs/vehicle/state/README.md +5 -1
- data/docs/vehicle/state/chargestate.md +35 -36
- data/docs/vehicle/state/climatestate.md +19 -20
- data/docs/vehicle/state/data.md +122 -108
- data/docs/vehicle/state/drivestate.md +7 -8
- data/docs/vehicle/state/guisettings.md +4 -5
- data/docs/vehicle/state/nearbychargingsites.md +12 -0
- data/docs/vehicle/state/vehiclestate.md +10 -7
- data/lib/tesla_api/vehicle.rb +25 -0
- data/lib/tesla_api/version.rb +1 -1
- data/spec/cassettes/vehicle-cancel_software_update.yml +100 -0
- data/spec/cassettes/vehicle-charge_port_door_close.yml +100 -0
- data/spec/cassettes/vehicle-data.yml +103 -0
- data/spec/cassettes/vehicle-navigation_request.yml +100 -0
- data/spec/cassettes/vehicle-nearby_charging_sites.yml +95 -0
- data/spec/cassettes/vehicle-schedule_software_update.yml +100 -0
- data/spec/lib/tesla_api/vehicle_spec.rb +47 -22
- metadata +18 -13
- data/spec/cassettes/vehicle-sun_roof_control-comfort.yml +0 -130
- data/spec/cassettes/vehicle-sun_roof_control-open.yml +0 -130
- data/spec/cassettes/vehicle-sun_roof_move-0.yml +0 -130
- data/spec/cassettes/vehicle-sun_roof_move-100.yml +0 -130
- data/spec/cassettes/vehicle-sun_roof_move-50.yml +0 -130
@@ -1,3 +1,77 @@
|
|
1
1
|
# Speed Limit
|
2
2
|
|
3
|
+
## POST `/api/1/vehicles/{id}/command/speed_limit_set_limit`
|
3
4
|
|
5
|
+
Sets the maximum speed allowed when Speed Limit Mode is active.
|
6
|
+
|
7
|
+
### Parameters
|
8
|
+
|
9
|
+
| Parameter | Example | Description |
|
10
|
+
| :-------- | :------ | :--------------------------------------------- |
|
11
|
+
| limit_mph | 65 | The speed limit in MPH. Must be between 50-90. |
|
12
|
+
|
13
|
+
### Response
|
14
|
+
|
15
|
+
```json
|
16
|
+
{
|
17
|
+
"reason": "",
|
18
|
+
"result": true
|
19
|
+
}
|
20
|
+
```
|
21
|
+
|
22
|
+
## POST `/api/1/vehicles/{id}/command/speed_limit_activate`
|
23
|
+
|
24
|
+
Activates Speed Limit Mode at the currently set speed.
|
25
|
+
|
26
|
+
### Parameters
|
27
|
+
|
28
|
+
| Parameter | Example | Description |
|
29
|
+
| :-------- | :------ | :--------------------------------------------------------- |
|
30
|
+
| pin | 1234 | The existing PIN, if previously set, or a new 4 digit PIN. |
|
31
|
+
|
32
|
+
### Response
|
33
|
+
|
34
|
+
```json
|
35
|
+
{
|
36
|
+
"reason": "",
|
37
|
+
"result": true
|
38
|
+
}
|
39
|
+
```
|
40
|
+
|
41
|
+
## POST `/api/1/vehicles/{id}/command/speed_limit_deactivate`
|
42
|
+
|
43
|
+
Deactivates Speed Limit Mode if it is currently active.
|
44
|
+
|
45
|
+
### Parameters
|
46
|
+
|
47
|
+
| Parameter | Example | Description |
|
48
|
+
| :-------- | :------ | :------------------------------------------------- |
|
49
|
+
| pin | 1234 | The 4 digit PIN used to activate Speed Limit Mode. |
|
50
|
+
|
51
|
+
### Response
|
52
|
+
|
53
|
+
```json
|
54
|
+
{
|
55
|
+
"reason": "",
|
56
|
+
"result": true
|
57
|
+
}
|
58
|
+
```
|
59
|
+
|
60
|
+
## POST `/api/1/vehicles/{id}/command/speed_limit_clear_pin`
|
61
|
+
|
62
|
+
Clears the currently set PIN for Speed Limit Mode.
|
63
|
+
|
64
|
+
### Parameters
|
65
|
+
|
66
|
+
| Parameter | Example | Description |
|
67
|
+
| :-------- | :------ | :------------------------------------------------- |
|
68
|
+
| pin | 1234 | The 4 digit PIN used to activate Speed Limit Mode. |
|
69
|
+
|
70
|
+
### Response
|
71
|
+
|
72
|
+
```json
|
73
|
+
{
|
74
|
+
"reason": "",
|
75
|
+
"result": true
|
76
|
+
}
|
77
|
+
```
|
@@ -1,3 +1,22 @@
|
|
1
1
|
# Sunroof
|
2
2
|
|
3
|
+
## POST `/api/1/vehicles/{id}/command/sun_roof_control`
|
3
4
|
|
5
|
+
Controls the panoramic sunroof on the Model S.
|
6
|
+
|
7
|
+
Note: There were state options for `open` (100%), `comfort` (~80%), and `move` (combined with a `percent` parameter), but they have since been disabled server side. It is unknown if they will return at a later time.
|
8
|
+
|
9
|
+
### Parameters
|
10
|
+
|
11
|
+
| Parameter | Example | Description |
|
12
|
+
| :-------- | :------ | :---------------------------------------------------------------------------------------- |
|
13
|
+
| state | vent | The amount to open the sunroof. Currently this only allows the values `vent` and `close`. |
|
14
|
+
|
15
|
+
### Response
|
16
|
+
|
17
|
+
```json
|
18
|
+
{
|
19
|
+
"reason": "",
|
20
|
+
"result": true
|
21
|
+
}
|
22
|
+
```
|
@@ -1,3 +1,20 @@
|
|
1
1
|
# Frunk/Trunk
|
2
2
|
|
3
|
+
## POST `/api/1/vehicles/{id}/command/actuate_trunk`
|
3
4
|
|
5
|
+
Opens either the front or rear trunk. On the Model S and X, it will also close the rear trunk.
|
6
|
+
|
7
|
+
### Parameters
|
8
|
+
|
9
|
+
| Parameter | Example | Description |
|
10
|
+
| :---------- | :------ | :------------------------------------------------------------------ |
|
11
|
+
| which_trunk | rear | Which trunk to open/close. `rear` and `front` are the only options. |
|
12
|
+
|
13
|
+
### Response
|
14
|
+
|
15
|
+
```json
|
16
|
+
{
|
17
|
+
"reason": "",
|
18
|
+
"result": true
|
19
|
+
}
|
20
|
+
```
|
@@ -1,3 +1,38 @@
|
|
1
1
|
# Valet Mode
|
2
2
|
|
3
|
+
Valet Mode limits the car's top speed to 70MPH and 80kW of acceleration power. It also disables Homelink, Bluetooth and
|
4
|
+
Wifi settings, and the ability to disable mobile access to the car. It also hides your favorites, home, and work
|
5
|
+
locations in navigation.
|
3
6
|
|
7
|
+
## POST `/api/1/vehicles/{id}/command/set_valet_mode`
|
8
|
+
|
9
|
+
Activates or deactivates Valet Mode.
|
10
|
+
|
11
|
+
### Parameters
|
12
|
+
|
13
|
+
| Parameter | Example | Description |
|
14
|
+
| :-------- | :------ | :-------------------------------------------------------------------------------- |
|
15
|
+
| on | true | true to activate, false to deactivate. Must include previous PIN if deactivating. |
|
16
|
+
| password | 1234 | A PIN to deactivate Valet Mode. Can be blank if activating with a previous PIN. |
|
17
|
+
|
18
|
+
### Response
|
19
|
+
|
20
|
+
```json
|
21
|
+
{
|
22
|
+
"reason": "",
|
23
|
+
"result": true
|
24
|
+
}
|
25
|
+
```
|
26
|
+
|
27
|
+
## POST `/api/1/vehicles/{id}/command/reset_valet_pin`
|
28
|
+
|
29
|
+
Clears the currently set PIN for Valet Mode when deactivated. A new PIN will be required when activating again.
|
30
|
+
|
31
|
+
### Response
|
32
|
+
|
33
|
+
```json
|
34
|
+
{
|
35
|
+
"reason": "",
|
36
|
+
"result": true
|
37
|
+
}
|
38
|
+
```
|
@@ -1,3 +1,29 @@
|
|
1
1
|
# Wake
|
2
2
|
|
3
|
+
## POST `/api/1/vehicles/{id}/wake_up`
|
3
4
|
|
5
|
+
Wakes up the car from a sleeping state.
|
6
|
+
|
7
|
+
### Response
|
8
|
+
|
9
|
+
```json
|
10
|
+
{
|
11
|
+
"response": {
|
12
|
+
"id": 12345678901234567,
|
13
|
+
"user_id": 12345,
|
14
|
+
"vehicle_id": 1234567890,
|
15
|
+
"vin": "5YJSA11111111111",
|
16
|
+
"display_name": "Nikola 2.0",
|
17
|
+
"option_codes": "MDLS,RENA,AF02,APF1,APH2,APPB,AU01,BC0R,BP00,BR00,BS00,CDM0,CH05,PBCW,CW00,DCF0,DRLH,DSH7,DV4W,FG02,FR04,HP00,IDBA,IX01,LP01,ME02,MI01,PF01,PI01,PK00,PS01,PX00,PX4D,QTVB,RFP2,SC01,SP00,SR01,SU01,TM00,TP03,TR00,UTAB,WTAS,X001,X003,X007,X011,X013,X021,X024,X027,X028,X031,X037,X040,X044,YFFC,COUS",
|
18
|
+
"color": null,
|
19
|
+
"tokens": ["abcdef1234567890", "1234567890abcdef"],
|
20
|
+
"state": "online",
|
21
|
+
"in_service": false,
|
22
|
+
"id_s": "12345678901234567",
|
23
|
+
"calendar_enabled": true,
|
24
|
+
"api_version": 4,
|
25
|
+
"backseat_token": null,
|
26
|
+
"backseat_token_updated_at": null
|
27
|
+
}
|
28
|
+
}
|
29
|
+
```
|
data/docs/vehicle/optioncodes.md
CHANGED
@@ -102,6 +102,7 @@ appreciated!_
|
|
102
102
|
| IDOG | Gloss Obeche Wood Decor | |
|
103
103
|
| IDLW | Lacewood Decor | |
|
104
104
|
| IDPB | Piano Black Decor | |
|
105
|
+
| IN3PB | All Black Premium Interior | |
|
105
106
|
| INBBW | White | |
|
106
107
|
| INBFP | Classic Black | |
|
107
108
|
| INBPP | Black | |
|
@@ -130,6 +131,7 @@ appreciated!_
|
|
130
131
|
| MI00 | 2015 Production Refresh | |
|
131
132
|
| MI01 | 2016 Production Refresh | |
|
132
133
|
| MI02 | 2017 Production Refresh | |
|
134
|
+
| MT305 | Mid Range Rear-Wheel Drive | |
|
133
135
|
| PA00 | No Paint Armor | |
|
134
136
|
| PBCW | Catalina White | |
|
135
137
|
| PBSB | Sierra Black | |
|
@@ -152,6 +154,7 @@ appreciated!_
|
|
152
154
|
| PPSR | Signature Red | |
|
153
155
|
| PPSW | Shasta Pearl White Multi-Coat | |
|
154
156
|
| PPTI | Titanium Metallic | |
|
157
|
+
| PRM31 | Premium Interior | |
|
155
158
|
| PS00 | No Parcel Shelf | |
|
156
159
|
| PS01 | Parcel Shelf | |
|
157
160
|
| PX00 | No Performance Plus Package | |
|
@@ -212,6 +215,7 @@ appreciated!_
|
|
212
215
|
| UTAW | Light Headliner | |
|
213
216
|
| UTPB | Dark Headliner | |
|
214
217
|
| UTSB | Dark Headliner | |
|
218
|
+
| W39B | 19" Sport Wheels | |
|
215
219
|
| WT20 | 20" Silver Slipstream Wheels | |
|
216
220
|
| WTAS | 19" Silver Slipstream Wheels | |
|
217
221
|
| WTDS | 19" Grey Slipstream Wheels | |
|
@@ -6,7 +6,7 @@ description: These endpoints give the state of the various subsystems of the car
|
|
6
6
|
|
7
7
|
{% page-ref page="data.md" %}
|
8
8
|
|
9
|
-
A
|
9
|
+
A rollup of all the `data_request` endpoints plus vehicle configuration.
|
10
10
|
|
11
11
|
{% page-ref page="chargestate.md" %}
|
12
12
|
|
@@ -32,3 +32,7 @@ Returns the vehicle's physical state, such as which doors are open.
|
|
32
32
|
|
33
33
|
Lets you know if the Mobile Access setting is enabled in the car.
|
34
34
|
|
35
|
+
{% page-ref page="nearbychargingsites.md" %}
|
36
|
+
|
37
|
+
Returns a list of nearby Tesla-operated charging stations.
|
38
|
+
|
@@ -9,48 +9,47 @@ Information on the state of charge in the battery and its various settings.
|
|
9
9
|
```json
|
10
10
|
{
|
11
11
|
"response": {
|
12
|
-
"
|
13
|
-
"
|
14
|
-
"
|
12
|
+
"battery_heater_on": false,
|
13
|
+
"battery_level": 64,
|
14
|
+
"battery_range": 167.96,
|
15
|
+
"charge_current_request": 48,
|
16
|
+
"charge_current_request_max": 48,
|
17
|
+
"charge_enable_request": true,
|
18
|
+
"charge_energy_added": 12.41,
|
15
19
|
"charge_limit_soc": 90,
|
16
|
-
"charge_limit_soc_std": 90,
|
17
|
-
"charge_limit_soc_min": 50,
|
18
20
|
"charge_limit_soc_max": 100,
|
19
|
-
"
|
20
|
-
"
|
21
|
-
"
|
22
|
-
"
|
23
|
-
"
|
24
|
-
"
|
25
|
-
"battery_level": 90,
|
26
|
-
"usable_battery_level": 90,
|
27
|
-
"charge_energy_added": 17.9,
|
28
|
-
"charge_miles_added_rated": 57.5,
|
29
|
-
"charge_miles_added_ideal": 72.0,
|
30
|
-
"charger_voltage": null,
|
31
|
-
"charger_pilot_current": null,
|
32
|
-
"charger_actual_current": null,
|
33
|
-
"charger_power": null,
|
34
|
-
"time_to_full_charge": 0.0,
|
35
|
-
"trip_charging": null,
|
21
|
+
"charge_limit_soc_min": 50,
|
22
|
+
"charge_limit_soc_std": 90,
|
23
|
+
"charge_miles_added_ideal": 50.0,
|
24
|
+
"charge_miles_added_rated": 40.0,
|
25
|
+
"charge_port_door_open": false,
|
26
|
+
"charge_port_latch": "Engaged",
|
36
27
|
"charge_rate": 0.0,
|
37
|
-
"
|
38
|
-
"
|
39
|
-
"scheduled_charging_start_time": null,
|
40
|
-
"scheduled_charging_pending": false,
|
41
|
-
"user_charge_enable_request": null,
|
42
|
-
"charge_enable_request": true,
|
28
|
+
"charge_to_max_range": false,
|
29
|
+
"charger_actual_current": 0,
|
43
30
|
"charger_phases": null,
|
44
|
-
"
|
45
|
-
"
|
46
|
-
"
|
31
|
+
"charger_pilot_current": 48,
|
32
|
+
"charger_power": 0,
|
33
|
+
"charger_voltage": 0,
|
34
|
+
"charging_state": "Disconnected",
|
35
|
+
"conn_charge_cable": "<invalid>",
|
36
|
+
"est_battery_range": 116.67,
|
37
|
+
"fast_charger_brand": "<invalid>",
|
38
|
+
"fast_charger_present": false,
|
39
|
+
"fast_charger_type": "<invalid>",
|
40
|
+
"ideal_battery_range": 209.95,
|
47
41
|
"managed_charging_active": false,
|
48
|
-
"managed_charging_user_canceled": false,
|
49
42
|
"managed_charging_start_time": null,
|
50
|
-
"
|
51
|
-
"
|
52
|
-
"
|
43
|
+
"managed_charging_user_canceled": false,
|
44
|
+
"max_range_charge_counter": 0,
|
45
|
+
"not_enough_power_to_heat": false,
|
46
|
+
"scheduled_charging_pending": false,
|
47
|
+
"scheduled_charging_start_time": null,
|
48
|
+
"time_to_full_charge": 0.0,
|
49
|
+
"timestamp": 1543187621530,
|
50
|
+
"trip_charging": false,
|
51
|
+
"usable_battery_level": 64,
|
52
|
+
"user_charge_enable_request": null
|
53
53
|
}
|
54
54
|
}
|
55
55
|
```
|
56
|
-
|
@@ -9,35 +9,34 @@ Information on the current internal temperature and climate control system.
|
|
9
9
|
```json
|
10
10
|
{
|
11
11
|
"response": {
|
12
|
-
"
|
13
|
-
"
|
14
|
-
"driver_temp_setting":
|
15
|
-
"passenger_temp_setting": 22.2,
|
16
|
-
"left_temp_direction": null,
|
17
|
-
"right_temp_direction": null,
|
18
|
-
"is_front_defroster_on": false,
|
19
|
-
"is_rear_defroster_on": false,
|
12
|
+
"battery_heater": false,
|
13
|
+
"battery_heater_no_power": false,
|
14
|
+
"driver_temp_setting": 21.6,
|
20
15
|
"fan_status": 0,
|
16
|
+
"inside_temp": null,
|
17
|
+
"is_auto_conditioning_on": null,
|
21
18
|
"is_climate_on": false,
|
22
|
-
"
|
19
|
+
"is_front_defroster_on": false,
|
20
|
+
"is_preconditioning": false,
|
21
|
+
"is_rear_defroster_on": false,
|
22
|
+
"left_temp_direction": null,
|
23
23
|
"max_avail_temp": 28.0,
|
24
|
+
"min_avail_temp": 15.0,
|
25
|
+
"outside_temp": null,
|
26
|
+
"passenger_temp_setting": 21.6,
|
27
|
+
"right_temp_direction": null,
|
24
28
|
"seat_heater_left": false,
|
25
|
-
"
|
29
|
+
"seat_heater_rear_center": false,
|
26
30
|
"seat_heater_rear_left": false,
|
31
|
+
"seat_heater_rear_left_back": 0,
|
27
32
|
"seat_heater_rear_right": false,
|
28
|
-
"seat_heater_rear_center": false,
|
29
33
|
"seat_heater_rear_right_back": 0,
|
30
|
-
"
|
31
|
-
"battery_heater": false,
|
32
|
-
"battery_heater_no_power": null,
|
33
|
-
"steering_wheel_heater": false,
|
34
|
-
"wiper_blade_heater": false,
|
34
|
+
"seat_heater_right": false,
|
35
35
|
"side_mirror_heaters": false,
|
36
|
-
"is_preconditioning": false,
|
37
36
|
"smart_preconditioning": false,
|
38
|
-
"
|
39
|
-
"timestamp":
|
37
|
+
"steering_wheel_heater": false,
|
38
|
+
"timestamp": 1543187641727,
|
39
|
+
"wiper_blade_heater": false
|
40
40
|
}
|
41
41
|
}
|
42
42
|
```
|
43
|
-
|
data/docs/vehicle/state/data.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# Data
|
2
2
|
|
3
|
-
## GET `/api/1/vehicles/{id}/
|
3
|
+
## GET `/api/1/vehicles/{id}/vehicle_data`
|
4
4
|
|
5
|
-
A
|
5
|
+
A rollup of all the `data_request` endpoints plus vehicle configuration.
|
6
6
|
|
7
7
|
### Response
|
8
8
|
|
@@ -21,109 +21,119 @@ A cached rollup of all the `data_request` endpoints plus vehicle configuration.
|
|
21
21
|
"in_service": false,
|
22
22
|
"id_s": "12345678901234567",
|
23
23
|
"calendar_enabled": true,
|
24
|
+
"api_version": 4,
|
24
25
|
"backseat_token": null,
|
25
26
|
"backseat_token_updated_at": null,
|
26
|
-
"
|
27
|
-
"
|
28
|
-
"
|
29
|
-
"
|
30
|
-
"
|
31
|
-
"
|
32
|
-
"
|
27
|
+
"drive_state": {
|
28
|
+
"gps_as_of": 1538363883,
|
29
|
+
"heading": 5,
|
30
|
+
"latitude": 33.111111,
|
31
|
+
"longitude": -88.111111,
|
32
|
+
"native_latitude": 33.111111,
|
33
|
+
"native_location_supported": 1,
|
34
|
+
"native_longitude": -88.111111,
|
35
|
+
"native_type": "wgs",
|
36
|
+
"power": 0,
|
37
|
+
"shift_state": null,
|
38
|
+
"speed": null,
|
39
|
+
"timestamp": 1538364666096
|
33
40
|
},
|
34
|
-
"
|
35
|
-
"
|
36
|
-
"
|
37
|
-
"
|
38
|
-
"
|
39
|
-
"
|
40
|
-
"
|
41
|
-
"
|
42
|
-
"
|
43
|
-
"
|
44
|
-
"
|
45
|
-
"
|
46
|
-
"
|
47
|
-
"
|
48
|
-
"
|
49
|
-
"
|
50
|
-
"
|
51
|
-
"
|
52
|
-
"
|
53
|
-
"
|
54
|
-
"
|
55
|
-
"
|
41
|
+
"climate_state": {
|
42
|
+
"battery_heater": false,
|
43
|
+
"battery_heater_no_power": false,
|
44
|
+
"driver_temp_setting": 21.6,
|
45
|
+
"fan_status": 0,
|
46
|
+
"inside_temp": null,
|
47
|
+
"is_auto_conditioning_on": null,
|
48
|
+
"is_climate_on": false,
|
49
|
+
"is_front_defroster_on": false,
|
50
|
+
"is_preconditioning": false,
|
51
|
+
"is_rear_defroster_on": false,
|
52
|
+
"left_temp_direction": null,
|
53
|
+
"max_avail_temp": 28.0,
|
54
|
+
"min_avail_temp": 15.0,
|
55
|
+
"outside_temp": null,
|
56
|
+
"passenger_temp_setting": 21.6,
|
57
|
+
"right_temp_direction": null,
|
58
|
+
"seat_heater_left": false,
|
59
|
+
"seat_heater_rear_center": false,
|
60
|
+
"seat_heater_rear_left": false,
|
61
|
+
"seat_heater_rear_left_back": 0,
|
62
|
+
"seat_heater_rear_right": false,
|
63
|
+
"seat_heater_rear_right_back": 0,
|
64
|
+
"seat_heater_right": false,
|
65
|
+
"side_mirror_heaters": false,
|
66
|
+
"smart_preconditioning": false,
|
67
|
+
"steering_wheel_heater": false,
|
68
|
+
"timestamp": 1543186971731,
|
69
|
+
"wiper_blade_heater": false
|
56
70
|
},
|
57
71
|
"charge_state": {
|
58
|
-
"
|
59
|
-
"
|
60
|
-
"
|
72
|
+
"battery_heater_on": false,
|
73
|
+
"battery_level": 64,
|
74
|
+
"battery_range": 167.96,
|
75
|
+
"charge_current_request": 48,
|
76
|
+
"charge_current_request_max": 48,
|
77
|
+
"charge_enable_request": true,
|
78
|
+
"charge_energy_added": 12.41,
|
61
79
|
"charge_limit_soc": 90,
|
62
|
-
"charge_limit_soc_std": 90,
|
63
|
-
"charge_limit_soc_min": 50,
|
64
80
|
"charge_limit_soc_max": 100,
|
81
|
+
"charge_limit_soc_min": 50,
|
82
|
+
"charge_limit_soc_std": 90,
|
83
|
+
"charge_miles_added_ideal": 50.0,
|
84
|
+
"charge_miles_added_rated": 40.0,
|
85
|
+
"charge_port_door_open": false,
|
86
|
+
"charge_port_latch": "Engaged",
|
87
|
+
"charge_rate": 0.0,
|
65
88
|
"charge_to_max_range": false,
|
66
|
-
"max_range_charge_counter": 0,
|
67
|
-
"fast_charger_present": false,
|
68
|
-
"battery_range": 232.27,
|
69
|
-
"est_battery_range": 215.07,
|
70
|
-
"ideal_battery_range": 290.34,
|
71
|
-
"battery_level": 90,
|
72
|
-
"usable_battery_level": 90,
|
73
|
-
"charge_energy_added": 17.9,
|
74
|
-
"charge_miles_added_rated": 57.5,
|
75
|
-
"charge_miles_added_ideal": 72.0,
|
76
|
-
"charger_voltage": 0,
|
77
|
-
"charger_pilot_current": 40,
|
78
89
|
"charger_actual_current": 0,
|
79
|
-
"charger_power": 0,
|
80
|
-
"time_to_full_charge": 0.0,
|
81
|
-
"trip_charging": false,
|
82
|
-
"charge_rate": 0.0,
|
83
|
-
"charge_port_door_open": true,
|
84
|
-
"conn_charge_cable": "SAE",
|
85
|
-
"scheduled_charging_start_time": null,
|
86
|
-
"scheduled_charging_pending": false,
|
87
|
-
"user_charge_enable_request": null,
|
88
|
-
"charge_enable_request": true,
|
89
90
|
"charger_phases": null,
|
90
|
-
"
|
91
|
-
"
|
92
|
-
"
|
91
|
+
"charger_pilot_current": 48,
|
92
|
+
"charger_power": 0,
|
93
|
+
"charger_voltage": 0,
|
94
|
+
"charging_state": "Disconnected",
|
95
|
+
"conn_charge_cable": "<invalid>",
|
96
|
+
"est_battery_range": 118.38,
|
97
|
+
"fast_charger_brand": "<invalid>",
|
98
|
+
"fast_charger_present": false,
|
99
|
+
"fast_charger_type": "<invalid>",
|
100
|
+
"ideal_battery_range": 209.95,
|
93
101
|
"managed_charging_active": false,
|
94
|
-
"managed_charging_user_canceled": false,
|
95
102
|
"managed_charging_start_time": null,
|
96
|
-
"
|
103
|
+
"managed_charging_user_canceled": false,
|
104
|
+
"max_range_charge_counter": 0,
|
97
105
|
"not_enough_power_to_heat": false,
|
98
|
-
"
|
106
|
+
"scheduled_charging_pending": false,
|
107
|
+
"scheduled_charging_start_time": null,
|
108
|
+
"time_to_full_charge": 0.0,
|
109
|
+
"timestamp": 1543186971727,
|
110
|
+
"trip_charging": false,
|
111
|
+
"usable_battery_level": 64,
|
112
|
+
"user_charge_enable_request": null
|
99
113
|
},
|
100
|
-
"
|
101
|
-
"
|
102
|
-
"
|
103
|
-
"
|
104
|
-
"
|
105
|
-
"
|
106
|
-
"
|
107
|
-
"gps_as_of": 1538363883,
|
108
|
-
"native_location_supported": 1,
|
109
|
-
"native_latitude": 33.111111,
|
110
|
-
"native_longitude": -88.111111,
|
111
|
-
"native_type": "wgs",
|
112
|
-
"timestamp": 1538364666096
|
114
|
+
"gui_settings": {
|
115
|
+
"gui_24_hour_time": false,
|
116
|
+
"gui_charge_rate_units": "mi/hr",
|
117
|
+
"gui_distance_units": "mi/hr",
|
118
|
+
"gui_range_display": "Rated",
|
119
|
+
"gui_temperature_units": "F",
|
120
|
+
"timestamp": 1543186971728
|
113
121
|
},
|
114
122
|
"vehicle_state": {
|
115
|
-
"api_version":
|
123
|
+
"api_version": 4,
|
116
124
|
"autopark_state_v2": "standby",
|
117
125
|
"autopark_style": "standard",
|
118
126
|
"calendar_supported": true,
|
119
|
-
"car_version": "2018.
|
127
|
+
"car_version": "2018.42.2 19e7e44",
|
120
128
|
"center_display_state": 0,
|
121
129
|
"df": 0,
|
122
130
|
"dr": 0,
|
123
131
|
"ft": 0,
|
124
132
|
"homelink_nearby": true,
|
133
|
+
"is_user_present": false,
|
125
134
|
"last_autopark_error": "no_error",
|
126
135
|
"locked": true,
|
136
|
+
"media_state": { "remote_control_enabled": true },
|
127
137
|
"notifications_supported": true,
|
128
138
|
"odometer": 33561.422505,
|
129
139
|
"parsed_calendar_supported": true,
|
@@ -132,6 +142,7 @@ A cached rollup of all the `data_request` endpoints plus vehicle configuration.
|
|
132
142
|
"remote_start": false,
|
133
143
|
"remote_start_supported": true,
|
134
144
|
"rt": 0,
|
145
|
+
"software_update": { "expected_duration_sec": 2700, "status": "" },
|
135
146
|
"speed_limit_mode": {
|
136
147
|
"active": false,
|
137
148
|
"current_limit_mph": 75.0,
|
@@ -143,39 +154,42 @@ A cached rollup of all the `data_request` endpoints plus vehicle configuration.
|
|
143
154
|
"sun_roof_state": "unknown",
|
144
155
|
"timestamp": 1538364666096,
|
145
156
|
"valet_mode": false,
|
157
|
+
"valet_pin_needed": true,
|
146
158
|
"vehicle_name": "Nikola 2.0"
|
147
159
|
},
|
148
|
-
"
|
149
|
-
"
|
150
|
-
"
|
151
|
-
"
|
152
|
-
"
|
153
|
-
"
|
154
|
-
"
|
155
|
-
"
|
156
|
-
"
|
157
|
-
"
|
158
|
-
"
|
159
|
-
"
|
160
|
-
"
|
161
|
-
"
|
162
|
-
"
|
163
|
-
"
|
164
|
-
"
|
165
|
-
"
|
166
|
-
"
|
167
|
-
"
|
168
|
-
"
|
169
|
-
"
|
170
|
-
"
|
171
|
-
"
|
172
|
-
"side_mirror_heaters": false,
|
173
|
-
"is_preconditioning": false,
|
174
|
-
"smart_preconditioning": false,
|
175
|
-
"is_auto_conditioning_on": null,
|
176
|
-
"timestamp": 1538364666097
|
160
|
+
"vehicle_config": {
|
161
|
+
"can_accept_navigation_requests": true,
|
162
|
+
"can_actuate_trunks": true,
|
163
|
+
"car_special_type": "base",
|
164
|
+
"car_type": "models2",
|
165
|
+
"charge_port_type": "US",
|
166
|
+
"eu_vehicle": false,
|
167
|
+
"exterior_color": "White",
|
168
|
+
"has_air_suspension": true,
|
169
|
+
"has_ludicrous_mode": false,
|
170
|
+
"motorized_charge_port": true,
|
171
|
+
"perf_config": "P2",
|
172
|
+
"plg": true,
|
173
|
+
"rear_seat_heaters": 0,
|
174
|
+
"rear_seat_type": 0,
|
175
|
+
"rhd": false,
|
176
|
+
"roof_color": "None",
|
177
|
+
"seat_type": 2,
|
178
|
+
"spoiler_type": "None",
|
179
|
+
"sun_roof_installed": 2,
|
180
|
+
"third_row_seats": "None",
|
181
|
+
"timestamp": 1538364666096,
|
182
|
+
"trim_badging": "p90d",
|
183
|
+
"wheel_type": "AeroTurbine19"
|
177
184
|
}
|
178
185
|
}
|
179
186
|
}
|
180
187
|
```
|
181
188
|
|
189
|
+
## GET `/api/1/vehicles/{id}/data`
|
190
|
+
|
191
|
+
A "legacy" version of the data endpoint.
|
192
|
+
|
193
|
+
### Response
|
194
|
+
|
195
|
+
Currently, this has the exact same response structure as the newer vehicle_data endpoint.
|