tesla-fleet-api 0.9.2__py3-none-any.whl → 0.9.4__py3-none-any.whl
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.
- tesla_fleet_api/const.py +1 -1
- tesla_fleet_api/exceptions.py +20 -5
- tesla_fleet_api/pb2/car_server_pb2.py +195 -130
- tesla_fleet_api/pb2/common_pb2.py +31 -11
- tesla_fleet_api/pb2/managed_charging_pb2.py +21 -0
- tesla_fleet_api/pb2/signatures_pb2.py +25 -17
- tesla_fleet_api/pb2/universal_message_pb2.py +10 -4
- tesla_fleet_api/pb2/vehicle_pb2.py +260 -10
- tesla_fleet_api/teslafleetapi.py +1 -0
- tesla_fleet_api/teslemetry.py +1 -10
- tesla_fleet_api/vehicle.py +7 -2
- tesla_fleet_api/vehiclesigned.py +25 -19
- tesla_fleet_api/vehiclespecific.py +2 -4
- {tesla_fleet_api-0.9.2.dist-info → tesla_fleet_api-0.9.4.dist-info}/METADATA +1 -3
- tesla_fleet_api-0.9.4.dist-info/RECORD +33 -0
- {tesla_fleet_api-0.9.2.dist-info → tesla_fleet_api-0.9.4.dist-info}/WHEEL +1 -1
- tesla_fleet_api-0.9.2.dist-info/RECORD +0 -32
- {tesla_fleet_api-0.9.2.dist-info → tesla_fleet_api-0.9.4.dist-info}/LICENSE +0 -0
- {tesla_fleet_api-0.9.2.dist-info → tesla_fleet_api-0.9.4.dist-info}/top_level.txt +0 -0
tesla_fleet_api/vehiclesigned.py
CHANGED
@@ -184,9 +184,10 @@ class VehicleSigned(VehicleSpecific):
|
|
184
184
|
resp = RoutableMessage()
|
185
185
|
resp.ParseFromString(base64.b64decode(resp_json["response"]))
|
186
186
|
|
187
|
-
|
188
|
-
|
189
|
-
|
187
|
+
if resp.signedMessageStatus:
|
188
|
+
LOGGER.error("Command returned with signedMessageStatus: %s", resp.signedMessageStatus)
|
189
|
+
if resp.signedMessageStatus.operation_status == OPERATIONSTATUS_ERROR:
|
190
|
+
raise MESSAGE_FAULTS[resp.signedMessageStatus.signed_message_fault]
|
190
191
|
|
191
192
|
return resp
|
192
193
|
|
@@ -289,11 +290,11 @@ class VehicleSigned(VehicleSpecific):
|
|
289
290
|
if resp.signedMessageStatus.operation_status == OPERATIONSTATUS_WAIT:
|
290
291
|
return {"response": {"result": False}}
|
291
292
|
|
292
|
-
LOGGER.debug(resp)
|
293
|
+
LOGGER.debug("Command response: %s", resp)
|
293
294
|
reason = resp.protobuf_message_as_bytes[8:].decode()
|
294
295
|
|
295
296
|
if reason:
|
296
|
-
LOGGER.error(reason)
|
297
|
+
LOGGER.error("Command failed with reason: %s", reason)
|
297
298
|
return {"response": {"result": False, "reason": reason}}
|
298
299
|
|
299
300
|
return {"response": {"result": True, "reason": ""}}
|
@@ -613,36 +614,41 @@ class VehicleSigned(VehicleSpecific):
|
|
613
614
|
# Void CAR_SEAT_THIRD_ROW_LEFT = 14;
|
614
615
|
# Void CAR_SEAT_THIRD_ROW_RIGHT = 15;
|
615
616
|
|
616
|
-
|
617
|
+
heater_action_dict = {}
|
617
618
|
match seat_position:
|
618
619
|
case 0:
|
619
|
-
|
620
|
+
heater_action_dict["CAR_SEAT_FRONT_LEFT"] = Void()
|
620
621
|
case 1:
|
621
|
-
|
622
|
+
heater_action_dict["CAR_SEAT_FRONT_RIGHT"] = Void()
|
622
623
|
case 2:
|
623
|
-
|
624
|
+
heater_action_dict["CAR_SEAT_REAR_LEFT"] = Void()
|
624
625
|
case 3:
|
625
|
-
|
626
|
+
heater_action_dict["CAR_SEAT_REAR_LEFT_BACK"] = Void()
|
626
627
|
case 4:
|
627
|
-
|
628
|
+
heater_action_dict["CAR_SEAT_REAR_CENTER"] = Void()
|
628
629
|
case 5:
|
629
|
-
|
630
|
+
heater_action_dict["CAR_SEAT_REAR_RIGHT"] = Void()
|
630
631
|
case 6:
|
631
|
-
|
632
|
+
heater_action_dict["CAR_SEAT_REAR_RIGHT_BACK"] = Void()
|
632
633
|
case 7:
|
633
|
-
|
634
|
+
heater_action_dict["CAR_SEAT_THIRD_ROW_LEFT"] = Void()
|
634
635
|
case 8:
|
635
|
-
|
636
|
+
heater_action_dict["CAR_SEAT_THIRD_ROW_RIGHT"] = Void()
|
637
|
+
case _:
|
638
|
+
raise ValueError(f"Invalid seat position: {seat_position}")
|
636
639
|
match seat_heater_level:
|
637
640
|
case 0:
|
638
|
-
|
641
|
+
heater_action_dict["SEAT_HEATER_OFF"] = Void()
|
639
642
|
case 1:
|
640
|
-
|
643
|
+
heater_action_dict["SEAT_HEATER_LOW"] = Void()
|
641
644
|
case 2:
|
642
|
-
|
645
|
+
heater_action_dict["SEAT_HEATER_MEDIUM"] = Void()
|
643
646
|
case 3:
|
644
|
-
|
647
|
+
heater_action_dict["SEAT_HEATER_HIGH"] = Void()
|
648
|
+
case _:
|
649
|
+
raise ValueError(f"Invalid seat heater level: {seat_heater_level}")
|
645
650
|
|
651
|
+
heater_action = HvacSeatHeaterActions.HvacSeatHeaterAction(**heater_action_dict)
|
646
652
|
return await self._sendInfotainment(
|
647
653
|
Action(
|
648
654
|
vehicleAction=VehicleAction(
|
@@ -7,13 +7,11 @@ from .const import (
|
|
7
7
|
VehicleDataEndpoint,
|
8
8
|
SunRoofCommand,
|
9
9
|
WindowCommand,
|
10
|
-
DeviceType,
|
11
10
|
)
|
12
11
|
|
13
12
|
if TYPE_CHECKING:
|
14
13
|
from .vehicle import Vehicle
|
15
14
|
|
16
|
-
|
17
15
|
class VehicleSpecific:
|
18
16
|
"""Class describing the Tesla Fleet API vehicle endpoints and commands for a specific vehicle."""
|
19
17
|
|
@@ -132,11 +130,11 @@ class VehicleSpecific:
|
|
132
130
|
return await self._parent.navigation_gps_request(self.vin, lat, lon, order)
|
133
131
|
|
134
132
|
async def navigation_request(
|
135
|
-
self, type: str, locale: str, timestamp_ms:
|
133
|
+
self, value: str, type: str = "share_ext_content_raw", locale: str | None = None, timestamp_ms: int | None = None
|
136
134
|
) -> dict[str, Any]:
|
137
135
|
"""Sends a location to the in-vehicle navigation system."""
|
138
136
|
return await self._parent.navigation_request(
|
139
|
-
self.vin, type, locale, timestamp_ms
|
137
|
+
self.vin, value, type, locale, timestamp_ms
|
140
138
|
)
|
141
139
|
|
142
140
|
async def navigation_sc_request(
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: tesla_fleet_api
|
3
|
-
Version: 0.9.
|
3
|
+
Version: 0.9.4
|
4
4
|
Summary: Tesla Fleet API library for Python
|
5
5
|
Home-page: https://github.com/Teslemetry/tesla_fleet_api
|
6
6
|
Author: Brett Adams
|
@@ -21,8 +21,6 @@ Requires-Dist: protobuf
|
|
21
21
|
# Tesla Fleet Api
|
22
22
|
Python library for Tesla Fleet API and Teslemetry.
|
23
23
|
|
24
|
-
Currently does not support the end to end encrypted telemetry or command API.
|
25
|
-
|
26
24
|
Based on [Tesla Developer documentation](https://developer.tesla.com/docs/fleet-api).
|
27
25
|
|
28
26
|
|
@@ -0,0 +1,33 @@
|
|
1
|
+
tesla_fleet_api/__init__.py,sha256=BVZUDsfaxT05tAfcMHHWiyFyXwmDOx_wP_IHZBscgho,729
|
2
|
+
tesla_fleet_api/charging.py,sha256=N_mc8axrXj3iduqLj_jCt4Vx86tHqe3xqQT4R1R7HvU,1689
|
3
|
+
tesla_fleet_api/const.py,sha256=TsAwHFPtgVkE8GPfuAhijcOuurrK71HOZ4mLxGvnaWA,12888
|
4
|
+
tesla_fleet_api/energy.py,sha256=S7D75MPuMVsHgkyUcFfMqjGCLZBM5YVFlWLEHbaX-zw,5957
|
5
|
+
tesla_fleet_api/energyspecific.py,sha256=UfeaGE59aoAa8UhpQCXUi0sOrNCA40xZlqwF73BXTVY,4254
|
6
|
+
tesla_fleet_api/exceptions.py,sha256=KUozIEvZv9Haal6ofRb0SFHQQBe8UH-lEAFVwkJFzW0,20942
|
7
|
+
tesla_fleet_api/partner.py,sha256=1vIBUaxKLIfqcC0X6VXZN0dMAzj_CLNPUMjA6QVqZ1k,1223
|
8
|
+
tesla_fleet_api/ratecalculator.py,sha256=4lz8yruUeouHXh_3ezsXX-CTpIegp1T1J4VuRV_qdHA,1791
|
9
|
+
tesla_fleet_api/teslafleetapi.py,sha256=Ssf3L-pFR-avmkyHQaMt3yoUp9NHFCixgSsBeDSUdds,7430
|
10
|
+
tesla_fleet_api/teslafleetoauth.py,sha256=ClrVh4_lpatW8w44fWM0PZiVB-ciPHr-9h4yw1Zf9w8,4121
|
11
|
+
tesla_fleet_api/teslafleetopensource.py,sha256=TJfVPcqJlA1b3kMoGuLr-g5Gn8UDyYsTZhjvGY1MtIk,2007
|
12
|
+
tesla_fleet_api/teslemetry.py,sha256=IiDxEjDfWdXlpI7qFGW2YwroWoLbUdWSSVM6zCnhQl8,3307
|
13
|
+
tesla_fleet_api/tessie.py,sha256=4dBYxe1G2v9JvJGRbb01wXrAmvWT4jOfV4f_VQE_vkE,2302
|
14
|
+
tesla_fleet_api/user.py,sha256=TZE2oh-n5zrhKXmGRuiNL9voKVODD7rBhGE_IObYVGA,1179
|
15
|
+
tesla_fleet_api/vehicle.py,sha256=e0AotkaI-WftNfxJbLF8peIq3l99f6-ezVSEQbkOD1I,32090
|
16
|
+
tesla_fleet_api/vehiclesigned.py,sha256=HQoZPotFDpUj-gRCzF2Bw-kyXNJGf1204s4jjo3DnTw,39808
|
17
|
+
tesla_fleet_api/vehiclespecific.py,sha256=P7KI8MqUbAyM2cfDC8NqbJXzGL2ZsOIx3IBeqB8xYQY,20656
|
18
|
+
tesla_fleet_api/pb2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
19
|
+
tesla_fleet_api/pb2/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
20
|
+
tesla_fleet_api/pb2/car_server_pb2.py,sha256=I3bq-cbq_4GXZblJatOFtjUny9seZb_1caNWMUciry0,51750
|
21
|
+
tesla_fleet_api/pb2/common_pb2.py,sha256=Iip_uomlO1s6wTyQl2QYxkUdVKB1qqSrpD3MHr-5rl0,6041
|
22
|
+
tesla_fleet_api/pb2/errors_pb2.py,sha256=ESk8GRN-jbsVvPWsWC0WfntmOXfRWVjy3sPT99WL89Q,2149
|
23
|
+
tesla_fleet_api/pb2/keys_pb2.py,sha256=T5q0OMlMiwFJV5xSmn6E2tnLCzr463Rk3pweaLFiPgM,1366
|
24
|
+
tesla_fleet_api/pb2/managed_charging_pb2.py,sha256=g6dJu9sYe9D2BCAWNFUNM_Qr0gJM5AHxmAJikHstQMc,1792
|
25
|
+
tesla_fleet_api/pb2/signatures_pb2.py,sha256=UZCXDYgV-tYIrzVHeqi0NaytUtRZJB-_lC7IVjIbggc,7719
|
26
|
+
tesla_fleet_api/pb2/universal_message_pb2.py,sha256=XF08dOMbhN0F9D4xbaNJhUIAEqbKdK1iYQdZFAloWdk,7826
|
27
|
+
tesla_fleet_api/pb2/vcsec_pb2.py,sha256=CMJ97e4Mm4p7NFcgybbCC2KJRcvtrcqmBy_pGycYhMo,26238
|
28
|
+
tesla_fleet_api/pb2/vehicle_pb2.py,sha256=ViSm74kS3iLjB2C18w-FDZyCkvi2e71GNKVmH2FU8zg,57629
|
29
|
+
tesla_fleet_api-0.9.4.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
30
|
+
tesla_fleet_api-0.9.4.dist-info/METADATA,sha256=y-8imIVlCd0GL1tZtzoeZ7sUbRXkMZa8aSqvF0Hi9G0,3818
|
31
|
+
tesla_fleet_api-0.9.4.dist-info/WHEEL,sha256=A3WOREP4zgxI0fKrHUG8DC8013e3dK3n7a6HDbcEIwE,91
|
32
|
+
tesla_fleet_api-0.9.4.dist-info/top_level.txt,sha256=jeNbog_1saXBFrGpom9WyPWmilxsyP3szL_G7JLWQfM,16
|
33
|
+
tesla_fleet_api-0.9.4.dist-info/RECORD,,
|
@@ -1,32 +0,0 @@
|
|
1
|
-
tesla_fleet_api/__init__.py,sha256=BVZUDsfaxT05tAfcMHHWiyFyXwmDOx_wP_IHZBscgho,729
|
2
|
-
tesla_fleet_api/charging.py,sha256=N_mc8axrXj3iduqLj_jCt4Vx86tHqe3xqQT4R1R7HvU,1689
|
3
|
-
tesla_fleet_api/const.py,sha256=W-OuOboGuDn_txs7Y2eiVZOf8N_3K59hhWynVYEy1HM,12888
|
4
|
-
tesla_fleet_api/energy.py,sha256=S7D75MPuMVsHgkyUcFfMqjGCLZBM5YVFlWLEHbaX-zw,5957
|
5
|
-
tesla_fleet_api/energyspecific.py,sha256=UfeaGE59aoAa8UhpQCXUi0sOrNCA40xZlqwF73BXTVY,4254
|
6
|
-
tesla_fleet_api/exceptions.py,sha256=wteuynQA2OY13IHEsiQHV-WU8BPUCpDDHBaYbRvQlHI,20299
|
7
|
-
tesla_fleet_api/partner.py,sha256=1vIBUaxKLIfqcC0X6VXZN0dMAzj_CLNPUMjA6QVqZ1k,1223
|
8
|
-
tesla_fleet_api/ratecalculator.py,sha256=4lz8yruUeouHXh_3ezsXX-CTpIegp1T1J4VuRV_qdHA,1791
|
9
|
-
tesla_fleet_api/teslafleetapi.py,sha256=4Rnh_HNZkIw54o9SYAaHsA8vY0pmk_bMncrLuJ8MtSk,7389
|
10
|
-
tesla_fleet_api/teslafleetoauth.py,sha256=ClrVh4_lpatW8w44fWM0PZiVB-ciPHr-9h4yw1Zf9w8,4121
|
11
|
-
tesla_fleet_api/teslafleetopensource.py,sha256=TJfVPcqJlA1b3kMoGuLr-g5Gn8UDyYsTZhjvGY1MtIk,2007
|
12
|
-
tesla_fleet_api/teslemetry.py,sha256=l404hRZuZonOAp3x4hgiLfJTM84y9A-hCSoe1vo5c2k,3730
|
13
|
-
tesla_fleet_api/tessie.py,sha256=4dBYxe1G2v9JvJGRbb01wXrAmvWT4jOfV4f_VQE_vkE,2302
|
14
|
-
tesla_fleet_api/user.py,sha256=TZE2oh-n5zrhKXmGRuiNL9voKVODD7rBhGE_IObYVGA,1179
|
15
|
-
tesla_fleet_api/vehicle.py,sha256=rEaLBWK5Vd9K-SFnMy5jFEQK-6wxpVsyY1AJ-nmHm7c,31765
|
16
|
-
tesla_fleet_api/vehiclesigned.py,sha256=_U0z6X1PTvZdCWblXRrEwUUexi4eUPVXGZzxrmTqA1I,39296
|
17
|
-
tesla_fleet_api/vehiclespecific.py,sha256=Nr4zZzfmIuw3RFYjQEX6c_xtYZgztMsN5ohVn-YEH0I,20600
|
18
|
-
tesla_fleet_api/pb2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
19
|
-
tesla_fleet_api/pb2/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
20
|
-
tesla_fleet_api/pb2/car_server_pb2.py,sha256=kRNoZFFRfYx6T-8HOH9gvIhOgKCXWjvdgQfNLBA-g9w,45026
|
21
|
-
tesla_fleet_api/pb2/common_pb2.py,sha256=qkRGyMbzzThzJpWiGjfa86BZvcWTbuaFE6OuVtG9jM0,4474
|
22
|
-
tesla_fleet_api/pb2/errors_pb2.py,sha256=ESk8GRN-jbsVvPWsWC0WfntmOXfRWVjy3sPT99WL89Q,2149
|
23
|
-
tesla_fleet_api/pb2/keys_pb2.py,sha256=T5q0OMlMiwFJV5xSmn6E2tnLCzr463Rk3pweaLFiPgM,1366
|
24
|
-
tesla_fleet_api/pb2/signatures_pb2.py,sha256=5mdJUC8EC8kx1UxYrHK5XI3_7M6v7w2POH12EyCbWkc,6798
|
25
|
-
tesla_fleet_api/pb2/universal_message_pb2.py,sha256=F6-SkYXSuzWDsBvnGMg9k2pAIZv13v609qCPx7NSrdw,7254
|
26
|
-
tesla_fleet_api/pb2/vcsec_pb2.py,sha256=CMJ97e4Mm4p7NFcgybbCC2KJRcvtrcqmBy_pGycYhMo,26238
|
27
|
-
tesla_fleet_api/pb2/vehicle_pb2.py,sha256=P1V7Dqg3BBGZwODxTpZqtxLP6fGS_FNBqJcz_Fp0crs,2482
|
28
|
-
tesla_fleet_api-0.9.2.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
29
|
-
tesla_fleet_api-0.9.2.dist-info/METADATA,sha256=dfS0s3a2F8n8QmnEDHsxLrZuH2dXvMUsrPVHLZ2L0Xc,3897
|
30
|
-
tesla_fleet_api-0.9.2.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
31
|
-
tesla_fleet_api-0.9.2.dist-info/top_level.txt,sha256=jeNbog_1saXBFrGpom9WyPWmilxsyP3szL_G7JLWQfM,16
|
32
|
-
tesla_fleet_api-0.9.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|