tesla-fleet-api 0.9.3__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 CHANGED
@@ -3,7 +3,7 @@
3
3
  from enum import Enum
4
4
  import logging
5
5
 
6
- VERSION = "0.9.3"
6
+ VERSION = "0.9.4"
7
7
  LOGGER = logging.getLogger(__package__)
8
8
  SERVERS = {
9
9
  "na": "https://fleet-api.prd.na.vn.cloud.tesla.com",
@@ -318,6 +318,18 @@ class UnknownFault(TeslaFleetInformationFault):
318
318
  message = "Unknown fault on signed command."
319
319
  code = 1
320
320
 
321
+ class NotOnWhitelistFault(TeslaFleetInformationFault):
322
+ """Not on whitelist fault on signed command."""
323
+
324
+ message = "Not on whitelist fault on signed command."
325
+ code = 2
326
+
327
+ class IVSmallerThanExpectedFault(TeslaFleetInformationFault):
328
+ """IV smaller than expected fault on signed command."""
329
+
330
+ message = "IV smaller than expected fault on signed command."
331
+ code = 3
332
+
321
333
  class InvalidTokenFault(TeslaFleetInformationFault):
322
334
  """Invalid token fault on signed command."""
323
335
 
@@ -184,9 +184,10 @@ class VehicleSigned(VehicleSpecific):
184
184
  resp = RoutableMessage()
185
185
  resp.ParseFromString(base64.b64decode(resp_json["response"]))
186
186
 
187
- LOGGER.error(resp.signedMessageStatus)
188
- if resp.signedMessageStatus.operation_status == OPERATIONSTATUS_ERROR:
189
- raise MESSAGE_FAULTS[resp.signedMessageStatus.signed_message_fault]
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": ""}}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tesla_fleet_api
3
- Version: 0.9.3
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
 
@@ -1,9 +1,9 @@
1
1
  tesla_fleet_api/__init__.py,sha256=BVZUDsfaxT05tAfcMHHWiyFyXwmDOx_wP_IHZBscgho,729
2
2
  tesla_fleet_api/charging.py,sha256=N_mc8axrXj3iduqLj_jCt4Vx86tHqe3xqQT4R1R7HvU,1689
3
- tesla_fleet_api/const.py,sha256=ISCEtC7C99sNuZ6EY6dm0gaE5TWqdAy6eO2_uACmhkw,12888
3
+ tesla_fleet_api/const.py,sha256=TsAwHFPtgVkE8GPfuAhijcOuurrK71HOZ4mLxGvnaWA,12888
4
4
  tesla_fleet_api/energy.py,sha256=S7D75MPuMVsHgkyUcFfMqjGCLZBM5YVFlWLEHbaX-zw,5957
5
5
  tesla_fleet_api/energyspecific.py,sha256=UfeaGE59aoAa8UhpQCXUi0sOrNCA40xZlqwF73BXTVY,4254
6
- tesla_fleet_api/exceptions.py,sha256=hyPo5tmghAvsRLnv6eGwBvlj3B6uqE8S1DHP6lBGQ2M,20559
6
+ tesla_fleet_api/exceptions.py,sha256=KUozIEvZv9Haal6ofRb0SFHQQBe8UH-lEAFVwkJFzW0,20942
7
7
  tesla_fleet_api/partner.py,sha256=1vIBUaxKLIfqcC0X6VXZN0dMAzj_CLNPUMjA6QVqZ1k,1223
8
8
  tesla_fleet_api/ratecalculator.py,sha256=4lz8yruUeouHXh_3ezsXX-CTpIegp1T1J4VuRV_qdHA,1791
9
9
  tesla_fleet_api/teslafleetapi.py,sha256=Ssf3L-pFR-avmkyHQaMt3yoUp9NHFCixgSsBeDSUdds,7430
@@ -13,7 +13,7 @@ tesla_fleet_api/teslemetry.py,sha256=IiDxEjDfWdXlpI7qFGW2YwroWoLbUdWSSVM6zCnhQl8
13
13
  tesla_fleet_api/tessie.py,sha256=4dBYxe1G2v9JvJGRbb01wXrAmvWT4jOfV4f_VQE_vkE,2302
14
14
  tesla_fleet_api/user.py,sha256=TZE2oh-n5zrhKXmGRuiNL9voKVODD7rBhGE_IObYVGA,1179
15
15
  tesla_fleet_api/vehicle.py,sha256=e0AotkaI-WftNfxJbLF8peIq3l99f6-ezVSEQbkOD1I,32090
16
- tesla_fleet_api/vehiclesigned.py,sha256=gbkQY6b_kwNxONWOG4aHkO-puWqXGl0PsNKyzEcD7yU,39652
16
+ tesla_fleet_api/vehiclesigned.py,sha256=HQoZPotFDpUj-gRCzF2Bw-kyXNJGf1204s4jjo3DnTw,39808
17
17
  tesla_fleet_api/vehiclespecific.py,sha256=P7KI8MqUbAyM2cfDC8NqbJXzGL2ZsOIx3IBeqB8xYQY,20656
18
18
  tesla_fleet_api/pb2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
19
  tesla_fleet_api/pb2/__init__.pyi,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -26,8 +26,8 @@ tesla_fleet_api/pb2/signatures_pb2.py,sha256=UZCXDYgV-tYIrzVHeqi0NaytUtRZJB-_lC7
26
26
  tesla_fleet_api/pb2/universal_message_pb2.py,sha256=XF08dOMbhN0F9D4xbaNJhUIAEqbKdK1iYQdZFAloWdk,7826
27
27
  tesla_fleet_api/pb2/vcsec_pb2.py,sha256=CMJ97e4Mm4p7NFcgybbCC2KJRcvtrcqmBy_pGycYhMo,26238
28
28
  tesla_fleet_api/pb2/vehicle_pb2.py,sha256=ViSm74kS3iLjB2C18w-FDZyCkvi2e71GNKVmH2FU8zg,57629
29
- tesla_fleet_api-0.9.3.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
30
- tesla_fleet_api-0.9.3.dist-info/METADATA,sha256=ZMb9GVIa94cplQKjzKdMd1mE1toABc6Vs-IFZo9mi-s,3897
31
- tesla_fleet_api-0.9.3.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
32
- tesla_fleet_api-0.9.3.dist-info/top_level.txt,sha256=jeNbog_1saXBFrGpom9WyPWmilxsyP3szL_G7JLWQfM,16
33
- tesla_fleet_api-0.9.3.dist-info/RECORD,,
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,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.6.0)
2
+ Generator: setuptools (75.7.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5