hyundai-kia-connect-api 3.25.0__py2.py3-none-any.whl → 3.27.0__py2.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.
Potentially problematic release.
This version of hyundai-kia-connect-api might be problematic. Click here for more details.
- hyundai_kia_connect_api/ApiImpl.py +20 -2
- hyundai_kia_connect_api/HyundaiBlueLinkAPIUSA.py +3 -0
- hyundai_kia_connect_api/KiaUvoApiEU.py +16 -0
- hyundai_kia_connect_api/Vehicle.py +3 -1
- hyundai_kia_connect_api/VehicleManager.py +13 -2
- hyundai_kia_connect_api/const.py +5 -0
- {hyundai_kia_connect_api-3.25.0.dist-info → hyundai_kia_connect_api-3.27.0.dist-info}/METADATA +1 -1
- {hyundai_kia_connect_api-3.25.0.dist-info → hyundai_kia_connect_api-3.27.0.dist-info}/RECORD +12 -12
- {hyundai_kia_connect_api-3.25.0.dist-info → hyundai_kia_connect_api-3.27.0.dist-info}/AUTHORS.rst +0 -0
- {hyundai_kia_connect_api-3.25.0.dist-info → hyundai_kia_connect_api-3.27.0.dist-info}/LICENSE +0 -0
- {hyundai_kia_connect_api-3.25.0.dist-info → hyundai_kia_connect_api-3.27.0.dist-info}/WHEEL +0 -0
- {hyundai_kia_connect_api-3.25.0.dist-info → hyundai_kia_connect_api-3.27.0.dist-info}/top_level.txt +0 -0
@@ -10,7 +10,14 @@ import requests
|
|
10
10
|
from requests.exceptions import JSONDecodeError
|
11
11
|
from .Token import Token
|
12
12
|
from .Vehicle import Vehicle
|
13
|
-
from .const import
|
13
|
+
from .const import (
|
14
|
+
WINDOW_STATE,
|
15
|
+
CHARGE_PORT_ACTION,
|
16
|
+
OrderStatus,
|
17
|
+
DOMAIN,
|
18
|
+
VALET_MODE_ACTION,
|
19
|
+
VEHICLE_LOCK_ACTION,
|
20
|
+
)
|
14
21
|
from .utils import get_child_value
|
15
22
|
|
16
23
|
_LOGGER = logging.getLogger(__name__)
|
@@ -128,7 +135,9 @@ class ApiImpl:
|
|
128
135
|
get_child_value(response, "address"),
|
129
136
|
)
|
130
137
|
|
131
|
-
def lock_action(
|
138
|
+
def lock_action(
|
139
|
+
self, token: Token, vehicle: Vehicle, action: VEHICLE_LOCK_ACTION
|
140
|
+
) -> str:
|
132
141
|
"""Lock or unlocks a vehicle. Returns the tracking ID"""
|
133
142
|
pass
|
134
143
|
|
@@ -220,3 +229,12 @@ class ApiImpl:
|
|
220
229
|
def start_hazard_lights_and_horn(self, token: Token, vehicle: Vehicle) -> str:
|
221
230
|
"""Turns on the hazard lights and horn for 30 seconds"""
|
222
231
|
pass
|
232
|
+
|
233
|
+
def valet_mode_action(
|
234
|
+
self, token: Token, vehicle: Vehicle, action: VALET_MODE_ACTION
|
235
|
+
) -> str:
|
236
|
+
"""
|
237
|
+
feature only available for some regions.
|
238
|
+
Activate or Deactivate valet mode. Returns the tracking ID
|
239
|
+
"""
|
240
|
+
pass
|
@@ -386,6 +386,9 @@ class HyundaiBlueLinkAPIUSA(ApiImpl):
|
|
386
386
|
vehicle.ev_battery_is_plugged_in = get_child_value(
|
387
387
|
state, "vehicleStatus.evStatus.batteryPlugin"
|
388
388
|
)
|
389
|
+
vehicle.ev_charging_current = get_child_value(
|
390
|
+
state, "vehicleStatus.evStatus.batteryStndChrgPower"
|
391
|
+
)
|
389
392
|
ChargeDict = get_child_value(
|
390
393
|
state, "vehicleStatus.evStatus.reservChargeInfos.targetSOClist"
|
391
394
|
)
|
@@ -45,6 +45,7 @@ from .const import (
|
|
45
45
|
SEAT_STATUS,
|
46
46
|
TEMPERATURE_UNITS,
|
47
47
|
VEHICLE_LOCK_ACTION,
|
48
|
+
VALET_MODE_ACTION,
|
48
49
|
)
|
49
50
|
from .exceptions import (
|
50
51
|
AuthenticationError,
|
@@ -1435,6 +1436,21 @@ class KiaUvoApiEU(ApiImplType1):
|
|
1435
1436
|
token.device_id = self._get_device_id(self._get_stamp())
|
1436
1437
|
return response["msgId"]
|
1437
1438
|
|
1439
|
+
def valet_mode_action(
|
1440
|
+
self, token: Token, vehicle: Vehicle, action: VALET_MODE_ACTION
|
1441
|
+
) -> str:
|
1442
|
+
url = self.SPA_API_URL_V2 + "vehicles/" + vehicle.id + "/control/valet"
|
1443
|
+
|
1444
|
+
payload = {"action": action.value}
|
1445
|
+
_LOGGER.debug(f"{DOMAIN} - Valet Mode Action Request: {payload}")
|
1446
|
+
response = requests.post(
|
1447
|
+
url, json=payload, headers=self._get_control_headers(token, vehicle)
|
1448
|
+
).json()
|
1449
|
+
_LOGGER.debug(f"{DOMAIN} - Valet Mode Action Response: {response}")
|
1450
|
+
_check_response_for_errors(response)
|
1451
|
+
token.device_id = self._get_device_id(self._get_stamp())
|
1452
|
+
return response["msgId"]
|
1453
|
+
|
1438
1454
|
def _get_stamp(self) -> str:
|
1439
1455
|
raw_data = f"{self.APP_ID}:{int(dt.datetime.now().timestamp())}".encode()
|
1440
1456
|
result = bytes(b1 ^ b2 for b1, b2 in zip(self.CFB, raw_data))
|
@@ -159,7 +159,9 @@ class Vehicle:
|
|
159
159
|
|
160
160
|
ev_charge_limits_dc: typing.Union[int, None] = None
|
161
161
|
ev_charge_limits_ac: typing.Union[int, None] = None
|
162
|
-
ev_charging_current: typing.Union[int, None] =
|
162
|
+
ev_charging_current: typing.Union[int, None] = (
|
163
|
+
None # Only supported in some regions
|
164
|
+
)
|
163
165
|
ev_v2l_discharge_limit: typing.Union[int, None] = None
|
164
166
|
|
165
167
|
# energy consumed and regenerated since the vehicle was paired with the account
|
@@ -37,6 +37,7 @@ from .const import (
|
|
37
37
|
VEHICLE_LOCK_ACTION,
|
38
38
|
CHARGE_PORT_ACTION,
|
39
39
|
OrderStatus,
|
40
|
+
VALET_MODE_ACTION,
|
40
41
|
)
|
41
42
|
|
42
43
|
_LOGGER = logging.getLogger(__name__)
|
@@ -257,11 +258,21 @@ class VehicleManager:
|
|
257
258
|
|
258
259
|
def schedule_charging_and_climate(
|
259
260
|
self, vehicle_id: str, options: ScheduleChargingClimateRequestOptions
|
260
|
-
) ->
|
261
|
-
self.api.schedule_charging_and_climate(
|
261
|
+
) -> str:
|
262
|
+
return self.api.schedule_charging_and_climate(
|
262
263
|
self.token, self.get_vehicle(vehicle_id), options
|
263
264
|
)
|
264
265
|
|
266
|
+
def start_valet_mode(self, vehicle_id: str) -> str:
|
267
|
+
return self.api.valet_mode_action(
|
268
|
+
self.token, self.get_vehicle(vehicle_id), VALET_MODE_ACTION.ACTIVATE
|
269
|
+
)
|
270
|
+
|
271
|
+
def stop_valet_mode(self, vehicle_id: str) -> str:
|
272
|
+
return self.api.valet_mode_action(
|
273
|
+
self.token, self.get_vehicle(vehicle_id), VALET_MODE_ACTION.DEACTIVATE
|
274
|
+
)
|
275
|
+
|
265
276
|
@staticmethod
|
266
277
|
def get_implementation_by_region_brand(
|
267
278
|
region: int, brand: int, language: str
|
hyundai_kia_connect_api/const.py
CHANGED
{hyundai_kia_connect_api-3.25.0.dist-info → hyundai_kia_connect_api-3.27.0.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: hyundai_kia_connect_api
|
3
|
-
Version: 3.
|
3
|
+
Version: 3.27.0
|
4
4
|
Summary: Python Boilerplate contains all the boilerplate you need to create a Python package.
|
5
5
|
Home-page: https://github.com/Hyundai-Kia-Connect/hyundai_kia_connect_api
|
6
6
|
Author: Fuat Akgun
|
{hyundai_kia_connect_api-3.25.0.dist-info → hyundai_kia_connect_api-3.27.0.dist-info}/RECORD
RENAMED
@@ -1,21 +1,21 @@
|
|
1
|
-
hyundai_kia_connect_api/ApiImpl.py,sha256=
|
1
|
+
hyundai_kia_connect_api/ApiImpl.py,sha256=9DoAtk8-pE0WaLzRTM7uydkUoxS_Almcooeonp7vTQE,7538
|
2
2
|
hyundai_kia_connect_api/ApiImplType1.py,sha256=PnKwpbCoYGOXBWzBLIlDSrC6daIYeW9qlfW7TM4HCU0,12184
|
3
|
-
hyundai_kia_connect_api/HyundaiBlueLinkAPIUSA.py,sha256=
|
3
|
+
hyundai_kia_connect_api/HyundaiBlueLinkAPIUSA.py,sha256=FqsU3R938nK-jVDkajs_niutXW_eoGNCLdsLhdNbx8c,36820
|
4
4
|
hyundai_kia_connect_api/KiaUvoAPIUSA.py,sha256=LbEh7EM19kpvhwPSMpEYIHVNUSOJsuvNjcXJzyc_P8A,31338
|
5
5
|
hyundai_kia_connect_api/KiaUvoApiAU.py,sha256=tslh0gzvPBwYJmcWlf9B0l7PyYZdy2e7GqpRkl8_Svk,48471
|
6
6
|
hyundai_kia_connect_api/KiaUvoApiCA.py,sha256=B3Lks_ONr3l01QLl-GQBPdktXj9PZWKuQKRLYmJ7kP4,30763
|
7
7
|
hyundai_kia_connect_api/KiaUvoApiCN.py,sha256=cwIPZ0dU6HolKdooUQeQKlLAic6YU8dQmNs0VQDBgpQ,47035
|
8
|
-
hyundai_kia_connect_api/KiaUvoApiEU.py,sha256=
|
8
|
+
hyundai_kia_connect_api/KiaUvoApiEU.py,sha256=9KFtTYfBi7fyWABhFCVcKhqV6pWD7p-Wg9lvdfJso4E,70273
|
9
9
|
hyundai_kia_connect_api/Token.py,sha256=ZsPvXh1ID7FUTGHAqhZUZyrKT7xVbOtIn6FRJn4Ygf0,370
|
10
|
-
hyundai_kia_connect_api/Vehicle.py,sha256=
|
11
|
-
hyundai_kia_connect_api/VehicleManager.py,sha256=
|
10
|
+
hyundai_kia_connect_api/Vehicle.py,sha256=rJOob5q79hxAXx3IByPYkS0gS86NR5oQG8P4oW6LWQI,18666
|
11
|
+
hyundai_kia_connect_api/VehicleManager.py,sha256=BfDdfLVSw04FvCv_sQweqOg_kPO6xD884XwAuPGKmTY,10940
|
12
12
|
hyundai_kia_connect_api/__init__.py,sha256=IkyVeIMbcFJZgLaiiNnUVA1Ferxvrm1bXHKVg01cxvc,319
|
13
|
-
hyundai_kia_connect_api/const.py,sha256=
|
13
|
+
hyundai_kia_connect_api/const.py,sha256=HE0_1_be4ERB73vsekWxv6TDWd8cvAgY1oPZojUrcwM,2096
|
14
14
|
hyundai_kia_connect_api/exceptions.py,sha256=m7gyDnvA5OVAK4EXSP_ZwE0s0uV8HsGUV0tiYwqofK0,1343
|
15
15
|
hyundai_kia_connect_api/utils.py,sha256=J0aXUX-nKIoS3XbelatNh-DZlHRU2_DYz_Mg_ZUKQJU,1957
|
16
|
-
hyundai_kia_connect_api-3.
|
17
|
-
hyundai_kia_connect_api-3.
|
18
|
-
hyundai_kia_connect_api-3.
|
19
|
-
hyundai_kia_connect_api-3.
|
20
|
-
hyundai_kia_connect_api-3.
|
21
|
-
hyundai_kia_connect_api-3.
|
16
|
+
hyundai_kia_connect_api-3.27.0.dist-info/AUTHORS.rst,sha256=T77OE1hrQF6YyDE6NbdMKyL66inHt7dnjHAzblwuk2A,155
|
17
|
+
hyundai_kia_connect_api-3.27.0.dist-info/LICENSE,sha256=49hmc755oyMwKdZ-2epiorjStRB0PfcZR1w5_NXZPgs,1068
|
18
|
+
hyundai_kia_connect_api-3.27.0.dist-info/METADATA,sha256=b8GAEqB4qSC-K3WLRl5FtWbN4Tyze_p3CtUKWXJgY-Q,6142
|
19
|
+
hyundai_kia_connect_api-3.27.0.dist-info/WHEEL,sha256=OpXWERl2xLPRHTvd2ZXo_iluPEQd8uSbYkJ53NAER_Y,109
|
20
|
+
hyundai_kia_connect_api-3.27.0.dist-info/top_level.txt,sha256=otZ7J_fN-s3EW4jD-kAearIo2OIzhQLR8DNEHIaFfds,24
|
21
|
+
hyundai_kia_connect_api-3.27.0.dist-info/RECORD,,
|
{hyundai_kia_connect_api-3.25.0.dist-info → hyundai_kia_connect_api-3.27.0.dist-info}/AUTHORS.rst
RENAMED
File without changes
|
{hyundai_kia_connect_api-3.25.0.dist-info → hyundai_kia_connect_api-3.27.0.dist-info}/LICENSE
RENAMED
File without changes
|
File without changes
|
{hyundai_kia_connect_api-3.25.0.dist-info → hyundai_kia_connect_api-3.27.0.dist-info}/top_level.txt
RENAMED
File without changes
|