tesla_api 3.0.6 → 3.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3006f2782cd9fae5deaeaeb96bc24316adb52f890ceb7a9222f48cc15e55cf71
4
- data.tar.gz: 108132c98dbb6c7abe62c7437ebafec58238f447238cc2f71da2b8c6eb387f7a
3
+ metadata.gz: 91569b9fd79eae85eb5d719cace95d97c7b52b553af21650fbe0dcc54bfb0587
4
+ data.tar.gz: b4f045ab6be58dd83aea509685168ec9a9d6acbf23971d86602bf2febbb007d9
5
5
  SHA512:
6
- metadata.gz: 2f4ab21d5dd77265da3d0dd10d89a775b75dfd0807495616012a2e25049f7f046ef898d80c4b8f108d9d9f03b0e90205ce566d80f3d7d4c7284eada298e031b5
7
- data.tar.gz: 0ec939e1e12db9103fa76fb4f9fadbcd6cf3c84d17dd2a7480d5d9b42ed91e68cad822953cfe2203fe6fca8424143871bde001d59284edae4342f714cd4788bd
6
+ metadata.gz: 273c9639d6ab5976b544e689dba5884d1449b93d1edd9c15125db5ae43f3a45df14c22333de78cc3cd34b577bff5519345a0b01ad8a4da50d77324ba7c520c10
7
+ data.tar.gz: b706b047d6f1137956c16d6a58cd4c7627b21a4fa5bf9c45148b84ac45e0caa03d18f0885e538dd5b491d67d4b6d7d3e3110fb0139322f9843c265b3079bd89d
@@ -1 +1 @@
1
- ruby 2.6.4
1
+ ruby 2.7.2
@@ -1,8 +1,8 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.6
3
+ - 2.7
4
4
  env:
5
- global:
5
+ global:
6
6
  - TESLA_EMAIL=elon.musk@teslamotors.com
7
7
  - TESLA_PASS=oilLOL
8
8
  - TESLA_CLIENT_ID=1
@@ -1,6 +1,6 @@
1
1
  # Endpoints File
2
2
 
3
- This the latest contents of the ownerapi_endpoints.json file from the 3.10.2 version of the app.
3
+ This the latest contents of the ownerapi_endpoints.json file from the 3.10.8 version of the app.
4
4
 
