hyundai-kia-connect-api 3.33.1__py2.py3-none-any.whl → 3.33.2__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.
- hyundai_kia_connect_api/ApiImplType1.py +10 -0
- hyundai_kia_connect_api/KiaUvoApiAU.py +6 -14
- hyundai_kia_connect_api/KiaUvoApiEU.py +0 -10
- {hyundai_kia_connect_api-3.33.1.dist-info → hyundai_kia_connect_api-3.33.2.dist-info}/METADATA +1 -1
- {hyundai_kia_connect_api-3.33.1.dist-info → hyundai_kia_connect_api-3.33.2.dist-info}/RECORD +10 -10
- {hyundai_kia_connect_api-3.33.1.dist-info → hyundai_kia_connect_api-3.33.2.dist-info}/WHEEL +0 -0
- {hyundai_kia_connect_api-3.33.1.dist-info → hyundai_kia_connect_api-3.33.2.dist-info}/entry_points.txt +0 -0
- {hyundai_kia_connect_api-3.33.1.dist-info → hyundai_kia_connect_api-3.33.2.dist-info}/licenses/AUTHORS.rst +0 -0
- {hyundai_kia_connect_api-3.33.1.dist-info → hyundai_kia_connect_api-3.33.2.dist-info}/licenses/LICENSE +0 -0
- {hyundai_kia_connect_api-3.33.1.dist-info → hyundai_kia_connect_api-3.33.2.dist-info}/top_level.txt +0 -0
@@ -104,6 +104,16 @@ class ApiImplType1(ApiImpl):
|
|
104
104
|
"User-Agent": USER_AGENT_OK_HTTP,
|
105
105
|
}
|
106
106
|
|
107
|
+
def _get_control_headers(self, token: Token, vehicle: Vehicle) -> dict:
|
108
|
+
control_token, _ = self._get_control_token(token)
|
109
|
+
authenticated_headers = self._get_authenticated_headers(
|
110
|
+
token, vehicle.ccu_ccs2_protocol_support
|
111
|
+
)
|
112
|
+
return authenticated_headers | {
|
113
|
+
"Authorization": control_token,
|
114
|
+
"AuthorizationCCSP": control_token,
|
115
|
+
}
|
116
|
+
|
107
117
|
def _update_vehicle_properties_ccs2(self, vehicle: Vehicle, state: dict) -> None:
|
108
118
|
if get_child_value(state, "Date"):
|
109
119
|
vehicle.last_updated_at = parse_datetime(
|
@@ -82,14 +82,6 @@ class KiaUvoApiAU(ApiImplType1):
|
|
82
82
|
self.SPA_API_URL_V2: str = "https://" + self.BASE_URL + "/api/v2/spa/"
|
83
83
|
self.CLIENT_ID: str = self.CCSP_SERVICE_ID
|
84
84
|
|
85
|
-
def _get_control_headers(self, token: Token) -> dict:
|
86
|
-
control_token, _ = self._get_control_token(token)
|
87
|
-
authenticated_headers = self._get_authenticated_headers(token)
|
88
|
-
return authenticated_headers | {
|
89
|
-
"Authorization": control_token,
|
90
|
-
"AuthorizationCCSP": control_token,
|
91
|
-
}
|
92
|
-
|
93
85
|
def login(self, username: str, password: str) -> Token:
|
94
86
|
stamp = self._get_stamp()
|
95
87
|
device_id = self._get_device_id(stamp)
|
@@ -647,7 +639,7 @@ class KiaUvoApiAU(ApiImplType1):
|
|
647
639
|
payload = {"action": action.value, "deviceId": token.device_id}
|
648
640
|
_LOGGER.debug(f"{DOMAIN} - Lock Action Request: {payload}")
|
649
641
|
response = requests.post(
|
650
|
-
url, json=payload, headers=self._get_control_headers(token)
|
642
|
+
url, json=payload, headers=self._get_control_headers(token, vehicle)
|
651
643
|
).json()
|
652
644
|
_LOGGER.debug(f"{DOMAIN} - Lock Action Response: {response}")
|
653
645
|
_check_response_for_errors(response)
|
@@ -666,7 +658,7 @@ class KiaUvoApiAU(ApiImplType1):
|
|
666
658
|
}
|
667
659
|
_LOGGER.debug(f"{DOMAIN} - Window State Action Request: {payload}")
|
668
660
|
response = requests.post(
|
669
|
-
url, json=payload, headers=self._get_control_headers(token)
|
661
|
+
url, json=payload, headers=self._get_control_headers(token, vehicle)
|
670
662
|
).json()
|
671
663
|
_LOGGER.debug(f"{DOMAIN} - Window State Action Response: {response}")
|
672
664
|
_check_response_for_errors(response)
|
@@ -681,7 +673,7 @@ class KiaUvoApiAU(ApiImplType1):
|
|
681
673
|
payload = {"action": action.value, "deviceId": token.device_id}
|
682
674
|
_LOGGER.debug(f"{DOMAIN} - Charge Port Action Request: {payload}")
|
683
675
|
response = requests.post(
|
684
|
-
url, json=payload, headers=self._get_control_headers(token)
|
676
|
+
url, json=payload, headers=self._get_control_headers(token, vehicle)
|
685
677
|
).json()
|
686
678
|
_LOGGER.debug(f"{DOMAIN} - Charge Port Action Response: {response}")
|
687
679
|
_check_response_for_errors(response)
|
@@ -721,7 +713,7 @@ class KiaUvoApiAU(ApiImplType1):
|
|
721
713
|
}
|
722
714
|
_LOGGER.debug(f"{DOMAIN} - Start Climate Action Request: {payload}")
|
723
715
|
response = requests.post(
|
724
|
-
url, json=payload, headers=self._get_control_headers(token)
|
716
|
+
url, json=payload, headers=self._get_control_headers(token, vehicle)
|
725
717
|
).json()
|
726
718
|
_LOGGER.debug(f"{DOMAIN} - Start Climate Action Response: {response}")
|
727
719
|
_check_response_for_errors(response)
|
@@ -734,7 +726,7 @@ class KiaUvoApiAU(ApiImplType1):
|
|
734
726
|
}
|
735
727
|
_LOGGER.debug(f"{DOMAIN} - Stop Climate Action Request: {payload}")
|
736
728
|
response = requests.post(
|
737
|
-
url, json=payload, headers=self._get_control_headers(token)
|
729
|
+
url, json=payload, headers=self._get_control_headers(token, vehicle)
|
738
730
|
).json()
|
739
731
|
_LOGGER.debug(f"{DOMAIN} - Stop Climate Action Response: {response}")
|
740
732
|
_check_response_for_errors(response)
|
@@ -943,7 +935,7 @@ class KiaUvoApiAU(ApiImplType1):
|
|
943
935
|
]
|
944
936
|
}
|
945
937
|
response = requests.post(
|
946
|
-
url, json=body, headers=self._get_control_headers(token)
|
938
|
+
url, json=body, headers=self._get_control_headers(token, vehicle)
|
947
939
|
).json()
|
948
940
|
_LOGGER.debug(f"{DOMAIN} - Set Charge Limits Response: {response}")
|
949
941
|
_check_response_for_errors(response)
|
@@ -183,16 +183,6 @@ class KiaUvoApiEU(ApiImplType1):
|
|
183
183
|
+ "&state=$service_id:$user_id"
|
184
184
|
)
|
185
185
|
|
186
|
-
def _get_control_headers(self, token: Token, vehicle: Vehicle) -> dict:
|
187
|
-
control_token, _ = self._get_control_token(token)
|
188
|
-
authenticated_headers = self._get_authenticated_headers(
|
189
|
-
token, vehicle.ccu_ccs2_protocol_support
|
190
|
-
)
|
191
|
-
return authenticated_headers | {
|
192
|
-
"Authorization": control_token,
|
193
|
-
"AuthorizationCCSP": control_token,
|
194
|
-
}
|
195
|
-
|
196
186
|
def login(self, username: str, password: str) -> Token:
|
197
187
|
stamp = self._get_stamp()
|
198
188
|
device_id = self._get_device_id(stamp)
|
{hyundai_kia_connect_api-3.33.1.dist-info → hyundai_kia_connect_api-3.33.2.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: hyundai_kia_connect_api
|
3
|
-
Version: 3.33.
|
3
|
+
Version: 3.33.2
|
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.33.1.dist-info → hyundai_kia_connect_api-3.33.2.dist-info}/RECORD
RENAMED
@@ -1,10 +1,10 @@
|
|
1
1
|
hyundai_kia_connect_api/ApiImpl.py,sha256=PuK3dID01qTGB6aGtQY4uf1hF-t4d03wUzG_gUFn_1g,8353
|
2
|
-
hyundai_kia_connect_api/ApiImplType1.py,sha256=
|
2
|
+
hyundai_kia_connect_api/ApiImplType1.py,sha256=6uSqZYWmFT08gH1OL1h7SJso3HvqH9GszSQzngQbWcc,16993
|
3
3
|
hyundai_kia_connect_api/HyundaiBlueLinkApiUSA.py,sha256=FGYyrS3dSq8Plfu8DQMwVG1LM3nmRv8Y4vrN7wZ4oVY,36988
|
4
|
-
hyundai_kia_connect_api/KiaUvoApiAU.py,sha256=
|
4
|
+
hyundai_kia_connect_api/KiaUvoApiAU.py,sha256=Ox-GXfu2h6dsAA1tgXRVDCYgMP5Hi9IHMXDBzmYzBxQ,45668
|
5
5
|
hyundai_kia_connect_api/KiaUvoApiCA.py,sha256=XBya0yHZ2MC3TBVQLSc6N-SzmGt_s3l4nGVyNgmjl9Q,32514
|
6
6
|
hyundai_kia_connect_api/KiaUvoApiCN.py,sha256=cwIPZ0dU6HolKdooUQeQKlLAic6YU8dQmNs0VQDBgpQ,47035
|
7
|
-
hyundai_kia_connect_api/KiaUvoApiEU.py,sha256=
|
7
|
+
hyundai_kia_connect_api/KiaUvoApiEU.py,sha256=G3sfyyHaAnUeoYWC3rOpyrw_FfOs9ZDOEGUJuRTkuBc,66669
|
8
8
|
hyundai_kia_connect_api/KiaUvoApiUSA.py,sha256=8DP7iOORHtU98LipcAYEPdtJvubBlUP2-jlDxAhTDhQ,30548
|
9
9
|
hyundai_kia_connect_api/Token.py,sha256=ZsPvXh1ID7FUTGHAqhZUZyrKT7xVbOtIn6FRJn4Ygf0,370
|
10
10
|
hyundai_kia_connect_api/Vehicle.py,sha256=hZT0wU7-mMi85bgqNHMu6CyhQQ5h-Jfmoc1ce2uPhYM,18867
|
@@ -14,10 +14,10 @@ hyundai_kia_connect_api/bluelink.py,sha256=JiNIHl-Qi8zwqyN6ywKg5CdXOLT74WkvpjVcn
|
|
14
14
|
hyundai_kia_connect_api/const.py,sha256=dXEh-lpthH8000nUXFoRZpQXkTxVHDAgDe_KqnSZhZw,2280
|
15
15
|
hyundai_kia_connect_api/exceptions.py,sha256=m7gyDnvA5OVAK4EXSP_ZwE0s0uV8HsGUV0tiYwqofK0,1343
|
16
16
|
hyundai_kia_connect_api/utils.py,sha256=J0aXUX-nKIoS3XbelatNh-DZlHRU2_DYz_Mg_ZUKQJU,1957
|
17
|
-
hyundai_kia_connect_api-3.33.
|
18
|
-
hyundai_kia_connect_api-3.33.
|
19
|
-
hyundai_kia_connect_api-3.33.
|
20
|
-
hyundai_kia_connect_api-3.33.
|
21
|
-
hyundai_kia_connect_api-3.33.
|
22
|
-
hyundai_kia_connect_api-3.33.
|
23
|
-
hyundai_kia_connect_api-3.33.
|
17
|
+
hyundai_kia_connect_api-3.33.2.dist-info/licenses/AUTHORS.rst,sha256=T77OE1hrQF6YyDE6NbdMKyL66inHt7dnjHAzblwuk2A,155
|
18
|
+
hyundai_kia_connect_api-3.33.2.dist-info/licenses/LICENSE,sha256=49hmc755oyMwKdZ-2epiorjStRB0PfcZR1w5_NXZPgs,1068
|
19
|
+
hyundai_kia_connect_api-3.33.2.dist-info/METADATA,sha256=b0UCE6-Lvmy1zPUY-VPz0SYj8VolaQ7r7UeohiyYDdA,7142
|
20
|
+
hyundai_kia_connect_api-3.33.2.dist-info/WHEEL,sha256=MAQBAzGbXNI3bUmkDsiV_duv8i-gcdnLzw7cfUFwqhU,109
|
21
|
+
hyundai_kia_connect_api-3.33.2.dist-info/entry_points.txt,sha256=XfrroRdyC_9q9VXjEZe5SdRPhkQyCCE4S7ZK6XSKelA,67
|
22
|
+
hyundai_kia_connect_api-3.33.2.dist-info/top_level.txt,sha256=otZ7J_fN-s3EW4jD-kAearIo2OIzhQLR8DNEHIaFfds,24
|
23
|
+
hyundai_kia_connect_api-3.33.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{hyundai_kia_connect_api-3.33.1.dist-info → hyundai_kia_connect_api-3.33.2.dist-info}/top_level.txt
RENAMED
File without changes
|