hyundai-kia-connect-api 3.24.3__py2.py3-none-any.whl → 3.26.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 +28 -2
- hyundai_kia_connect_api/KiaUvoApiEU.py +46 -0
- hyundai_kia_connect_api/VehicleManager.py +21 -2
- hyundai_kia_connect_api/const.py +5 -0
- {hyundai_kia_connect_api-3.24.3.dist-info → hyundai_kia_connect_api-3.26.0.dist-info}/METADATA +1 -1
- {hyundai_kia_connect_api-3.24.3.dist-info → hyundai_kia_connect_api-3.26.0.dist-info}/RECORD +10 -10
- {hyundai_kia_connect_api-3.24.3.dist-info → hyundai_kia_connect_api-3.26.0.dist-info}/AUTHORS.rst +0 -0
- {hyundai_kia_connect_api-3.24.3.dist-info → hyundai_kia_connect_api-3.26.0.dist-info}/LICENSE +0 -0
- {hyundai_kia_connect_api-3.24.3.dist-info → hyundai_kia_connect_api-3.26.0.dist-info}/WHEEL +0 -0
- {hyundai_kia_connect_api-3.24.3.dist-info → hyundai_kia_connect_api-3.26.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
|
|
@@ -212,3 +221,20 @@ class ApiImpl:
|
|
212
221
|
Schedule charging and climate control. Returns the tracking ID
|
213
222
|
"""
|
214
223
|
pass
|
224
|
+
|
225
|
+
def start_hazard_lights(self, token: Token, vehicle: Vehicle) -> str:
|
226
|
+
"""Turns on the hazard lights for 30 seconds"""
|
227
|
+
pass
|
228
|
+
|
229
|
+
def start_hazard_lights_and_horn(self, token: Token, vehicle: Vehicle) -> str:
|
230
|
+
"""Turns on the hazard lights and horn for 30 seconds"""
|
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
|
@@ -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,
|
@@ -1035,6 +1036,36 @@ class KiaUvoApiEU(ApiImplType1):
|
|
1035
1036
|
token.device_id = self._get_device_id(self._get_stamp())
|
1036
1037
|
return response["msgId"]
|
1037
1038
|
|
1039
|
+
def start_hazard_lights(self, token: Token, vehicle: Vehicle) -> str:
|
1040
|
+
url = self.SPA_API_URL_V2 + "vehicles/" + vehicle.id + "/ccs2/control/light"
|
1041
|
+
|
1042
|
+
payload = {"command": "on"}
|
1043
|
+
_LOGGER.debug(f"{DOMAIN} - Start Hazard Lights Request: {payload}")
|
1044
|
+
response = requests.post(
|
1045
|
+
url,
|
1046
|
+
json=payload,
|
1047
|
+
headers=self._get_control_headers(token, vehicle),
|
1048
|
+
).json()
|
1049
|
+
_LOGGER.debug(f"{DOMAIN} - Start Hazard Lights Response: {response}")
|
1050
|
+
_check_response_for_errors(response)
|
1051
|
+
token.device_id = self._get_device_id(self._get_stamp())
|
1052
|
+
return response["msgId"]
|
1053
|
+
|
1054
|
+
def start_hazard_lights_and_horn(self, token: Token, vehicle: Vehicle) -> str:
|
1055
|
+
url = self.SPA_API_URL_V2 + "vehicles/" + vehicle.id + "/ccs2/control/hornlight"
|
1056
|
+
|
1057
|
+
payload = {"command": "on"}
|
1058
|
+
_LOGGER.debug(f"{DOMAIN} - Start Hazard Lights and Horn Request: {payload}")
|
1059
|
+
response = requests.post(
|
1060
|
+
url,
|
1061
|
+
json=payload,
|
1062
|
+
headers=self._get_control_headers(token, vehicle),
|
1063
|
+
).json()
|
1064
|
+
_LOGGER.debug(f"{DOMAIN} - Start Hazard Lights and Horn Response: {response}")
|
1065
|
+
_check_response_for_errors(response)
|
1066
|
+
token.device_id = self._get_device_id(self._get_stamp())
|
1067
|
+
return response["msgId"]
|
1068
|
+
|
1038
1069
|
def _get_charge_limits(self, token: Token, vehicle: Vehicle) -> dict:
|
1039
1070
|
# Not currently used as value is in the general get.
|
1040
1071
|
# Most likely this forces the car the update it.
|
@@ -1405,6 +1436,21 @@ class KiaUvoApiEU(ApiImplType1):
|
|
1405
1436
|
token.device_id = self._get_device_id(self._get_stamp())
|
1406
1437
|
return response["msgId"]
|
1407
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
|
+
|
1408
1454
|
def _get_stamp(self) -> str:
|
1409
1455
|
raw_data = f"{self.APP_ID}:{int(dt.datetime.now().timestamp())}".encode()
|
1410
1456
|
result = bytes(b1 ^ b2 for b1, b2 in zip(self.CFB, raw_data))
|
@@ -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__)
|
@@ -160,6 +161,14 @@ class VehicleManager:
|
|
160
161
|
def stop_charge(self, vehicle_id: str) -> str:
|
161
162
|
return self.api.stop_charge(self.token, self.get_vehicle(vehicle_id))
|
162
163
|
|
164
|
+
def start_hazard_lights(self, vehicle_id: str) -> str:
|
165
|
+
return self.api.start_hazard_lights(self.token, self.get_vehicle(vehicle_id))
|
166
|
+
|
167
|
+
def start_hazard_lights_and_horn(self, vehicle_id: str) -> str:
|
168
|
+
return self.api.start_hazard_lights_and_horn(
|
169
|
+
self.token, self.get_vehicle(vehicle_id)
|
170
|
+
)
|
171
|
+
|
163
172
|
def set_charge_limits(self, vehicle_id: str, ac: int, dc: int) -> str:
|
164
173
|
return self.api.set_charge_limits(
|
165
174
|
self.token, self.get_vehicle(vehicle_id), ac, dc
|
@@ -249,11 +258,21 @@ class VehicleManager:
|
|
249
258
|
|
250
259
|
def schedule_charging_and_climate(
|
251
260
|
self, vehicle_id: str, options: ScheduleChargingClimateRequestOptions
|
252
|
-
) ->
|
253
|
-
self.api.schedule_charging_and_climate(
|
261
|
+
) -> str:
|
262
|
+
return self.api.schedule_charging_and_climate(
|
254
263
|
self.token, self.get_vehicle(vehicle_id), options
|
255
264
|
)
|
256
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
|
+
|
257
276
|
@staticmethod
|
258
277
|
def get_implementation_by_region_brand(
|
259
278
|
region: int, brand: int, language: str
|
hyundai_kia_connect_api/const.py
CHANGED
{hyundai_kia_connect_api-3.24.3.dist-info → hyundai_kia_connect_api-3.26.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.26.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.24.3.dist-info → hyundai_kia_connect_api-3.26.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
3
|
hyundai_kia_connect_api/HyundaiBlueLinkAPIUSA.py,sha256=MK1cFcnuZebogz32-nXjHt0pAgQ1-2lrurw8SADX6ww,36690
|
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
10
|
hyundai_kia_connect_api/Vehicle.py,sha256=M95Eq1vK-th5se7dZHEDcTOM1b19GIjpecyw2MKykQ8,18639
|
11
|
-
hyundai_kia_connect_api/VehicleManager.py,sha256=
|
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.26.0.dist-info/AUTHORS.rst,sha256=T77OE1hrQF6YyDE6NbdMKyL66inHt7dnjHAzblwuk2A,155
|
17
|
+
hyundai_kia_connect_api-3.26.0.dist-info/LICENSE,sha256=49hmc755oyMwKdZ-2epiorjStRB0PfcZR1w5_NXZPgs,1068
|
18
|
+
hyundai_kia_connect_api-3.26.0.dist-info/METADATA,sha256=qi646hb4PcmmU61YBCPsJt578fe5vzoAw9iMWPnxzT4,6142
|
19
|
+
hyundai_kia_connect_api-3.26.0.dist-info/WHEEL,sha256=OpXWERl2xLPRHTvd2ZXo_iluPEQd8uSbYkJ53NAER_Y,109
|
20
|
+
hyundai_kia_connect_api-3.26.0.dist-info/top_level.txt,sha256=otZ7J_fN-s3EW4jD-kAearIo2OIzhQLR8DNEHIaFfds,24
|
21
|
+
hyundai_kia_connect_api-3.26.0.dist-info/RECORD,,
|
{hyundai_kia_connect_api-3.24.3.dist-info → hyundai_kia_connect_api-3.26.0.dist-info}/AUTHORS.rst
RENAMED
File without changes
|
{hyundai_kia_connect_api-3.24.3.dist-info → hyundai_kia_connect_api-3.26.0.dist-info}/LICENSE
RENAMED
File without changes
|
File without changes
|
{hyundai_kia_connect_api-3.24.3.dist-info → hyundai_kia_connect_api-3.26.0.dist-info}/top_level.txt
RENAMED
File without changes
|