5
5
  ```json
6
6
  {
@@ -329,10 +329,11 @@ This the latest contents of the ownerapi_endpoints.json file from the 3.10.2 ver
329
329
  "URI": "api/1/vehicles/{vehicle_id}/eligible_upgrades",
330
330
  "AUTH": true
331
331
  },
332
- "UPGRADE_URL": {
332
+ "UPGRADES_PAGE": {
333
333
  "TYPE": "GET",
334
- "URI": "api/1/vehicles/{vehicle_id}/purchase_url",
335
- "AUTH": true
334
+ "URI": "upgrades_page",
335
+ "AUTH": true,
336
+ "CONTENT": "HTML"
336
337
  },
337
338
  "MESSAGE_CENTER_MESSAGE_LIST": {
338
339
  "TYPE": "GET",
@@ -430,6 +431,12 @@ This the latest contents of the ownerapi_endpoints.json file from the 3.10.2 ver
430
431
  "URI": "api/1/energy_sites/{site_id}/site_info",
431
432
  "AUTH": true
432
433
  },
434
+ "ENERGY_SERVICE_SCHEDULING_PAGE": {
435
+ "TYPE": "GET",
436
+ "URI": "energy_service_scheduling_page",
437
+ "AUTH": true,
438
+ "CONTENT": "HTML"
439
+ },
433
440
  "HISTORY_DATA": {
434
441
  "TYPE": "GET",
435
442
  "URI": "api/1/energy_sites/{site_id}/history",
@@ -440,6 +447,16 @@ This the latest contents of the ownerapi_endpoints.json file from the 3.10.2 ver
440
447
  "URI": "api/1/energy_sites/{site_id}/calendar_history",
441
448
  "AUTH": true
442
449
  },
450
+ "SAVINGS_FORECAST": {
451
+ "TYPE": "GET",
452
+ "URI": "api/1/energy_sites/{site_id}/savings_forecast",
453
+ "AUTH": true
454
+ },
455
+ "TARIFF_RATES": {
456
+ "TYPE": "GET",
457
+ "URI": "api/1/energy_sites/{site_id}/tariff_rates",
458
+ "AUTH": true
459
+ },
443
460
  "BACKUP_RESERVE": {
444
461
  "TYPE": "POST",
445
462
  "URI": "api/1/energy_sites/{site_id}/backup",
@@ -44,18 +44,17 @@ return a generic set of codes related to a Model 3.
44
44
  | AF00 | No HEPA Filter | Standard air filter, no air ionizer |
45
45
  | AF02 | HEPA Filter | |
46
46
  | AH00 | No Accessory Hitch | |
47
- | APE1 | Enhanced Autopilot | |
48
- | APF0 | Autopilot Firmware 2.0 Base | |
49
- | APF1 | Autopilot Firmware 2.0 Enhanced | |
50
- | APF2 | Full Self-Driving Capability | |
51
- | APH0 | Autopilot 2.0 Hardware | |
52
- | APH2 | Autopilot 2.0 Hardware | |
47
+ | APB1 | Autopilot with convenience features | Model S |
53
48
  | APBS | Autopilot | Model 3 Autopilot |
54
- | APF2 | Full Self-Driving Capability | |
55
- | APH3 | Autopilot 2.5 Hardware | |
56
- | APH4 | Autopilot 3.0 Hardware | Full Self-Driving Computer |
57
- | APPA | Autopilot 1.0 Hardware | |
58
- | APPB | Enhanced Autopilot | |
49
+ | APF0 | Autopilot Firmware 2.0 Base | |
50
+ | APF1 | Autopilot Firmware 2.0 Enhanced | |
51
+ | APFB | Full Self-Driving Hardware | Car has FSD hardware, but sofware option is not purchased |
52
+ | APF2 | Full Self-Driving Hardware (Activated) | Car has active FSD software purchase |
53
+ | APH1 | Hardware 1.0 | |
54
+ | APH2 | Hardware 2.0 | |
55
+ | APH3 | Hardware 2.5 | |
56
+ | APPF | Full Self-Driving Capability | |
57
+ | APH4 | Hardware 3.0 | |
59
58
  | AU00 | No Audio Package | |
60
59
  | AU01 | Ultra High Fidelity Sound | |
61
60
  | AU3P | Sound Studio Package | Premium audio package |
@@ -65,8 +64,11 @@ return a generic set of codes related to a Model 3.
65
64
  | BCMB | Black Brake Calipers, Mando Brakes | |
66
65
  | BCYR | Performance Brakes | |
67
66
  | BG30 | No Badge | Model 3 |
67
+ | BG31 | AWD Badge | Model 3 |
68
+ | BG32 | Performance AWD Badge | Model 3 |
68
69
  | BP00 | No Ludicrous | |
69
70
  | BP01 | Ludicrous Speed Upgrade | |
71
+ | BP02 | Non-Performance Uncorked Acceleration | |
70
72
  | BR00 | No Battery Firmware Limit | |
71
73
  | BR03 | Battery Firmware Limit (60kWh) | |
72
74
  | BR05 | Battery Firmware Limit (75kWh) | |
@@ -97,16 +99,22 @@ return a generic set of codes related to a Model 3.
97
99
  | COL0 | Signature | |
98
100
  | COL1 | Solid | |
99
101
  | COL2 | Metallic | |
100
- | COL3 | Tesla Multi-Coat | |
102
+ | COL3 | Tesla Multi-Coat | |
103
+ | COBE | Country: Belgium | |
104
+ | CODE | Country: Germany | |
105
+ | COES | Country: Spain | |
106
+ | COFR | Country: France | |
107
+ | CONL | Country: Netherlands | |
101
108
  | COUS | Country: United States | |
102
- | CONL | Country: Netherlands | |
109
+ | CPF0 | Standard Connectivity | |
110
+ | CPF1 | Premium Connectivity | |
103
111
  | CPW1 | 20" Performance Wheels | |
104
112
  | CW00 | Weather Package | No Cold Weather Package |
105
113
  | CW02 | Weather Package | Subzero Weather Package |
106
114
  | DA00 | No Autopilot | |
107
115
  | DA01 | Active Safety (ACC,LDW,SA) | Drivers Assistance Package |
108
116
  | DA02 | Autopilot Convenience Features | |
109
- | DCF0 | Autopilot Convenience Features (DCF0) | |
117
+ | DCF0 | Autopilot Convenience Features | |
110
118
  | DRLH | Left Hand Drive | |
111
119
  | BC3R | Performance Brakes | Model 3 |
112
120
  | DRRH | Right Hand Drive | |
@@ -139,16 +147,19 @@ return a generic set of codes related to a Model 3.
139
147
  | IDBA | Dark Ash Wood Decor | |
140
148
  | IDBO | Figured Ash Wood Decor | |
141
149
  | IDCF | Carbon Fiber Decor | |
150
+ | IDHM | Matte Obeche Wood Decor | |
142
151
  | IDOK | Oak Decor | |
143
152
  | IDOM | Matte Obeche Wood Decor | |
144
153
  | IDOG | Gloss Obeche Wood Decor | |
145
154
  | IDLW | Lacewood Decor | |
146
155
  | IDPB | Piano Black Decor | |
147
156
  | IN3BB | All Black Partial Premium Interior | |
148
- | IN3PB | All Black Premium Interior | |
157
+ | IN3PB | All Black Premium Interior | Model 3 Interior |
158
+ | IN3PW | All White Premium Interior | Model 3 Interior |
149
159
  | INBBW | White | |
150
160
  | INBFP | Classic Black | |
151
161
  | INBPP | Black | |
162
+ | INBPW | White Seats | |
152
163
  | INBTB | Multi-Pattern Black | |
153
164
  | INFBP | Black Premium | |
154
165
  | INLPC | Cream | |
@@ -179,19 +190,22 @@ return a generic set of codes related to a Model 3.
179
190
  | LT6P | LT6P | |
180
191
  | LT6W | White Base Lower Trim | |
181
192
  | LTPB | Lower Trim PUR Black | |
193
+ | LTPW | Lower Trim PUR White | |
182
194
  | ME01 | Memory Seats | |
183
195
  | ME02 | Seat Memory | Seat Memory LHD Driver |
184
196
  | MI00 | 2015 Production Refresh | |
185
- | MI00 | Project/Program Code M3 | Base Manufacturing Intro Code |
186
197
  | MI01 | 2016 Production Refresh | |
187
198
  | MI02 | 2017 Production Refresh | |
188
199
  | MI03 | 201? Production Refresh | Found on Model X ordered 11/2018 delivered 3/2019 |
189
200
  | MR31 | Tech Package - Mirror -YES | Uplevel Mirrors |
190
201
  | MT300 | Standard Range Rear-Wheel Drive | |
191
202
  | MT301 | Standard Range Plus Rear-Wheel Drive | |
203
+ | MT320 | Standard Range Plus Rear-Wheel Drive | Late 2020 Refresh |
192
204
  | MT302 | Long Range Rear-Wheel Drive | |
193
205
  | MT303 | Long Range All-Wheel Drive | |
206
+ | MT315 | Long Range All-Wheel Drive | Late 2020 Refresh |
194
207
  | MT304 | Long Range All-Wheel Drive Performance | |
208
+ | MT317 | Long Range All-Wheel Drive Performance | Late 2020 Refresh |
195
209
  | MT305 | Mid Range Rear-Wheel Drive | |
196
210
  | MTY02 | Long Range Rear-Wheel Drive | |
197
211
  | MTY03 | Long Range All-Wheel Drive | |
@@ -201,7 +215,7 @@ return a generic set of codes related to a Model 3.
201
215
  | PA00 | No Paint Armor | |
202
216
  | PBCW | Solid White Color | |
203
217
  | PBSB | Solid Black Color | |
204
- | PBT8 | Performance 85kWh | |
218
+ | PBT85 | Performance 85kWh | |
205
219
  | PC30 | No Performance Chassis | |
206
220
  | PC31 | Performance Chassis | |
207
221
  | PF00 | No Performance Legacy Package | |
@@ -212,7 +226,6 @@ return a generic set of codes related to a Model 3.
212
226
  | PMAB | Anza Brown Metallic Color | |
213
227
  | PMBL | Obsidian Black Multi-Coat Color | |
214
228
  | PMMB | Monterey Blue Metallic Color | |
215
- | PMMR | Red Multi-Coat Color | |
216
229
  | PMNG | Midnight Silver Metallic Color | |
217
230
  | PMSG | Green Metallic Color| |
218
231
  | PMSS | San Simeon Silver Metallic Color | |
@@ -233,12 +246,14 @@ return a generic set of codes related to a Model 3.
233
246
  | RS3H | Second Row Seat Rear Seats (Heated) | Model 3 |
234
247
  | PX00 | No Performance Plus Package | |
235
248
  | PX01 | Performance Plus | |
249
+ | PX4D | 90 kWh Performance | |
236
250
  | PX6D | Zero to 60 in 2.5 sec | |
237
251
  | P85D | P85D | |
238
252
  | QLBS | Black Premium Interior | |
239
253
  | QLFC | Cream Premium Interior | |
240
254
  | QLFP | Black Premium Interior | |
241
255
  | QLFW | White Premium Interior | |
256
+ | QLPW | White Premium Interior | |
242
257
  | QLWS | White Premium Interior | |
243
258
  | QNET | Tan NextGen | |
244
259
  | QPBT | Black Textile Interior | |
@@ -248,6 +263,7 @@ return a generic set of codes related to a Model 3.
248
263
  | QTFC | Cream Premium Interior | |
249
264
  | QTFP | Black Premium Seats | |
250
265
  | QTFW | White Premium Interior | |
266
+ | QTPB | Black Leather Tesla Premium Seats | |
251
267
  | QTPC | Cream Premium Seats | |
252
268
  | QTPP | Black Premium Seats | |
253
269
  | QTPT | Tan Premium Seats | |
@@ -257,30 +273,37 @@ return a generic set of codes related to a Model 3.
257
273
  | QVPC | Vegan Cream Seats | |
258
274
  | QVPP | Vegan Cream Seats | |
259
275
  | QVSW | White Tesla Seats | |
276
+ | QXMB | Black Leather Seat | |
260
277
  | RCX0 | No Rear Console | |
261
278
  | RCX1 | Rear Console | |
262
279
  | RF3G | Model 3 Glass Roof | |
263
280
  | RFBK | Black Roof | |
264
281
  | RFBC | Body Color Roof | Roof |
265
- | RFFG | Glass Roof | |
266
- | RFP0 | All Glass Panoramic Roof | |
267
- | RFP2 | Sunroof | |
282
+ | RFFG | Glass Roof | 2017 Production Refresh |
283
+ | RFPO | All Glass Panoramic Roof | 2015 Production Refresh |
284
+ | RFP2 | Sunroof | 2016 Production Refresh |
268
285
  | RFPX | Model X Roof | |
286
+ | RSF1 | Rear Heated Seats | |
287
+ | RU00 | No Range Upgrade | |
269
288
  | S01B | Black Textile Seats | |
270
289
  | S02B | Seat | BLK Leather |
271
290
  | S02P | S02P | |
291
+ | S02W | White Seats | |
272
292
  | S07W | White Seats | |
273
293
  | S31B | S31B | |
274
294
  | S32C | S32C | |
275
295
  | S32P | S32P | |
276
296
  | S32W | S32W | |
277
297
  | S3PB | Seat Black PUR Premium Seats | |
298
+ | S3PW | Seat White PUR Premium Seats | |
299
+ | SA3P | Seat Adjustment - Power | Model 3 |
278
300
  | SC00 | No Supercharging | |
279
301
  | SC01 | Supercharging Enabled | |
280
302
  | SC04 | Pay Per Use Supercharging | |
281
303
  | SC05 | Free Supercharging | |
282
304
  | SLR0 | No Rear Spoiler | |
283
305
  | SP00 | No Security Package | |
306
+ | SP01 | Security Package | |
284
307
  | SR01 | Standard 2nd row | Second Row Seat |
285
308
  | SR06 | Seven Seat Interior | |
286
309
  | SR07 | Standard 2nd row | |
@@ -292,7 +315,7 @@ return a generic set of codes related to a Model 3.
292
315
  | STY7S | Seven Seat Interior | |
293
316
  | SU00 | Standard Suspension | |
294
317
  | SU01 | Smart Air Suspension | |
295
- | SU03 | Suspension Suspension Update | Model X 2020 |
318
+ | SU03 | Suspension Update | Model X 2020 |
296
319
  | SU3C | Suspension | Coil spring suspension |
297
320
  | T3MA | Tires M3 | 18 Michelin All Season, Square |
298
321
  | TIC4 | Tires | All-Season Tires |
@@ -305,6 +328,7 @@ return a generic set of codes related to a Model 3.
305
328
  | TM0A | ALPHA PRE-PRODUCTION NON-SALEABLE | |
306
329
  | TM0B | BETA PRE-PRODUCTION NON-SALEABLE | |
307
330
  | TM0C | PRE-PRODUCTION SALEABLE | |
331
+ | TP01 | No Technology Package | |
308
332
  | TP01 | Tech Package - No Autopilot | |
309
333
  | TP02 | Tech Package with Autopilot | |
310
334
  | TP03 | Tech Package with Enhanced Autopilot | |
@@ -344,6 +368,8 @@ return a generic set of codes related to a Model 3.
344
368
  | WTSG | 21" Turbine Wheels | |
345
369
  | WTSP | 21" Turbine Wheels | |
346
370
  | WTSS | 21" Turbine Wheels | |
371
+ | WTHX | 20" Turbine Wheels | |
372
+ | WTTG | 19" Cyclone Wheels | |
347
373
  | WTTB | 19" Cyclone Wheels | |
348
374
  | WTTC | 21" Sonic Carbon Twin Turbine Wheels | |
349
375
  | WTUT | 22" Onyx Black Wheels | 22" Ultrasonic Turbine wheels |
@@ -369,6 +395,7 @@ return a generic set of codes related to a Model 3.
369
395
  | WY19B | 19" Sport Wheels | |
370
396
  | WY20P | 20" Performance Wheels | |
371
397
  | X001 | Override: Power Liftgate | |
398
+ | X002 | Override: Manual Liftgate | |
372
399
  | X003 | Maps & Navigation | |
373
400
  | X004 | Override: No Navigation | |
374
401
  | X007 | Exterior Lights Override: Premium exterior lighting YES | |
@@ -10,35 +10,35 @@ Information on the state of charge in the battery and its various settings.
10
10
  {
11
11
  "response": {
12
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,
13
+ "battery_level": 90,
14
+ "battery_range": 224.47,
15
+ "charge_current_request": 40,
16
+ "charge_current_request_max": 40,
17
17
  "charge_enable_request": true,
18
- "charge_energy_added": 12.41,
18
+ "charge_energy_added": 29.41,
19
19
  "charge_limit_soc": 90,
20
20
  "charge_limit_soc_max": 100,
21
21
  "charge_limit_soc_min": 50,
22
22
  "charge_limit_soc_std": 90,
23
- "charge_miles_added_ideal": 50.0,
24
- "charge_miles_added_rated": 40.0,
25
- "charge_port_cold_weather_mode": false,
26
- "charge_port_door_open": false,
23
+ "charge_miles_added_ideal": 118.5,
24
+ "charge_miles_added_rated": 95.0,
25
+ "charge_port_cold_weather_mode": null,
26
+ "charge_port_door_open": true,
27
27
  "charge_port_latch": "Engaged",
28
28
  "charge_rate": 0.0,
29
29
  "charge_to_max_range": false,
30
30
  "charger_actual_current": 0,
31
31
  "charger_phases": null,
32
- "charger_pilot_current": 48,
32
+ "charger_pilot_current": 40,
33
33
  "charger_power": 0,
34
34
  "charger_voltage": 0,
35
- "charging_state": "Disconnected",
36
- "conn_charge_cable": "<invalid>",
37
- "est_battery_range": 116.67,
35
+ "charging_state": "Complete",
36
+ "conn_charge_cable": "SAE",
37
+ "est_battery_range": 171.24,
38
38
  "fast_charger_brand": "<invalid>",
39
39
  "fast_charger_present": false,
40
40
  "fast_charger_type": "<invalid>",
41
- "ideal_battery_range": 209.95,
41
+ "ideal_battery_range": 280.59,
42
42
  "managed_charging_active": false,
43
43
  "managed_charging_start_time": null,
44
44
  "managed_charging_user_canceled": false,
@@ -48,9 +48,9 @@ Information on the state of charge in the battery and its various settings.
48
48
  "scheduled_charging_pending": false,
49
49
  "scheduled_charging_start_time": null,
50
50
  "time_to_full_charge": 0.0,
51
- "timestamp": 1543187621530,
51
+ "timestamp": 1604977209418,
52
52
  "trip_charging": false,
53
- "usable_battery_level": 64,
53
+ "usable_battery_level": 90,
54
54
  "user_charge_enable_request": null
55
55
  }
56
56
  }
@@ -11,33 +11,27 @@ Information on the current internal temperature and climate control system.
11
11
  "response": {
12
12
  "battery_heater": false,
13
13
  "battery_heater_no_power": false,
14
- "climate_keeper_mode": "dog",
14
+ "climate_keeper_mode": "off",
15
15
  "defrost_mode": 0,
16
- "driver_temp_setting": 21.6,
16
+ "driver_temp_setting": 22.8,
17
17
  "fan_status": 0,
18
- "inside_temp": null,
19
- "is_auto_conditioning_on": null,
18
+ "inside_temp": 27.0,
19
+ "is_auto_conditioning_on": false,
20
20
  "is_climate_on": false,
21
21
  "is_front_defroster_on": false,
22
22
  "is_preconditioning": false,
23
23
  "is_rear_defroster_on": false,
24
- "left_temp_direction": null,
24
+ "left_temp_direction": -232,
25
25
  "max_avail_temp": 28.0,
26
26
  "min_avail_temp": 15.0,
27
- "outside_temp": null,
28
- "passenger_temp_setting": 21.6,
29
- "remote_heater_control_enabled": true,
30
- "right_temp_direction": null,
31
- "seat_heater_left": 3,
32
- "seat_heater_rear_center": 0,
33
- "seat_heater_rear_left": 1,
34
- "seat_heater_rear_left_back": 0,
35
- "seat_heater_rear_right": 1,
36
- "seat_heater_rear_right_back": 0,
37
- "seat_heater_right": 2,
27
+ "outside_temp": 23.0,
28
+ "passenger_temp_setting": 22.8,
29
+ "remote_heater_control_enabled": false,
30
+ "right_temp_direction": -232,
31
+ "seat_heater_left": 0,
32
+ "seat_heater_right": 0,
38
33
  "side_mirror_heaters": false,
39
- "steering_wheel_heater": false,
40
- "timestamp": 1543187641727,
34
+ "timestamp": 1604977244530,
41
35
  "wiper_blade_heater": false
42
36
  }
43
37
  }
@@ -16,18 +16,19 @@ _Note:_ all `*_range` values are in miles, irrespective of GUI configuration.
16
16
  "vehicle_id": 1234567890,
17
17
  "vin": "5YJSA11111111111",
18
18
  "display_name": "Nikola 2.0",
19
- "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",
19
+ "option_codes": "AD15,MDL3,PBSB,RENA,BT37,ID3W,RF3G,S3PB,DRLH,DV2W,W39B,APF0,COUS,BC3B,CH07,PC30,FC3P,FG31,GLFR,HL31,HM31,IL31,LTPB,MR31,FM3B,RS3H,SA3P,STCP,SC04,SU3C,T3CA,TW00,TM00,UT3P,WR00,AU3P,APH3,AF00,ZCST,MI00,CDM0",
20
20
  "color": null,
21
+ "access_type": "OWNER",
21
22
  "tokens": ["abcdef1234567890", "1234567890abcdef"],
22
23
  "state": "online",
23
24
  "in_service": false,
24
25
  "id_s": "12345678901234567",
25
26
  "calendar_enabled": true,
26
- "api_version": 7,
27
+ "api_version": 10,
27
28
  "backseat_token": null,
28
29
  "backseat_token_updated_at": null,
29
30
  "drive_state": {
30
- "gps_as_of": 1538363883,
31
+ "gps_as_of": 1604977043,
31
32
  "heading": 5,
32
33
  "latitude": 33.111111,
33
34
  "longitude": -88.111111,
@@ -38,71 +39,65 @@ _Note:_ all `*_range` values are in miles, irrespective of GUI configuration.
38
39
  "power": 0,
39
40
  "shift_state": null,
40
41
  "speed": null,
41
- "timestamp": 1538364666096
42
+ "timestamp": 1604977044186
42
43
  },
43
44
  "climate_state": {
44
45
  "battery_heater": false,
45
46
  "battery_heater_no_power": false,
46
- "climate_keeper_mode": "dog",
47
+ "climate_keeper_mode": "off",
47
48
  "defrost_mode": 0,
48
- "driver_temp_setting": 21.6,
49
+ "driver_temp_setting": 22.8,
49
50
  "fan_status": 0,
50
- "inside_temp": null,
51
- "is_auto_conditioning_on": null,
51
+ "inside_temp": 26.9,
52
+ "is_auto_conditioning_on": false,
52
53
  "is_climate_on": false,
53
54
  "is_front_defroster_on": false,
54
55
  "is_preconditioning": false,
55
56
  "is_rear_defroster_on": false,
56
- "left_temp_direction": null,
57
+ "left_temp_direction": -224,
57
58
  "max_avail_temp": 28.0,
58
59
  "min_avail_temp": 15.0,
59
- "outside_temp": null,
60
- "passenger_temp_setting": 21.6,
61
- "remote_heater_control_enabled": true,
62
- "right_temp_direction": null,
63
- "seat_heater_left": 3,
64
- "seat_heater_rear_center": 0,
65
- "seat_heater_rear_left": 1,
66
- "seat_heater_rear_left_back": 0,
67
- "seat_heater_rear_right": 1,
68
- "seat_heater_rear_right_back": 0,
69
- "seat_heater_right": 2,
60
+ "outside_temp": 23.0,
61
+ "passenger_temp_setting": 22.8,
62
+ "remote_heater_control_enabled": false,
63
+ "right_temp_direction": -224,
64
+ "seat_heater_left": 0,
65
+ "seat_heater_right": 0,
70
66
  "side_mirror_heaters": false,
71
- "steering_wheel_heater": false,
72
- "timestamp": 1543186971731,
67
+ "timestamp": 1604977044186,
73
68
  "wiper_blade_heater": false
74
69
  },
75
70
  "charge_state": {
76
71
  "battery_heater_on": false,
77
- "battery_level": 64,
78
- "battery_range": 167.96,
79
- "charge_current_request": 48,
80
- "charge_current_request_max": 48,
72
+ "battery_level": 90,
73
+ "battery_range": 224.47,
74
+ "charge_current_request": 40,
75
+ "charge_current_request_max": 40,
81
76
  "charge_enable_request": true,
82
- "charge_energy_added": 12.41,
77
+ "charge_energy_added": 29.41,
83
78
  "charge_limit_soc": 90,
84
79
  "charge_limit_soc_max": 100,
85
80
  "charge_limit_soc_min": 50,
86
81
  "charge_limit_soc_std": 90,
87
- "charge_miles_added_ideal": 50.0,
88
- "charge_miles_added_rated": 40.0,
89
- "charge_port_cold_weather_mode": false,
90
- "charge_port_door_open": false,
82
+ "charge_miles_added_ideal": 118.5,
83
+ "charge_miles_added_rated": 95.0,
84
+ "charge_port_cold_weather_mode": null,
85
+ "charge_port_door_open": true,
91
86
  "charge_port_latch": "Engaged",
92
87
  "charge_rate": 0.0,
93
88
  "charge_to_max_range": false,
94
89
  "charger_actual_current": 0,
95
90
  "charger_phases": null,
96
- "charger_pilot_current": 48,
91
+ "charger_pilot_current": 40,
97
92
  "charger_power": 0,
98
93
  "charger_voltage": 0,
99
- "charging_state": "Disconnected",
100
- "conn_charge_cable": "<invalid>",
101
- "est_battery_range": 118.38,
94
+ "charging_state": "Complete",
95
+ "conn_charge_cable": "SAE",
96
+ "est_battery_range": 171.24,
102
97
  "fast_charger_brand": "<invalid>",
103
98
  "fast_charger_present": false,
104
99
  "fast_charger_type": "<invalid>",
105
- "ideal_battery_range": 209.95,
100
+ "ideal_battery_range": 280.59,
106
101
  "managed_charging_active": false,
107
102
  "managed_charging_start_time": null,
108
103
  "managed_charging_user_canceled": false,
@@ -112,9 +107,9 @@ _Note:_ all `*_range` values are in miles, irrespective of GUI configuration.
112
107
  "scheduled_charging_pending": false,
113
108
  "scheduled_charging_start_time": null,
114
109
  "time_to_full_charge": 0.0,
115
- "timestamp": 1543186971727,
110
+ "timestamp": 1604977044186,
116
111
  "trip_charging": false,
117
- "usable_battery_level": 64,
112
+ "usable_battery_level": 90,
118
113
  "user_charge_enable_request": null
119
114
  },
120
115
  "gui_settings": {
@@ -124,61 +119,54 @@ _Note:_ all `*_range` values are in miles, irrespective of GUI configuration.
124
119
  "gui_range_display": "Rated",
125
120
  "gui_temperature_units": "F",
126
121
  "show_range_units": true,
127
- "timestamp": 1543186971728
122
+ "timestamp": 1604977044186
128
123
  },
129
124
  "vehicle_state": {
130
- "api_version": 7,
125
+ "api_version": 10,
131
126
  "autopark_state_v2": "standby",
132
127
  "autopark_style": "standard",
133
128
  "calendar_supported": true,
134
- "car_version": "2019.40.2.1 38f55d9f9205",
129
+ "car_version": "2020.36.16 3e9e4e8dd287",
135
130
  "center_display_state": 0,
136
131
  "df": 0,
137
132
  "dr": 0,
138
- "fd_window": 0,
139
- "fp_window": 0,
140
133
  "ft": 0,
141
- "homelink_device_count": 0,
134
+ "homelink_device_count": 2,
142
135
  "homelink_nearby": true,
143
136
  "is_user_present": false,
144
137
  "last_autopark_error": "no_error",
145
- "locked": true,
146
- "media_state": {
147
- "remote_control_enabled": true
148
- },
138
+ "locked": false,
139
+ "media_state": { "remote_control_enabled": true },
149
140
  "notifications_supported": true,
150
- "odometer": 33561.422505,
141
+ "odometer": 57509.856033,
151
142
  "parsed_calendar_supported": true,
152
143
  "pf": 0,
153
144
  "pr": 0,
154
- "rd_window": 0,
155
145
  "remote_start": false,
156
146
  "remote_start_enabled": true,
157
147
  "remote_start_supported": true,
158
- "rp_window": 0,
159
148
  "rt": 0,
160
- "sentry_mode": true,
149
+ "sentry_mode": false,
161
150
  "sentry_mode_available": true,
162
151
  "smart_summon_available": true,
163
152
  "software_update": {
164
- "download_perc": 100,
153
+ "download_perc": 0,
165
154
  "expected_duration_sec": 2700,
166
- "install_perc": 10,
167
- "scheduled_time_ms": 1575689678432,
168
- "status": "scheduled",
169
- "version": "2019.40.2.1"
155
+ "install_perc": 1,
156
+ "status": "",
157
+ "version": ""
170
158
  },
171
159
  "speed_limit_mode": {
172
160
  "active": false,
173
- "current_limit_mph": 75.0,
161
+ "current_limit_mph": 50.0,
174
162
  "max_limit_mph": 90,
175
163
  "min_limit_mph": 50,
176
- "pin_code_set": false
164
+ "pin_code_set": true
177
165
  },
178
- "summon_standby_mode_enabled": true,
166
+ "summon_standby_mode_enabled": false,
179
167
  "sun_roof_percent_open": 0,
180
- "sun_roof_state": "unknown",
181
- "timestamp": 1538364666096,
168
+ "sun_roof_state": "closed",
169
+ "timestamp": 1604977044184,
182
170
  "valet_mode": false,
183
171
  "valet_pin_needed": true,
184
172
  "vehicle_name": "Nikola 2.0"
@@ -189,13 +177,12 @@ _Note:_ all `*_range` values are in miles, irrespective of GUI configuration.
189
177
  "car_special_type": "base",
190
178
  "car_type": "models2",
191
179
  "charge_port_type": "US",
180
+ "ece_restrictions": false,
192
181
  "eu_vehicle": false,
193
182
  "exterior_color": "White",
194
183
  "has_air_suspension": true,
195
184
  "has_ludicrous_mode": false,
196
- "key_version": 1,
197
185
  "motorized_charge_port": true,
198
- "perf_config": "P2",
199
186
  "plg": true,
200
187
  "rear_seat_heaters": 0,
201
188
  "rear_seat_type": 0,
@@ -205,7 +192,7 @@ _Note:_ all `*_range` values are in miles, irrespective of GUI configuration.
205
192
  "spoiler_type": "None",
206
193
  "sun_roof_installed": 2,
207
194
  "third_row_seats": "None",
208
- "timestamp": 1538364666096,
195
+ "timestamp": 1604977044187,
209
196
  "trim_badging": "p90d",
210
197
  "use_range_badging": false,
211
198
  "wheel_type": "AeroTurbine19"
@@ -8,98 +8,73 @@ Returns a list of nearby Tesla-operated charging stations. (Requires car softwar
8
8
 
9
9
  ```json
