tesla_api 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitbook.yml +4 -0
- data/.travis.yml +3 -4
- data/LICENSE +1 -1
- data/README.md +7 -3
- data/Rakefile +27 -1
- data/apiary.apib +21 -14
- data/docs/README.md +26 -0
- data/docs/SUMMARY.md +39 -0
- data/docs/api-basics/authentication.md +40 -0
- data/docs/api-basics/vehicles.md +77 -0
- data/docs/vehicle/autopark.md +4 -0
- data/docs/vehicle/commands/README.md +22 -0
- data/docs/vehicle/commands/alerts.md +5 -0
- data/docs/vehicle/commands/calendar.md +3 -0
- data/docs/vehicle/commands/charging.md +3 -0
- data/docs/vehicle/commands/climate.md +3 -0
- data/docs/vehicle/commands/doors.md +3 -0
- data/docs/vehicle/commands/media.md +3 -0
- data/docs/vehicle/commands/navigation.md +3 -0
- data/docs/vehicle/commands/remotestart.md +3 -0
- data/docs/vehicle/commands/softwareupdate.md +3 -0
- data/docs/vehicle/commands/speedlimit.md +3 -0
- data/docs/vehicle/commands/sunroof.md +3 -0
- data/docs/vehicle/commands/trunk.md +3 -0
- data/docs/vehicle/commands/valet.md +3 -0
- data/docs/vehicle/commands/wake.md +3 -0
- data/docs/vehicle/optioncodes.md +253 -0
- data/docs/vehicle/state/README.md +34 -0
- data/docs/vehicle/state/chargestate.md +56 -0
- data/docs/vehicle/state/climatestate.md +43 -0
- data/docs/vehicle/state/data.md +181 -0
- data/docs/vehicle/state/drivestate.md +27 -0
- data/docs/vehicle/state/guisettings.md +21 -0
- data/docs/vehicle/state/mobileenabled.md +14 -0
- data/docs/vehicle/state/vehiclestate.md +47 -0
- data/docs/vehicle/streaming.md +4 -0
- data/lib/tesla_api.rb +7 -6
- data/lib/tesla_api/autopark.rb +62 -0
- data/lib/tesla_api/client.rb +32 -11
- data/lib/tesla_api/stream.rb +11 -7
- data/lib/tesla_api/vehicle.rb +50 -30
- data/lib/tesla_api/version.rb +1 -1
- data/spec/cassettes/client-login.yml +1 -1
- data/spec/cassettes/vehicle-activate_speed_limit.yml +95 -0
- data/spec/cassettes/vehicle-clear_speed_limit_pin.yml +95 -0
- data/spec/cassettes/vehicle-deactivate_speed_limit.yml +95 -0
- data/spec/cassettes/vehicle-open_frunk.yml +40 -73
- data/spec/cassettes/vehicle-open_trunk.yml +40 -73
- data/spec/cassettes/vehicle-set_speed_limit.yml +95 -0
- data/spec/lib/tesla_api/client_spec.rb +42 -15
- data/spec/lib/tesla_api/vehicle_spec.rb +160 -136
- data/spec/spec_helper.rb +6 -18
- data/tesla_api.gemspec +20 -24
- metadata +67 -42
- data/circle.yml +0 -10
@@ -0,0 +1,253 @@
|
|
1
|
+
|
2
|
+
# Option Codes
|
3
|
+
|
4
|
+
The `option_codes` field of a vehicle is a comma-delimited set of codes that
|
5
|
+
represent various options the car was built with. This can include trim options,
|
6
|
+
battery sizes, color, wheel types, and addon packages.
|
7
|
+
|
8
|
+
_This list needs a lot of help! If you know of what any of these mean, please
|
9
|
+
edit this page and submit a_
|
10
|
+
[_pull request_](https://github.com/timdorr/tesla-api/pulls)_. It is much
|
11
|
+
appreciated!_
|
12
|
+
|
13
|
+
| Code | Title | Description |
|
14
|
+
| :--- | :--- | :--- |
|
15
|
+
| MDLS | Model S | This vehicle is a Model S |
|
16
|
+
| MDLX | Model X | This vehicle is a Model X |
|
17
|
+
| MDL3 | Model 3 | This vehicle is a Model 3 |
|
18
|
+
| RENA | Region: North America | |
|
19
|
+
| RENC | Region: Canada | |
|
20
|
+
| REEU | Region: Europe | |
|
21
|
+
| AD02 | NEMA 14-50 | |
|
22
|
+
| AD04 | European 3-Phase | |
|
23
|
+
| AD05 | European 3-Phase, IT | |
|
24
|
+
| AD06 | Schuko (1 phase, 230V 13A) | |
|
25
|
+
| AD07 | Red IEC309 (3 phase, 400V 16A) | |
|
26
|
+
| ADPX2 | Type 2 Public Charging Connector | |
|
27
|
+
| ADX8 | Blue IEC309 (1 phase, 230V 32A) | |
|
28
|
+
| AF00 | No HEPA Filter | |
|
29
|
+
| AF02 | HEPA Filter | |
|
30
|
+
| AH00 | No Accessory Hitch | |
|
31
|
+
| APE1 | Enhanced Autopilot | |
|
32
|
+
| APF0 | Autopilot Firmware 2.0 Base | |
|
33
|
+
| APF1 | Autopilot Firmware 2.0 Enhanced | |
|
34
|
+
| APF2 | Full Self-Driving Capability | |
|
35
|
+
| APH0 | Autopilot 2.0 Hardware | |
|
36
|
+
| APH2 | Autopilot 2.0 Hardware | |
|
37
|
+
| APH3 | Autopilot 2.5 Hardware | |
|
38
|
+
| APPA | Autopilot 1.0 Hardware | |
|
39
|
+
| APPB | Enhanced Autopilot | |
|
40
|
+
| AU00 | No Audio Package | |
|
41
|
+
| AU01 | Ultra High Fidelity Sound | |
|
42
|
+
| BC0R | Tesla Red Brake Calipers | |
|
43
|
+
| BCMB | Black Brake Calipers | |
|
44
|
+
| BP00 | No Ludicrous | |
|
45
|
+
| BP01 | Ludicrous Speed Upgrade | |
|
46
|
+
| BR00 | No Battery Firmware Limit | |
|
47
|
+
| BR03 | Battery Firmware Limit (60kWh) | |
|
48
|
+
| BR05 | Battery Firmware Limit (75kWh) | |
|
49
|
+
| BS00 | General Production Flag | |
|
50
|
+
| BS01 | Special Production Flag | |
|
51
|
+
| BT37 | 75 kWh (Model 3) | |
|
52
|
+
| BT40 | 40 kWh | |
|
53
|
+
| BT60 | 60 kWh | |
|
54
|
+
| BT70 | 70 kWh | |
|
55
|
+
| BT85 | 85 kWh | |
|
56
|
+
| BTX4 | 90 kWh | |
|
57
|
+
| BTX5 | 75 kWh | |
|
58
|
+
| BTX6 | 100 kWh | |
|
59
|
+
| BTX7 | 75 kWh | |
|
60
|
+
| BTX8 | 85 kWh | |
|
61
|
+
| CC04 | Seven Seat Interior | |
|
62
|
+
| CDM0 | No CHAdeMO Charging Adaptor | |
|
63
|
+
| CH00 | Standard Charger (40 Amp) | |
|
64
|
+
| CH01 | Dual Chargers (80 Amp) | |
|
65
|
+
| CH04 | 72 Amp Charger (Model S/X) | |
|
66
|
+
| CH05 | 48 Amp Charger (Model S/X) | |
|
67
|
+
| CH07 | 48 Amp Charger (Model 3) | |
|
68
|
+
| COL0 | Signature | |
|
69
|
+
| COL1 | Solid | |
|
70
|
+
| COL2 | Metallic | |
|
71
|
+
| COL3 | Tesla Multi-Coat | |
|
72
|
+
| COUS | Country: United States | |
|
73
|
+
| CW00 | No Cold Weather Package | |
|
74
|
+
| CW02 | Subzero Weather Package | |
|
75
|
+
| DA00 | No Autopilot | |
|
76
|
+
| DA01 | Active Safety (ACC,LDW,SA) | |
|
77
|
+
| DA02 | Autopilot Convenience Features | |
|
78
|
+
| DCF0 | Autopilot Convenience Features (DCF0) | |
|
79
|
+
| DRLH | Left Hand Drive | |
|
80
|
+
| DRRH | Right Hand Drive | |
|
81
|
+
| DSH5 | PUR Dash Pad | |
|
82
|
+
| DSH7 | Alcantara Dashboard Accents | |
|
83
|
+
| DU00 | Drive Unit - IR | |
|
84
|
+
| DU01 | Drive Unit - Infineon | |
|
85
|
+
| DV2W | Rear-Wheel Drive | |
|
86
|
+
| DV4W | All-Wheel Drive | |
|
87
|
+
| FG00 | No Exterior Lighting Package | |
|
88
|
+
| FG01 | Exterior Lighting Package | |
|
89
|
+
| FG02 | Exterior Lighting Package | |
|
90
|
+
| FMP6 | FMP6 | |
|
91
|
+
| FR01 | Base Front Row | |
|
92
|
+
| FR03 | FR03 | |
|
93
|
+
| FR04 | FR04 | |
|
94
|
+
| HC00 | No Home Charging installation | |
|
95
|
+
| HC01 | Home Charging Installation | |
|
96
|
+
| HP00 | No HPWC Ordered | |
|
97
|
+
| HP01 | HPWC Ordered | |
|
98
|
+
| IDBA | Dark Ash Wood Decor | |
|
99
|
+
| IDBO | Figured Ash Wood Decor | |
|
100
|
+
| IDCF | Carbon Fiber Decor | |
|
101
|
+
| IDOM | Matte Obeche Wood Decor | |
|
102
|
+
| IDOG | Gloss Obeche Wood Decor | |
|
103
|
+
| IDLW | Lacewood Decor | |
|
104
|
+
| IDPB | Piano Black Decor | |
|
105
|
+
| INBBW | White | |
|
106
|
+
| INBFP | Classic Black | |
|
107
|
+
| INBPP | Black | |
|
108
|
+
| INBTB | Multi-Pattern Black | |
|
109
|
+
| INLPC | Cream | |
|
110
|
+
| INLPP | Black / Light Headliner | |
|
111
|
+
| INWPT | Tan Interior | |
|
112
|
+
| IVBPP | All Black Interior | |
|
113
|
+
| IVBSW | Ultra White Interior | |
|
114
|
+
| IVBTB | All Black Interior | |
|
115
|
+
| IVLPC | Vegan Cream | |
|
116
|
+
| IX00 | No Extended Nappa Leather Trim | |
|
117
|
+
| IX01 | Extended Nappa Leather Trim | |
|
118
|
+
| LLP1 | LLP1 | |
|
119
|
+
| LP01 | Premium Interior Lighting | |
|
120
|
+
| LT00 | Vegan interior | |
|
121
|
+
| LT01 | Standard interior | |
|
122
|
+
| LT1B | LT1B | |
|
123
|
+
| LT3W | LT3W | |
|
124
|
+
| LT4B | LT4B | |
|
125
|
+
| LT4C | LT4C | |
|
126
|
+
| LT4W | LT4W | |
|
127
|
+
| LT5C | LT5C | |
|
128
|
+
| LT5P | LT5P | |
|
129
|
+
| ME02 | Memory Seats | |
|
130
|
+
| MI00 | 2015 Production Refresh | |
|
131
|
+
| MI01 | 2016 Production Refresh | |
|
132
|
+
| MI02 | 2017 Production Refresh | |
|
133
|
+
| PA00 | No Paint Armor | |
|
134
|
+
| PBCW | Catalina White | |
|
135
|
+
| PBSB | Sierra Black | |
|
136
|
+
| PBT8 | Performance 85kWh | |
|
137
|
+
| PF00 | No Performance Legacy Package | |
|
138
|
+
| PF01 | Performance Legacy Package | |
|
139
|
+
| PI00 | No Premium Interior | |
|
140
|
+
| PI01 | Premium Upgrades Package | |
|
141
|
+
| PK00 | LEGACY No Parking Sensors | |
|
142
|
+
| PMAB | Anza Brown Metallic | |
|
143
|
+
| PMBL | Obsidian Black Multi-Coat | |
|
144
|
+
| PMMB | Monterey Blue Metallic | |
|
145
|
+
| PMMR | Multi-Coat Red | |
|
146
|
+
| PMNG | Midnight Silver Metallic | |
|
147
|
+
| PMSG | Sequoia Green Metallic | |
|
148
|
+
| PMSS | San Simeon Silver Metallic | |
|
149
|
+
| PMTG | Dolphin Grey Metallic | |
|
150
|
+
| PPMR | Muir Red Multi-Coat | |
|
151
|
+
| PPSB | Deep Blue Metallic | |
|
152
|
+
| PPSR | Signature Red | |
|
153
|
+
| PPSW | Shasta Pearl White Multi-Coat | |
|
154
|
+
| PPTI | Titanium Metallic | |
|
155
|
+
| PS00 | No Parcel Shelf | |
|
156
|
+
| PS01 | Parcel Shelf | |
|
157
|
+
| PX00 | No Performance Plus Package | |
|
158
|
+
| PX01 | Performance Plus | |
|
159
|
+
| PX6D | Zero to 60 in 2.5 sec | |
|
160
|
+
| P85D | P85D | |
|
161
|
+
| QNET | Tan NextGen | |
|
162
|
+
| QPMP | Black seats | |
|
163
|
+
| QTBW | White Premium Seats | |
|
164
|
+
| QTPC | Cream Premium Seats | |
|
165
|
+
| QTPP | Black Premium Seats | |
|
166
|
+
| QTPT | Tan Premium Seats | |
|
167
|
+
| QTTB | Multi-Pattern Black Seats | |
|
168
|
+
| QVBM | Multi-Pattern Black Seats | |
|
169
|
+
| QVPC | Vegan Cream Seats | |
|
170
|
+
| QVPP | Vegan Cream Seats | |
|
171
|
+
| QVSW | White Tesla Seats | |
|
172
|
+
| RCX0 | No Rear Console | |
|
173
|
+
| RF3G | Model 3 Glass Roof | |
|
174
|
+
| RFBK | Black Roof | |
|
175
|
+
| RFBC | Body Color Roof | |
|
176
|
+
| RFFG | Glass Roof | |
|
177
|
+
| RFP0 | All Glass Panoramic Roof | |
|
178
|
+
| RFP2 | Sunroof | |
|
179
|
+
| RFPX | Model X Roof | |
|
180
|
+
| S02P | S02P | |
|
181
|
+
| S31B | S31B | |
|
182
|
+
| S32C | S32C | |
|
183
|
+
| S32P | S32P | |
|
184
|
+
| S32W | S32W | |
|
185
|
+
| SC00 | No Supercharging | |
|
186
|
+
| SC01 | Supercharging Enabled | |
|
187
|
+
| SC04 | Pay Per Use Supercharging | |
|
188
|
+
| SC05 | Free Supercharging | |
|
189
|
+
| SP00 | No Security Package | |
|
190
|
+
| SR01 | Standard 2nd row | |
|
191
|
+
| SR06 | Seven Seat Interior | |
|
192
|
+
| SR07 | Standard 2nd row | |
|
193
|
+
| ST00 | Non-leather Steering Wheel | |
|
194
|
+
| ST01 | Non-heated Leather Steering Wheel | |
|
195
|
+
| SU00 | Standard Suspension | |
|
196
|
+
| SU01 | Smart Air Suspension | |
|
197
|
+
| TIC4 | All-Season Tires | |
|
198
|
+
| TM00 | General Production Trim | |
|
199
|
+
| TM02 | General Production Signature Trim | |
|
200
|
+
| TM0A | ALPHA PRE-PRODUCTION NON-SALEABLE | |
|
201
|
+
| TM0B | BETA PRE-PRODUCTION NON-SALEABLE | |
|
202
|
+
| TM0C | PRE-PRODUCTION SALEABLE | |
|
203
|
+
| TP01 | Tech Package - No Autopilot | |
|
204
|
+
| TP02 | Tech Package with Autopilot | |
|
205
|
+
| TP03 | Tech Package with Enhanced Autopilot | |
|
206
|
+
| TR00 | No Third Row Seat | |
|
207
|
+
| TR01 | Third Row Seating | |
|
208
|
+
| TRA1 | Third Row HVAC | |
|
209
|
+
| TW01 | Towing Package | |
|
210
|
+
| UM01 | Universal Mobile Charger - US Port (Single) | |
|
211
|
+
| UTAB | Black Alcantara Headliner | |
|
212
|
+
| UTAW | Light Headliner | |
|
213
|
+
| UTPB | Dark Headliner | |
|
214
|
+
| UTSB | Dark Headliner | |
|
215
|
+
| WT20 | 20" Silver Slipstream Wheels | |
|
216
|
+
| WTAS | 19" Silver Slipstream Wheels | |
|
217
|
+
| WTDS | 19" Grey Slipstream Wheels | |
|
218
|
+
| WTSG | 21" Turbine Wheels | |
|
219
|
+
| WTSS | 21" Turbine Wheels | |
|
220
|
+
| WTTB | 19" Cyclone Wheels | |
|
221
|
+
| WTW4 | 19" Winter Tire Set | |
|
222
|
+
| WTW5 | 21" Winter Tire Set | |
|
223
|
+
| WTX1 | 19" Michelin Primacy Tire Upgrade | |
|
224
|
+
| WXW4 | No 19" Winter Tire Set | |
|
225
|
+
| WXW5 | No 21" Winter Tire Set | |
|
226
|
+
| X001 | Override: Power Liftgate | |
|
227
|
+
| X003 | Maps & Navigation | |
|
228
|
+
| X004 | Override: No Navigation | |
|
229
|
+
| X007 | Daytime running lights | |
|
230
|
+
| X010 | Base Mirrors | |
|
231
|
+
| X011 | Override: Homelink | |
|
232
|
+
| X012 | Override: No Homelink | |
|
233
|
+
| X013 | Override: Satellite Radio | |
|
234
|
+
| X014 | Override: No Satellite Radio | |
|
235
|
+
| X019 | Carbon Fiber Spoiler | |
|
236
|
+
| X020 | No Performance Exterior | |
|
237
|
+
| X021 | No Spoiler | |
|
238
|
+
| X024 | Performance Package | |
|
239
|
+
| X025 | No Performance Package | |
|
240
|
+
| X027 | Lighted Door Handles | |
|
241
|
+
| X028 | Battery Badge | |
|
242
|
+
| X029 | Remove Battery Badge | |
|
243
|
+
| X030 | Override: No Passive Entry Pkg | |
|
244
|
+
| X031 | Keyless Entry | |
|
245
|
+
| X037 | Powerfolding Mirrors | |
|
246
|
+
| X039 | DAB Radio | |
|
247
|
+
| X040 | No DAB Radio | |
|
248
|
+
| X043 | No Phone Dock Kit | |
|
249
|
+
| X044 | Phone Dock Kit | |
|
250
|
+
| YF00 | No Yacht Floor | |
|
251
|
+
| YF01 | Matching Yacht Floor | |
|
252
|
+
| YFCC | YFCC | |
|
253
|
+
| YFFC | Integrated Center Console | |
|
@@ -0,0 +1,34 @@
|
|
1
|
+
---
|
2
|
+
description: These endpoints give the state of the various subsystems of the car.
|
3
|
+
---
|
4
|
+
|
5
|
+
# State
|
6
|
+
|
7
|
+
{% page-ref page="data.md" %}
|
8
|
+
|
9
|
+
A cached rollup of all the `data_request` endpoints plus vehicle configuration.
|
10
|
+
|
11
|
+
{% page-ref page="chargestate.md" %}
|
12
|
+
|
13
|
+
Information on the state of charge in the battery and its various settings.
|
14
|
+
|
15
|
+
{% page-ref page="climatestate.md" %}
|
16
|
+
|
17
|
+
Information on the current internal temperature and climate control system.
|
18
|
+
|
19
|
+
{% page-ref page="drivestate.md" %}
|
20
|
+
|
21
|
+
Returns the driving and position state of the vehicle.
|
22
|
+
|
23
|
+
{% page-ref page="guisettings.md" %}
|
24
|
+
|
25
|
+
Returns various information about the GUI settings of the car, such as unit format and range display.
|
26
|
+
|
27
|
+
{% page-ref page="vehiclestate.md" %}
|
28
|
+
|
29
|
+
Returns the vehicle's physical state, such as which doors are open.
|
30
|
+
|
31
|
+
{% page-ref page="mobileenabled.md" %}
|
32
|
+
|
33
|
+
Lets you know if the Mobile Access setting is enabled in the car.
|
34
|
+
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# Charge State
|
2
|
+
|
3
|
+
## GET `/api/1/vehicles/{id}/data_request/charge_state`
|
4
|
+
|
5
|
+
Information on the state of charge in the battery and its various settings.
|
6
|
+
|
7
|
+
### Response
|
8
|
+
|
9
|
+
```json
|
10
|
+
{
|
11
|
+
"response": {
|
12
|
+
"charging_state": "Complete",
|
13
|
+
"fast_charger_type": "<invalid>",
|
14
|
+
"fast_charger_brand": "<invalid>",
|
15
|
+
"charge_limit_soc": 90,
|
16
|
+
"charge_limit_soc_std": 90,
|
17
|
+
"charge_limit_soc_min": 50,
|
18
|
+
"charge_limit_soc_max": 100,
|
19
|
+
"charge_to_max_range": false,
|
20
|
+
"max_range_charge_counter": 0,
|
21
|
+
"fast_charger_present": null,
|
22
|
+
"battery_range": 232.27,
|
23
|
+
"est_battery_range": 215.07,
|
24
|
+
"ideal_battery_range": 290.34,
|
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,
|
36
|
+
"charge_rate": 0.0,
|
37
|
+
"charge_port_door_open": null,
|
38
|
+
"conn_charge_cable": "<invalid>",
|
39
|
+
"scheduled_charging_start_time": null,
|
40
|
+
"scheduled_charging_pending": false,
|
41
|
+
"user_charge_enable_request": null,
|
42
|
+
"charge_enable_request": true,
|
43
|
+
"charger_phases": null,
|
44
|
+
"charge_port_latch": "<invalid>",
|
45
|
+
"charge_current_request": 40,
|
46
|
+
"charge_current_request_max": 40,
|
47
|
+
"managed_charging_active": false,
|
48
|
+
"managed_charging_user_canceled": false,
|
49
|
+
"managed_charging_start_time": null,
|
50
|
+
"battery_heater_on": false,
|
51
|
+
"not_enough_power_to_heat": null,
|
52
|
+
"timestamp": 1538365158106
|
53
|
+
}
|
54
|
+
}
|
55
|
+
```
|
56
|
+
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# Climate State
|
2
|
+
|
3
|
+
## GET `/api/1/vehicles/{id}/data_request/climate_state`
|
4
|
+
|
5
|
+
Information on the current internal temperature and climate control system.
|
6
|
+
|
7
|
+
### Response
|
8
|
+
|
9
|
+
```json
|
10
|
+
{
|
11
|
+
"response": {
|
12
|
+
"inside_temp": 30.1,
|
13
|
+
"outside_temp": null,
|
14
|
+
"driver_temp_setting": 22.2,
|
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,
|
20
|
+
"fan_status": 0,
|
21
|
+
"is_climate_on": false,
|
22
|
+
"min_avail_temp": 15.0,
|
23
|
+
"max_avail_temp": 28.0,
|
24
|
+
"seat_heater_left": false,
|
25
|
+
"seat_heater_right": false,
|
26
|
+
"seat_heater_rear_left": false,
|
27
|
+
"seat_heater_rear_right": false,
|
28
|
+
"seat_heater_rear_center": false,
|
29
|
+
"seat_heater_rear_right_back": 0,
|
30
|
+
"seat_heater_rear_left_back": 0,
|
31
|
+
"battery_heater": false,
|
32
|
+
"battery_heater_no_power": null,
|
33
|
+
"steering_wheel_heater": false,
|
34
|
+
"wiper_blade_heater": false,
|
35
|
+
"side_mirror_heaters": false,
|
36
|
+
"is_preconditioning": false,
|
37
|
+
"smart_preconditioning": false,
|
38
|
+
"is_auto_conditioning_on": null,
|
39
|
+
"timestamp": 1538365286085
|
40
|
+
}
|
41
|
+
}
|
42
|
+
```
|
43
|
+
|
@@ -0,0 +1,181 @@
|
|
1
|
+
# Data
|
2
|
+
|
3
|
+
## GET `/api/1/vehicles/{id}/data`
|
4
|
+
|
5
|
+
A cached rollup of all the `data_request` endpoints plus vehicle configuration.
|
6
|
+
|
7
|
+
### Response
|
8
|
+
|
9
|
+
```json
|
10
|
+
{
|
11
|
+
"response": {
|
12
|
+
"id": 12345678901234567,
|
13
|
+
"user_id": 123,
|
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
|
+
"backseat_token": null,
|
25
|
+
"backseat_token_updated_at": null,
|
26
|
+
"gui_settings": {
|
27
|
+
"gui_distance_units": "mi/hr",
|
28
|
+
"gui_temperature_units": "F",
|
29
|
+
"gui_charge_rate_units": "mi/hr",
|
30
|
+
"gui_24_hour_time": false,
|
31
|
+
"gui_range_display": "Rated",
|
32
|
+
"timestamp": 1538364665388
|
33
|
+
},
|
34
|
+
"vehicle_config": {
|
35
|
+
"can_actuate_trunks": true,
|
36
|
+
"car_special_type": "base",
|
37
|
+
"car_type": "models2",
|
38
|
+
"charge_port_type": "US",
|
39
|
+
"eu_vehicle": false,
|
40
|
+
"exterior_color": "White",
|
41
|
+
"has_ludicrous_mode": false,
|
42
|
+
"motorized_charge_port": true,
|
43
|
+
"perf_config": "P2",
|
44
|
+
"plg": true,
|
45
|
+
"rear_seat_heaters": 0,
|
46
|
+
"rear_seat_type": 0,
|
47
|
+
"rhd": false,
|
48
|
+
"roof_color": "None",
|
49
|
+
"seat_type": 2,
|
50
|
+
"spoiler_type": "None",
|
51
|
+
"sun_roof_installed": 2,
|
52
|
+
"third_row_seats": "None",
|
53
|
+
"timestamp": 1538364666096,
|
54
|
+
"trim_badging": "p90d",
|
55
|
+
"wheel_type": "AeroTurbine19"
|
56
|
+
},
|
57
|
+
"charge_state": {
|
58
|
+
"charging_state": "Complete",
|
59
|
+
"fast_charger_type": "<invalid>",
|
60
|
+
"fast_charger_brand": "<invalid>",
|
61
|
+
"charge_limit_soc": 90,
|
62
|
+
"charge_limit_soc_std": 90,
|
63
|
+
"charge_limit_soc_min": 50,
|
64
|
+
"charge_limit_soc_max": 100,
|
65
|
+
"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
|
+
"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
|
+
"charger_phases": null,
|
90
|
+
"charge_port_latch": "Engaged",
|
91
|
+
"charge_current_request": 40,
|
92
|
+
"charge_current_request_max": 40,
|
93
|
+
"managed_charging_active": false,
|
94
|
+
"managed_charging_user_canceled": false,
|
95
|
+
"managed_charging_start_time": null,
|
96
|
+
"battery_heater_on": false,
|
97
|
+
"not_enough_power_to_heat": false,
|
98
|
+
"timestamp": 1538364666097
|
99
|
+
},
|
100
|
+
"drive_state": {
|
101
|
+
"shift_state": null,
|
102
|
+
"speed": null,
|
103
|
+
"power": 0,
|
104
|
+
"latitude": 33.111111,
|
105
|
+
"longitude": -88.111111,
|
106
|
+
"heading": 5,
|
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
|
113
|
+
},
|
114
|
+
"vehicle_state": {
|
115
|
+
"api_version": 3,
|
116
|
+
"autopark_state_v2": "standby",
|
117
|
+
"autopark_style": "standard",
|
118
|
+
"calendar_supported": true,
|
119
|
+
"car_version": "2018.34.1 3dd3072",
|
120
|
+
"center_display_state": 0,
|
121
|
+
"df": 0,
|
122
|
+
"dr": 0,
|
123
|
+
"ft": 0,
|
124
|
+
"homelink_nearby": true,
|
125
|
+
"last_autopark_error": "no_error",
|
126
|
+
"locked": true,
|
127
|
+
"notifications_supported": true,
|
128
|
+
"odometer": 33561.422505,
|
129
|
+
"parsed_calendar_supported": true,
|
130
|
+
"pf": 0,
|
131
|
+
"pr": 0,
|
132
|
+
"remote_start": false,
|
133
|
+
"remote_start_supported": true,
|
134
|
+
"rt": 0,
|
135
|
+
"speed_limit_mode": {
|
136
|
+
"active": false,
|
137
|
+
"current_limit_mph": 75.0,
|
138
|
+
"max_limit_mph": 90,
|
139
|
+
"min_limit_mph": 50,
|
140
|
+
"pin_code_set": false
|
141
|
+
},
|
142
|
+
"sun_roof_percent_open": 0,
|
143
|
+
"sun_roof_state": "unknown",
|
144
|
+
"timestamp": 1538364666096,
|
145
|
+
"valet_mode": false,
|
146
|
+
"vehicle_name": "Nikola 2.0"
|
147
|
+
},
|
148
|
+
"climate_state": {
|
149
|
+
"inside_temp": 30.1,
|
150
|
+
"outside_temp": 27.0,
|
151
|
+
"driver_temp_setting": 22.2,
|
152
|
+
"passenger_temp_setting": 22.2,
|
153
|
+
"left_temp_direction": null,
|
154
|
+
"right_temp_direction": null,
|
155
|
+
"is_front_defroster_on": false,
|
156
|
+
"is_rear_defroster_on": false,
|
157
|
+
"fan_status": 0,
|
158
|
+
"is_climate_on": false,
|
159
|
+
"min_avail_temp": 15.0,
|
160
|
+
"max_avail_temp": 28.0,
|
161
|
+
"seat_heater_left": false,
|
162
|
+
"seat_heater_right": false,
|
163
|
+
"seat_heater_rear_left": false,
|
164
|
+
"seat_heater_rear_right": false,
|
165
|
+
"seat_heater_rear_center": false,
|
166
|
+
"seat_heater_rear_right_back": 0,
|
167
|
+
"seat_heater_rear_left_back": 0,
|
168
|
+
"battery_heater": false,
|
169
|
+
"battery_heater_no_power": false,
|
170
|
+
"steering_wheel_heater": false,
|
171
|
+
"wiper_blade_heater": false,
|
172
|
+
"side_mirror_heaters": false,
|
173
|
+
"is_preconditioning": false,
|
174
|
+
"smart_preconditioning": false,
|
175
|
+
"is_auto_conditioning_on": null,
|
176
|
+
"timestamp": 1538364666097
|
177
|
+
}
|
178
|
+
}
|
179
|
+
}
|
180
|
+
```
|
181
|
+
|