10
10
  {
11
- "response":{
12
- "congestion_sync_time_utc_secs":1545091987,
13
- "destination_charging":[
11
+ "response": {
12
+ "congestion_sync_time_utc_secs": 1604976488,
13
+ "destination_charging": [
14
14
  {
15
- "location":{
16
- "lat":33.811484,
17
- "long":-118.138451
18
- },
19
- "name":"Long Beach Marriott",
20
- "type":"destination",
21
- "distance_miles":2.201606
15
+ "location": { "lat": 34.010854, "long": -84.574979 },
16
+ "name": "Hilton Garden Inn Atlanta NW/Kennesaw Town Center",
17
+ "type": "destination",
18
+ "distance_miles": 6.430447
22
19
  },
23
20
  {
24
- "location":{
25
- "lat":33.767198,
26
- "long":-118.191987
27
- },
28
- "name":"Renaissance Long Beach Hotel",
29
- "type":"destination",
30
- "distance_miles":4.071068
21
+ "location": { "lat": 34.011213, "long": -84.575745 },
22
+ "name": "Homewood Suites by Hilton Atlanta NW-Kennesaw",
23
+ "type": "destination",
24
+ "distance_miles": 6.48008
31
25
  },
32
26
  {
33
- "location":{
34
- "lat":33.757146,
35
- "long":-118.19861
36
- },
37
- "name":"Hotel Maya, a Doubletree by Hilton",
38
- "type":"destination",
39
- "distance_miles":4.843953
27
+ "location": { "lat": 33.881785, "long": -84.473461 },
28
+ "name": "Hyatt Place Atlanta/Cobb Galleria",
29
+ "type": "destination",
30
+ "distance_miles": 6.778101
40
31
  },
41
32
  {
42
- "location":{
43
- "lat":33.832254,
44
- "long":-118.079218
45
- },
46
- "name":"The Gardens Casino",
47
- "type":"destination",
48
- "distance_miles":6.449794
33
+ "location": { "lat": 33.991767, "long": -84.351229 },
34
+ "name": "European Collision Repair",
35
+ "type": "destination",
36
+ "distance_miles": 6.805893
49
37
  }
50
38
  ],
51
- "superchargers":[
39
+ "superchargers": [
52
40
  {
53
- "location":{
54
- "lat":33.934471,
55
- "long":-118.121217
56
- },
57
- "name":"Downey, CA - Stonewood Street",
58
- "type":"supercharger",
59
- "distance_miles":2.196721,
60
- "available_stalls":5,
61
- "total_stalls":12,
62
- "site_closed":false
41
+ "location": { "lat": 33.848756, "long": -84.36434 },
42
+ "name": "Atlanta, GA - Peachtree Road",
43
+ "type": "supercharger",
44
+ "distance_miles": 10.868304,
45
+ "available_stalls": 4,
46
+ "total_stalls": 5,
47
+ "site_closed": false
63
48
  },
64
49
  {
65
- "location":{
66
- "lat":33.953385,
67
- "long":-118.112905
68
- },
69
- "name":"Downey, CA - Lakewood Boulevard",
70
- "type":"supercharger",
71
- "distance_miles":9.587273,
72
- "available_stalls":6,
73
- "total_stalls":12,
74
- "site_closed":false
50
+ "location": { "lat": 33.846487, "long": -84.360172 },
51
+ "name": "Atlanta, GA - Lenox Road",
52
+ "type": "supercharger",
53
+ "distance_miles": 11.131691,
54
+ "available_stalls": 16,
55
+ "total_stalls": 16,
56
+ "site_closed": false
75
57
  },
76
58
  {
77
- "location":{
78
- "lat":33.921063,
79
- "long":-118.330074
80
- },
81
- "name":"Hawthorne, CA",
82
- "type":"supercharger",
83
- "distance_miles":12.197322,
84
- "available_stalls":3,
85
- "total_stalls":6,
86
- "site_closed":false
59
+ "location": { "lat": 34.075818, "long": -84.652184 },
60
+ "name": "Acworth, GA",
61
+ "type": "supercharger",
62
+ "distance_miles": 12.403464,
63
+ "available_stalls": 11,
64
+ "total_stalls": 11,
65
+ "site_closed": false
87
66
  },
88
67
  {
89
- "location":{
90
- "lat":33.894227,
91
- "long":-118.367407
92
- },
93
- "name":"Redondo Beach, CA",
94
- "type":"supercharger",
95
- "distance_miles":13.125912,
96
- "available_stalls":3,
97
- "total_stalls":8,
98
- "site_closed":false
68
+ "location": { "lat": 34.071365, "long": -84.275362 },
69
+ "name": "Alpharetta, GA",
70
+ "type": "supercharger",
71
+ "distance_miles": 12.772961,
72
+ "available_stalls": 6,
73
+ "total_stalls": 10,
74
+ "site_closed": false
99
75
  }
100
76
  ],
101
- "timestamp":1545092157769
77
+ "timestamp": 1604977312943
102
78
  }
103
79
  }
104
80
  ```
105
-
@@ -14,13 +14,12 @@ Returns the vehicle's configuration information including model, color, badging
14
14
  "car_special_type": "base",
15
15
  "car_type": "models2",
16
16
  "charge_port_type": "US",
17
+ "ece_restrictions": false,
17
18
  "eu_vehicle": false,
18
19
  "exterior_color": "White",
19
20
  "has_air_suspension": true,
20
21
  "has_ludicrous_mode": false,
21
- "key_version": 1,
22
22
  "motorized_charge_port": true,
23
- "perf_config": "P2",
24
23
  "plg": true,
25
24
  "rear_seat_heaters": 0,
26
25
  "rear_seat_type": 0,
@@ -30,8 +29,9 @@ Returns the vehicle's configuration information including model, color, badging
30
29
  "spoiler_type": "None",
31
30
  "sun_roof_installed": 2,
32
31
  "third_row_seats": "None",
33
- "timestamp": 1538364666096,
32
+ "timestamp": 1604977445448,
34
33
  "trim_badging": "p90d",
34
+ "use_range_badging": false,
35
35
  "wheel_type": "AeroTurbine19"
36
36
  }
37
37
  }
@@ -32,58 +32,51 @@ Here are the descriptions for the shorthand fields:
32
32
  ```json
33
33
  {
34
34
  "response": {
35
- "api_version": 7,
36
- "autopark_state_v3": "standby",
37
- "autopark_style": "dead_man",
35
+ "api_version": 10,
36
+ "autopark_state_v2": "standby",
37
+ "autopark_style": "standard",
38
38
  "calendar_supported": true,
39
- "car_version": "2019.40.2.1 38f55d9f9205",
39
+ "car_version": "2020.36.16 3e9e4e8dd287",
40
40
  "center_display_state": 0,
41
41
  "df": 0,
42
42
  "dr": 0,
43
- "fd_window": 0,
44
- "fp_window": 0,
45
43
  "ft": 0,
46
- "homelink_device_count": 0,
44
+ "homelink_device_count": 2,
47
45
  "homelink_nearby": true,
48
46
  "is_user_present": false,
49
47
  "last_autopark_error": "no_error",
50
- "locked": true,
51
- "media_state": {
52
- "remote_control_enabled": true
53
- },
48
+ "locked": false,
49
+ "media_state": { "remote_control_enabled": true },
54
50
  "notifications_supported": true,
55
- "odometer": 36051.517239,
51
+ "odometer": 57509.856033,
56
52
  "parsed_calendar_supported": true,
57
53
  "pf": 0,
58
54
  "pr": 0,
59
- "rd_window": 0,
60
55
  "remote_start": false,
61
56
  "remote_start_enabled": true,
62
57
  "remote_start_supported": true,
63
- "rp_window": 0,
64
58
  "rt": 0,
65
- "sentry_mode": true,
59
+ "sentry_mode": false,
66
60
  "sentry_mode_available": true,
67
61
  "smart_summon_available": true,
68
62
  "software_update": {
69
- "download_perc": 100,
63
+ "download_perc": 0,
70
64
  "expected_duration_sec": 2700,
71
- "install_perc": 10,
72
- "scheduled_time_ms": 1575689678432,
73
- "status": "scheduled",
74
- "version": "2019.40.2.1"
65
+ "install_perc": 1,
66
+ "status": "",
67
+ "version": ""
75
68
  },
76
69
  "speed_limit_mode": {
77
70
  "active": false,
78
71
  "current_limit_mph": 50.0,
79
72
  "max_limit_mph": 90,
80
73
  "min_limit_mph": 50,
81
- "pin_code_set": false
74
+ "pin_code_set": true
82
75
  },
83
- "summon_standby_mode_enabled": true,
76
+ "summon_standby_mode_enabled": false,
84
77
  "sun_roof_percent_open": 0,
85
- "sun_roof_state": "unknown",
86
- "timestamp": 1543187581934,
78
+ "sun_roof_state": "closed",
79
+ "timestamp": 1604977470379,
87
80
  "valet_mode": false,
88
81
  "valet_pin_needed": true,
89
82
  "vehicle_name": "Nikola 2.0"
@@ -56,8 +56,8 @@ module TeslaApi
56
56
 
57
57
  def streaming_connect_message
58
58
  {
59
- msg_type: 'data:subscribe',
60
- token: Base64.strict_encode64("#{email}:#{self['tokens'].first}"),
59
+ msg_type: 'data:subscribe_oauth',
60
+ token: client.access_token,
61
61
  value: 'speed,odometer,soc,elevation,est_heading,est_lat,est_lng,power,shift_state,range,est_range,heading',
62
62
  tag: self['vehicle_id'].to_s,
63
63
  }
@@ -27,6 +27,10 @@ module TeslaApi
27
27
 
28
28
  # State
29
29
 
30
+ def vehicle_data
31
+ client.get("/vehicles/#{id}/vehicle_data")['response']
32
+ end
33
+
30
34
  def data
31
35
  client.get("/vehicles/#{id}/data")['response']
32
36
  end
@@ -1,3 +1,3 @@
1
1
  module TeslaApi
2
- VERSION = '3.0.6'
2
+ VERSION = '3.0.7'
3
3
  end
@@ -0,0 +1,115 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://owner-api.teslamotors.com/api/1/vehicles
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - github.com/timdorr/tesla-api v:3.0.6
12
+ Authorization:
13
+ - Bearer <TESLA_ACCESS_TOKEN>
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ Accept:
17
+ - '*/*'
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Date:
24
+ - Tue, 10 Nov 2020 02:53:32 GMT
25
+ Content-Type:
26
+ - application/json; charset=utf-8
27
+ Transfer-Encoding:
28
+ - chunked
29
+ Connection:
30
+ - keep-alive
31
+ Vary:
32
+ - Accept-Encoding
33
+ X-Frame-Options:
34
+ - SAMEORIGIN
35
+ X-Xss-Protection:
36
+ - 1; mode=block
37
+ X-Content-Type-Options:
38
+ - nosniff
39
+ X-Txid:
40
+ - 8cab94e3aac7ad773c2e8347050cb4a5
41
+ Etag:
42
+ - W/"cfa5885744c037b595646a39aaae3d82"
43
+ Cache-Control:
44
+ - max-age=0, private, must-revalidate
45
+ X-Request-Id:
46
+ - fb945c7582221ba925e2f4a7628948b5fb945c7582221ba925e2f4a7628948b5
47
+ X-Runtime:
48
+ - '0.080884'
49
+ Strict-Transport-Security:
50
+ - max-age=15724800; includeSubDomains
51
+ body:
52
+ encoding: ASCII-8BIT
53
+ string:
54
+ '{"response":[{"id":26640707449551857,"vehicle_id":1817902171,"vin":"5YJSA1E51GF163743","display_name":"Nikola
55
+ 2.0","option_codes":"AD15,MDL3,PBSB,RENA,BT37,ID3W,RF3G,S3PB,DRLH,DV2W,W39B,APF0,COUS,BC3B,CH07,PC30,FC3P,FG31,GLFR,HL31,HM31,IL31,LTPB,MR31,FM3B,RS3H,SA3P,STCP,SC04,SU3C,T3CA,TW00,TM00,UT3P,WR00,AU3P,APH3,AF00,ZCST,MI00,CDM0","color":null,"access_type":"OWNER","tokens":["no","nope"],"state":"online","in_service":false,"id_s":"26640707449551857","calendar_enabled":true,"api_version":10,"backseat_token":null,"backseat_token_updated_at":null,"vehicle_config":null}],"count":1}'
56
+ http_version:
57
+ recorded_at: Tue, 10 Nov 2020 02:53:32 GMT
58
+ - request:
59
+ method: get
60
+ uri: https://owner-api.teslamotors.com/api/1/vehicles/26640707449551857/data
61
+ body:
62
+ encoding: US-ASCII
63
+ string: ''
64
+ headers:
65
+ User-Agent:
66
+ - github.com/timdorr/tesla-api v:3.0.6
67
+ Authorization:
68
+ - Bearer <TESLA_ACCESS_TOKEN>
69
+ Accept-Encoding:
70
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
71
+ Accept:
72
+ - '*/*'
73
+ response:
74
+ status:
75
+ code: 200
76
+ message: OK
77
+ headers:
78
+ Date:
79
+ - Tue, 10 Nov 2020 02:53:38 GMT
80
+ Content-Type:
81
+ - application/json; charset=utf-8
82
+ Transfer-Encoding:
83
+ - chunked
84
+ Connection:
85
+ - keep-alive
86
+ Vary:
87
+ - Accept-Encoding
88
+ X-Frame-Options:
89
+ - SAMEORIGIN
90
+ X-Xss-Protection:
91
+ - 1; mode=block
92
+ X-Content-Type-Options:
93
+ - nosniff
94
+ X-Txid:
95
+ - 95b841542f321728c867e12aaf9bf6f5
96
+ Etag:
97
+ - W/"4696b909a01379b329bd3311b52b75c6"
98
+ Cache-Control:
99
+ - max-age=0, private, must-revalidate
100
+ X-Request-Id:
101
+ - 53f72c31caff4a2d436805fa1b47215453f72c31caff4a2d436805fa1b472154
102
+ X-Runtime:
103
+ - '5.578065'
104
+ Strict-Transport-Security:
105
+ - max-age=15724800; includeSubDomains
106
+ body:
107
+ encoding: ASCII-8BIT
108
+ string:
109
+ '{"response":{"id":26640707449551857,"user_id":1023,"vehicle_id":1817902171,"vin":"5YJSA1E41GF167745","display_name":"Nikola
110
+ 2.0","option_codes":"AD15,MDL3,PBSB,RENA,BT37,ID3W,RF3G,S3PB,DRLH,DV2W,W39B,APF0,COUS,BC3B,CH07,PC30,FC3P,FG31,GLFR,HL31,HM31,IL31,LTPB,MR31,FM3B,RS3H,SA3P,STCP,SC04,SU3C,T3CA,TW00,TM00,UT3P,WR00,AU3P,APH3,AF00,ZCST,MI00,CDM0","color":null,"access_type":"OWNER","tokens":["9d33fab579bedf74","9eb517d37cab5bf8"],"state":"online","in_service":false,"id_s":"26640707449551857","calendar_enabled":true,"api_version":10,"backseat_token":null,"backseat_token_updated_at":null,"vehicle_config":{"can_accept_navigation_requests":true,"can_actuate_trunks":true,"car_special_type":"base","car_type":"models2","charge_port_type":"US","ece_restrictions":false,"eu_vehicle":false,"exterior_color":"White","has_air_suspension":true,"has_ludicrous_mode":false,"motorized_charge_port":true,"plg":true,"rear_seat_heaters":0,"rear_seat_type":0,"rhd":false,"roof_color":"None","seat_type":2,"spoiler_type":"None","sun_roof_installed":2,"third_row_seats":"None","timestamp":1604976818402,"trim_badging":"p90d","use_range_badging":false,"wheel_type":"AeroTurbine19"},"gui_settings":{"gui_24_hour_time":false,"gui_charge_rate_units":"mi/hr","gui_distance_units":"mi/hr","gui_range_display":"Rated","gui_temperature_units":"F","show_range_units":true,"timestamp":1604976818399},"drive_state":{"gps_as_of":1604976817,"heading":5,"latitude":3.972,"longitude":-4.9147,"native_latitude":3.982,"native_location_supported":1,"native_longitude":-4.947,"native_type":"wgs","power":0,"shift_state":null,"speed":null,"timestamp":1604976818416},"vehicle_state":{"api_version":10,"autopark_state_v2":"standby","autopark_style":"standard","calendar_supported":true,"car_version":"2020.36.16
111
+ 3e9e4e8dd287","center_display_state":0,"df":0,"dr":0,"ft":0,"homelink_device_count":2,"homelink_nearby":true,"is_user_present":false,"last_autopark_error":"no_error","locked":false,"media_state":{"remote_control_enabled":true},"notifications_supported":true,"odometer":57509.856033,"parsed_calendar_supported":true,"pf":0,"pr":0,"remote_start":false,"remote_start_enabled":true,"remote_start_supported":true,"rt":0,"sentry_mode":false,"sentry_mode_available":true,"smart_summon_available":true,"software_update":{"download_perc":0,"expected_duration_sec":2700,"install_perc":1,"status":"","version":""},"speed_limit_mode":{"active":false,"current_limit_mph":50.0,"max_limit_mph":90,"min_limit_mph":50,"pin_code_set":true},"summon_standby_mode_enabled":false,"sun_roof_percent_open":0,"sun_roof_state":"closed","timestamp":1604976818414,"valet_mode":false,"valet_pin_needed":true,"vehicle_name":"Nikola
112
+ 2.0"},"charge_state":{"battery_heater_on":false,"battery_level":90,"battery_range":224.81,"charge_current_request":40,"charge_current_request_max":40,"charge_enable_request":true,"charge_energy_added":29.41,"charge_limit_soc":90,"charge_limit_soc_max":100,"charge_limit_soc_min":50,"charge_limit_soc_std":90,"charge_miles_added_ideal":118.5,"charge_miles_added_rated":95.0,"charge_port_cold_weather_mode":null,"charge_port_door_open":true,"charge_port_latch":"Engaged","charge_rate":0.0,"charge_to_max_range":false,"charger_actual_current":0,"charger_phases":null,"charger_pilot_current":40,"charger_power":0,"charger_voltage":0,"charging_state":"Complete","conn_charge_cable":"SAE","est_battery_range":171.24,"fast_charger_brand":"<invalid>","fast_charger_present":false,"fast_charger_type":"<invalid>","ideal_battery_range":281.02,"managed_charging_active":false,"managed_charging_start_time":null,"managed_charging_user_canceled":false,"max_range_charge_counter":0,"minutes_to_full_charge":0,"not_enough_power_to_heat":false,"scheduled_charging_pending":false,"scheduled_charging_start_time":null,"time_to_full_charge":0.0,"timestamp":1604976818400,"trip_charging":false,"usable_battery_level":90,"user_charge_enable_request":null},"climate_state":{"battery_heater":false,"battery_heater_no_power":false,"climate_keeper_mode":"off","defrost_mode":0,"driver_temp_setting":22.8,"fan_status":0,"inside_temp":27.0,"is_auto_conditioning_on":false,"is_climate_on":false,"is_front_defroster_on":false,"is_preconditioning":false,"is_rear_defroster_on":false,"left_temp_direction":-223,"max_avail_temp":28.0,"min_avail_temp":15.0,"outside_temp":23.0,"passenger_temp_setting":22.8,"remote_heater_control_enabled":false,"right_temp_direction":-223,"seat_heater_left":0,"seat_heater_right":0,"side_mirror_heaters":false,"timestamp":1604976818413,"wiper_blade_heater":false}}}'
113
+ http_version:
114
+ recorded_at: Tue, 10 Nov 2020 02:53:38 GMT
115
+ recorded_with: VCR 4.0.0
@@ -21,6 +21,18 @@ RSpec.describe TeslaApi::Vehicle do
21
21
  end
22
22
  end
23
23
 
24
+ describe '#vehicle_data', vcr: {cassette_name: 'vehicle-vehicle_data'} do
25
+ context 'data about the vehicle\'s overall state' do
26
+ subject { vehicle.data }
27
+
28
+ it { should include('display_name') }
29
+ it { should include('drive_state') }
30
+ it { should include('vehicle_state') }
31
+ it { should include('vehicle_config') }
32
+ it { should include('charge_state') }
33
+ end
34
+ end
35
+
24
36
  describe '#data', vcr: {cassette_name: 'vehicle-data'} do
25
37
  context 'data about the vehicle\'s overall state' do
26
38
  subject { vehicle.data }
@@ -19,9 +19,9 @@ Gem::Specification.new do |spec|
19
19
  spec.add_dependency 'faraday_middleware'
20
20
 
21
21
  spec.add_development_dependency 'bundler', '~> 2.0'
22
- spec.add_development_dependency 'rake', '~> 12.0'
22
+ spec.add_development_dependency 'rake', '~> 13.0'
23
23
  spec.add_development_dependency 'rspec', '~> 3.1'
24
- spec.add_development_dependency 'vcr', '~> 4.0'
24
+ spec.add_development_dependency 'vcr', '~> 6.0'
25
25
  spec.add_development_dependency 'webmock', '~> 3.0'
26
26
  spec.add_development_dependency 'dotenv', '~> 2.0'
27
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tesla_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.6
4
+ version: 3.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Dorr
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-17 00:00:00.000000000 Z
11
+ date: 2020-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async-websocket
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '12.0'
75
+ version: '13.0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '12.0'
82
+ version: '13.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rspec
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '4.0'
103
+ version: '6.0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '4.0'
110
+ version: '6.0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: webmock
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -253,6 +253,7 @@ files:
253
253
  - spec/cassettes/vehicle-sun_roof_control-close.yml
254
254
  - spec/cassettes/vehicle-sun_roof_control-vent.yml
255
255
  - spec/cassettes/vehicle-vehicle_config.yml
256
+ - spec/cassettes/vehicle-vehicle_data.yml
256
257
  - spec/cassettes/vehicle-vehicle_state.yml
257
258
  - spec/cassettes/vehicle-wake_up.yml
258
259
  - spec/cassettes/vehicle.yml
@@ -264,7 +265,7 @@ homepage: https://github.com/timdorr/tesla-api
264
265
  licenses:
265
266
  - MIT
266
267
  metadata: {}
267
- post_install_message:
268
+ post_install_message:
268
269
  rdoc_options: []
269
270
  require_paths:
270
271
  - lib
@@ -279,8 +280,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
279
280
  - !ruby/object:Gem::Version
280
281
  version: '0'
281
282
  requirements: []
282
- rubygems_version: 3.0.3
283
- signing_key:
283
+ rubygems_version: 3.1.4
284
+ signing_key:
284
285
  specification_version: 4
285
286
  summary: A wrapper for the Tesla JSON API
286
287
  test_files:
@@ -340,6 +341,7 @@ test_files:
340
341
  - spec/cassettes/vehicle-sun_roof_control-close.yml
341
342
  - spec/cassettes/vehicle-sun_roof_control-vent.yml
342
343
  - spec/cassettes/vehicle-vehicle_config.yml
344
+ - spec/cassettes/vehicle-vehicle_data.yml
343
345
  - spec/cassettes/vehicle-vehicle_state.yml
344
346
  - spec/cassettes/vehicle-wake_up.yml
345
347
  - spec/cassettes/vehicle.yml