hyundai-kia-connect-api 3.17.8__tar.gz → 3.17.10__tar.gz

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.
Files changed (46) hide show
  1. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/LICENSE +0 -1
  2. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/PKG-INFO +6 -1
  3. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/README.rst +5 -0
  4. hyundai_kia_connect_api-3.17.10/hyundai_kia_connect_api/ApiImplType1.py +25 -0
  5. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/hyundai_kia_connect_api/KiaUvoApiAU.py +15 -25
  6. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/hyundai_kia_connect_api/KiaUvoApiCA.py +2 -2
  7. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/hyundai_kia_connect_api/KiaUvoApiCN.py +18 -15
  8. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/hyundai_kia_connect_api/KiaUvoApiEU.py +18 -29
  9. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/hyundai_kia_connect_api/Vehicle.py +1 -0
  10. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/hyundai_kia_connect_api/__init__.py +1 -0
  11. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/hyundai_kia_connect_api/const.py +7 -1
  12. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/hyundai_kia_connect_api.egg-info/PKG-INFO +6 -1
  13. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/hyundai_kia_connect_api.egg-info/SOURCES.txt +1 -0
  14. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/setup.py +1 -1
  15. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/tests/eu_check_response_for_errors_test.py +5 -1
  16. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/AUTHORS.rst +0 -0
  17. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/CONTRIBUTING.rst +0 -0
  18. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/HISTORY.rst +0 -0
  19. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/MANIFEST.in +0 -0
  20. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/docs/Makefile +0 -0
  21. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/docs/authors.rst +0 -0
  22. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/docs/conf.py +0 -0
  23. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/docs/contributing.rst +0 -0
  24. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/docs/history.rst +0 -0
  25. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/docs/index.rst +0 -0
  26. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/docs/installation.rst +0 -0
  27. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/docs/make.bat +0 -0
  28. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/docs/readme.rst +0 -0
  29. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/docs/usage.rst +0 -0
  30. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/hyundai_kia_connect_api/ApiImpl.py +0 -0
  31. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/hyundai_kia_connect_api/HyundaiBlueLinkAPIUSA.py +0 -0
  32. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/hyundai_kia_connect_api/KiaUvoAPIUSA.py +0 -0
  33. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/hyundai_kia_connect_api/Token.py +0 -0
  34. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/hyundai_kia_connect_api/VehicleManager.py +0 -0
  35. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/hyundai_kia_connect_api/exceptions.py +0 -0
  36. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/hyundai_kia_connect_api/utils.py +0 -0
  37. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/hyundai_kia_connect_api.egg-info/dependency_links.txt +0 -0
  38. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/hyundai_kia_connect_api.egg-info/not-zip-safe +0 -0
  39. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/hyundai_kia_connect_api.egg-info/requires.txt +0 -0
  40. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/hyundai_kia_connect_api.egg-info/top_level.txt +0 -0
  41. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/requirements.txt +0 -0
  42. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/setup.cfg +0 -0
  43. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/tests/__init__.py +0 -0
  44. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/tests/au_login_test.py +0 -0
  45. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/tests/ca_login_test.py +0 -0
  46. {hyundai_kia_connect_api-3.17.8 → hyundai_kia_connect_api-3.17.10}/tests/eu_login_test.py +0 -0
@@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.
22
-
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hyundai_kia_connect_api
3
- Version: 3.17.8
3
+ Version: 3.17.10
4
4
  Summary: Python Boilerplate contains all the boilerplate you need to create a Python package.
5
5
  Home-page: https://github.com/fuatakgun/hyundai_kia_connect_api
6
6
  Author: Fuat Akgun
@@ -20,6 +20,11 @@ Requires-Dist: curlify>=2.2.1
20
20
  Requires-Dist: python-dateutil
21
21
  Requires-Dist: pytz>=2021.3
22
22
 
23
+ Code Maintainers Wanted
24
+ =======================
25
+
26
+ I no longer have a Kia or Hyundai so don't maintain this like I used to. Others who are interested in jumping in are welcome to join the project! Even just pull requests are appreciated!
27
+
23
28
  Introduction
24
29
  ============
25
30
 
@@ -1,3 +1,8 @@
1
+ Code Maintainers Wanted
2
+ =======================
3
+
4
+ I no longer have a Kia or Hyundai so don't maintain this like I used to. Others who are interested in jumping in are welcome to join the project! Even just pull requests are appreciated!
5
+
1
6
  Introduction
2
7
  ============
3
8
 
@@ -0,0 +1,25 @@
1
+ from .ApiImpl import (
2
+ ApiImpl,
3
+ )
4
+ from .Token import Token
5
+
6
+ USER_AGENT_OK_HTTP: str = "okhttp/3.12.0"
7
+
8
+
9
+ class ApiImplType1(ApiImpl):
10
+ def __init__(self) -> None:
11
+ """Initialize."""
12
+
13
+ def _get_authenticated_headers(self, token: Token) -> dict:
14
+ return {
15
+ "Authorization": token.access_token,
16
+ "ccsp-service-id": self.CCSP_SERVICE_ID,
17
+ "ccsp-application-id": self.APP_ID,
18
+ "Stamp": self._get_stamp(),
19
+ "ccsp-device-id": token.device_id,
20
+ "Host": self.BASE_URL,
21
+ "Connection": "Keep-Alive",
22
+ "Accept-Encoding": "gzip",
23
+ "Ccuccs2protocolsupport": self.ccu_ccs2_protocol_support,
24
+ "User-Agent": USER_AGENT_OK_HTTP,
25
+ }
@@ -17,10 +17,10 @@ import requests
17
17
  from dateutil import tz
18
18
 
19
19
  from .ApiImpl import (
20
- ApiImpl,
21
20
  ClimateRequestOptions,
22
21
  WindowRequestOptions,
23
22
  )
23
+ from .ApiImplType1 import ApiImplType1
24
24
  from .Token import Token
25
25
  from .Vehicle import (
26
26
  Vehicle,
@@ -43,7 +43,16 @@ from .const import (
43
43
  ENGINE_TYPES,
44
44
  OrderStatus,
45
45
  )
46
- from .exceptions import *
46
+ from .exceptions import (
47
+ AuthenticationError,
48
+ DuplicateRequestError,
49
+ RequestTimeoutError,
50
+ ServiceTemporaryUnavailable,
51
+ NoDataFound,
52
+ InvalidAPIResponseError,
53
+ APIError,
54
+ RateLimitingError,
55
+ )
47
56
  from .utils import (
48
57
  get_child_value,
49
58
  get_index_into_hex_temp,
@@ -53,9 +62,7 @@ from .utils import (
53
62
  _LOGGER = logging.getLogger(__name__)
54
63
 
55
64
  USER_AGENT_OK_HTTP: str = "okhttp/3.12.0"
56
- USER_AGENT_MOZILLA: str = (
57
- "Mozilla/5.0 (Linux; Android 4.1.1; Galaxy Nexus Build/JRO03C) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19" # noqa
58
- )
65
+ USER_AGENT_MOZILLA: str = "Mozilla/5.0 (Linux; Android 4.1.1; Galaxy Nexus Build/JRO03C) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19" # noqa
59
66
 
60
67
 
61
68
  def _check_response_for_errors(response: dict) -> None:
@@ -96,7 +103,7 @@ def _check_response_for_errors(response: dict) -> None:
96
103
  raise APIError(f"Server returned: '{response['resMsg']}'")
97
104
 
98
105
 
99
- class KiaUvoApiAU(ApiImpl):
106
+ class KiaUvoApiAU(ApiImplType1):
100
107
  data_timezone = tz.gettz("Australia/Sydney")
101
108
  temperature_range = [x * 0.5 for x in range(34, 54)]
102
109
 
@@ -106,35 +113,18 @@ class KiaUvoApiAU(ApiImpl):
106
113
  self.BASE_URL: str = "au-apigw.ccs.kia.com.au:8082"
107
114
  self.CCSP_SERVICE_ID: str = "8acb778a-b918-4a8d-8624-73a0beb64289"
108
115
  self.APP_ID: str = "4ad4dcde-be23-48a8-bc1c-91b94f5c06f8" # Android app ID
109
- self.BASIC_AUTHORIZATION: str = (
110
- "Basic OGFjYjc3OGEtYjkxOC00YThkLTg2MjQtNzNhMGJlYjY0Mjg5OjdTY01NbTZmRVlYZGlFUEN4YVBhUW1nZVlkbFVyZndvaDRBZlhHT3pZSVMyQ3U5VA=="
111
- )
116
+ self.BASIC_AUTHORIZATION: str = "Basic OGFjYjc3OGEtYjkxOC00YThkLTg2MjQtNzNhMGJlYjY0Mjg5OjdTY01NbTZmRVlYZGlFUEN4YVBhUW1nZVlkbFVyZndvaDRBZlhHT3pZSVMyQ3U5VA=="
112
117
  elif BRANDS[brand] == BRAND_HYUNDAI:
113
118
  self.BASE_URL: str = "au-apigw.ccs.hyundai.com.au:8080"
114
119
  self.CCSP_SERVICE_ID: str = "855c72df-dfd7-4230-ab03-67cbf902bb1c"
115
120
  self.APP_ID: str = "f9ccfdac-a48d-4c57-bd32-9116963c24ed" # Android app ID
116
- self.BASIC_AUTHORIZATION: str = (
117
- "Basic ODU1YzcyZGYtZGZkNy00MjMwLWFiMDMtNjdjYmY5MDJiYjFjOmU2ZmJ3SE0zMllOYmhRbDBwdmlhUHAzcmY0dDNTNms5MWVjZUEzTUpMZGJkVGhDTw=="
118
- )
121
+ self.BASIC_AUTHORIZATION: str = "Basic ODU1YzcyZGYtZGZkNy00MjMwLWFiMDMtNjdjYmY5MDJiYjFjOmU2ZmJ3SE0zMllOYmhRbDBwdmlhUHAzcmY0dDNTNms5MWVjZUEzTUpMZGJkVGhDTw=="
119
122
 
120
123
  self.USER_API_URL: str = "https://" + self.BASE_URL + "/api/v1/user/"
121
124
  self.SPA_API_URL: str = "https://" + self.BASE_URL + "/api/v1/spa/"
122
125
  self.SPA_API_URL_V2: str = "https://" + self.BASE_URL + "/api/v2/spa/"
123
126
  self.CLIENT_ID: str = self.CCSP_SERVICE_ID
124
127
 
125
- def _get_authenticated_headers(self, token: Token) -> dict:
126
- return {
127
- "Authorization": token.access_token,
128
- "ccsp-service-id": self.CCSP_SERVICE_ID,
129
- "ccsp-application-id": self.APP_ID,
130
- "ccsp-device-id": token.device_id,
131
- "Stamp": self._get_stamp(),
132
- "Host": self.BASE_URL,
133
- "Connection": "Keep-Alive",
134
- "Accept-Encoding": "gzip",
135
- "User-Agent": USER_AGENT_OK_HTTP,
136
- }
137
-
138
128
  def _get_control_headers(self, token: Token) -> dict:
139
129
  control_token, _ = self._get_control_token(token)
140
130
  authenticated_headers = self._get_authenticated_headers(token)
@@ -509,7 +509,7 @@ class KiaUvoApiCA(ApiImpl):
509
509
  if response["responseHeader"]["responseCode"] != 0:
510
510
  raise APIError("No Location Located")
511
511
  return response["result"]
512
- except:
512
+ except Exception:
513
513
  _LOGGER.warning(f"{DOMAIN} - Get vehicle location failed")
514
514
  return None
515
515
 
@@ -717,7 +717,7 @@ class KiaUvoApiCA(ApiImpl):
717
717
  vehicle.ev_charge_limits_dc = [
718
718
  x["level"] for x in state if x["plugType"] == 0
719
719
  ][-1]
720
- except:
720
+ except Exception:
721
721
  _LOGGER.debug(f"{DOMAIN} - SOC Levels couldn't be found. May not be an EV.")
722
722
 
723
723
  def _get_charge_limits(self, token: Token, vehicle: Vehicle) -> dict:
@@ -12,13 +12,13 @@ from urllib.parse import parse_qs, urlparse
12
12
 
13
13
  import pytz
14
14
  import requests
15
- from bs4 import BeautifulSoup
16
15
  from dateutil import tz
17
16
 
18
17
  from .ApiImpl import (
19
- ApiImpl,
20
18
  ClimateRequestOptions,
21
19
  )
20
+ from .ApiImplType1 import ApiImplType1
21
+
22
22
  from .Token import Token
23
23
  from .Vehicle import (
24
24
  Vehicle,
@@ -42,7 +42,16 @@ from .const import (
42
42
  TEMPERATURE_UNITS,
43
43
  VEHICLE_LOCK_ACTION,
44
44
  )
45
- from .exceptions import *
45
+ from .exceptions import (
46
+ AuthenticationError,
47
+ DuplicateRequestError,
48
+ RequestTimeoutError,
49
+ ServiceTemporaryUnavailable,
50
+ NoDataFound,
51
+ InvalidAPIResponseError,
52
+ APIError,
53
+ RateLimitingError,
54
+ )
46
55
  from .utils import (
47
56
  get_child_value,
48
57
  get_index_into_hex_temp,
@@ -52,12 +61,8 @@ from .utils import (
52
61
  _LOGGER = logging.getLogger(__name__)
53
62
 
54
63
  USER_AGENT_OK_HTTP: str = "okhttp/3.12.0"
55
- USER_AGENT_MOZILLA: str = (
56
- "Mozilla/5.0 (Linux; Android 4.1.1; Galaxy Nexus Build/JRO03C) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19" # noqa
57
- )
58
- ACCEPT_HEADER_ALL: str = (
59
- "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9" # noqa
60
- )
64
+ USER_AGENT_MOZILLA: str = "Mozilla/5.0 (Linux; Android 4.1.1; Galaxy Nexus Build/JRO03C) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19" # noqa
65
+ ACCEPT_HEADER_ALL: str = "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9" # noqa
61
66
 
62
67
 
63
68
  def _check_response_for_errors(response: dict) -> None:
@@ -98,7 +103,7 @@ def _check_response_for_errors(response: dict) -> None:
98
103
  raise APIError(f"Server returned: '{response['resMsg']}'")
99
104
 
100
105
 
101
- class KiaUvoApiCN(ApiImpl):
106
+ class KiaUvoApiCN(ApiImplType1):
102
107
  data_timezone = tz.gettz("Asia/Shanghai")
103
108
  temperature_range = [x * 0.5 for x in range(28, 60)]
104
109
 
@@ -107,9 +112,7 @@ class KiaUvoApiCN(ApiImpl):
107
112
  self.BASE_DOMAIN: str = "prd.cn-ccapi.kia.com"
108
113
  self.CCSP_SERVICE_ID: str = "9d5df92a-06ae-435f-b459-8304f2efcc67"
109
114
  self.APP_ID: str = "eea8762c-adfc-4ee4-8d7a-6e2452ddf342"
110
- self.BASIC_AUTHORIZATION: str = (
111
- "Basic OWQ1ZGY5MmEtMDZhZS00MzVmLWI0NTktODMwNGYyZWZjYzY3OnRzWGRrVWcwOEF2MlpaelhPZ1d6Snl4VVQ2eWVTbk5OUWtYWFBSZEtXRUFOd2wxcA=="
112
- )
115
+ self.BASIC_AUTHORIZATION: str = "Basic OWQ1ZGY5MmEtMDZhZS00MzVmLWI0NTktODMwNGYyZWZjYzY3OnRzWGRrVWcwOEF2MlpaelhPZ1d6Snl4VVQ2eWVTbk5OUWtYWFBSZEtXRUFOd2wxcA=="
113
116
  elif BRANDS[brand] == BRAND_HYUNDAI:
114
117
  self.BASE_DOMAIN: str = "prd.cn-ccapi.hyundai.com"
115
118
  self.CCSP_SERVICE_ID: str = "72b3d019-5bc7-443d-a437-08f307cf06e2"
@@ -485,7 +488,7 @@ class KiaUvoApiCN(ApiImpl):
485
488
  vehicle.ev_charge_limits_dc = [
486
489
  x["targetSOClevel"] for x in target_soc_list if x["plugType"] == 0
487
490
  ][-1]
488
- except:
491
+ except Exception:
489
492
  _LOGGER.debug(f"{DOMAIN} - SOC Levels couldn't be found. May not be an EV.")
490
493
  if (
491
494
  get_child_value(
@@ -674,7 +677,7 @@ class KiaUvoApiCN(ApiImpl):
674
677
  _LOGGER.debug(f"{DOMAIN} - _get_location response: {response}")
675
678
  _check_response_for_errors(response)
676
679
  return response["resMsg"]
677
- except:
680
+ except Exception:
678
681
  _LOGGER.debug(f"{DOMAIN} - _get_location failed")
679
682
  return None
680
683
 
@@ -17,9 +17,10 @@ from bs4 import BeautifulSoup
17
17
  from dateutil import tz
18
18
 
19
19
  from .ApiImpl import (
20
- ApiImpl,
21
20
  ClimateRequestOptions,
22
21
  )
22
+ from .ApiImplType1 import ApiImplType1
23
+
23
24
  from .Token import Token
24
25
  from .Vehicle import (
25
26
  Vehicle,
@@ -44,7 +45,17 @@ from .const import (
44
45
  TEMPERATURE_UNITS,
45
46
  VEHICLE_LOCK_ACTION,
46
47
  )
47
- from .exceptions import *
48
+ from .exceptions import (
49
+ AuthenticationError,
50
+ DuplicateRequestError,
51
+ RequestTimeoutError,
52
+ ServiceTemporaryUnavailable,
53
+ NoDataFound,
54
+ InvalidAPIResponseError,
55
+ APIError,
56
+ RateLimitingError,
57
+ DeviceIDError,
58
+ )
48
59
  from .utils import (
49
60
  get_child_value,
50
61
  get_index_into_hex_temp,
@@ -54,12 +65,8 @@ from .utils import (
54
65
  _LOGGER = logging.getLogger(__name__)
55
66
 
56
67
  USER_AGENT_OK_HTTP: str = "okhttp/3.12.0"
57
- USER_AGENT_MOZILLA: str = (
58
- "Mozilla/5.0 (Linux; Android 4.1.1; Galaxy Nexus Build/JRO03C) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19" # noqa
59
- )
60
- ACCEPT_HEADER_ALL: str = (
61
- "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9" # noqa
62
- )
68
+ USER_AGENT_MOZILLA: str = "Mozilla/5.0 (Linux; Android 4.1.1; Galaxy Nexus Build/JRO03C) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19" # noqa
69
+ ACCEPT_HEADER_ALL: str = "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9" # noqa
63
70
 
64
71
  SUPPORTED_LANGUAGES_LIST = [
65
72
  "en", # English
@@ -122,7 +129,7 @@ def _check_response_for_errors(response: dict) -> None:
122
129
  )
123
130
 
124
131
 
125
- class KiaUvoApiEU(ApiImpl):
132
+ class KiaUvoApiEU(ApiImplType1):
126
133
  data_timezone = tz.gettz("Europe/Berlin")
127
134
  temperature_range = [x * 0.5 for x in range(28, 60)]
128
135
 
@@ -159,9 +166,7 @@ class KiaUvoApiEU(ApiImpl):
159
166
  self.CFB: str = base64.b64decode(
160
167
  "RFtoRq/vDXJmRndoZaZQyfOot7OrIqGVFj96iY2WL3yyH5Z/pUvlUhqmCxD2t+D65SQ="
161
168
  )
162
- self.BASIC_AUTHORIZATION: str = (
163
- "Basic NmQ0NzdjMzgtM2NhNC00Y2YzLTk1NTctMmExOTI5YTk0NjU0OktVeTQ5WHhQekxwTHVvSzB4aEJDNzdXNlZYaG10UVI5aVFobUlGampvWTRJcHhzVg==" # noqa
164
- )
169
+ self.BASIC_AUTHORIZATION: str = "Basic NmQ0NzdjMzgtM2NhNC00Y2YzLTk1NTctMmExOTI5YTk0NjU0OktVeTQ5WHhQekxwTHVvSzB4aEJDNzdXNlZYaG10UVI5aVFobUlGampvWTRJcHhzVg==" # noqa
165
170
  self.LOGIN_FORM_HOST = "eu-account.hyundai.com"
166
171
  self.PUSH_TYPE = "GCM"
167
172
  elif BRANDS[self.brand] == BRAND_GENESIS:
@@ -172,9 +177,7 @@ class KiaUvoApiEU(ApiImpl):
172
177
  self.CFB: str = base64.b64decode(
173
178
  "RFtoRq/vDXJmRndoZaZQyYo3/qFLtVReW8P7utRPcc0ZxOzOELm9mexvviBk/qqIp4A="
174
179
  )
175
- self.BASIC_AUTHORIZATION: str = (
176
- "Basic NmQ0NzdjMzgtM2NhNC00Y2YzLTk1NTctMmExOTI5YTk0NjU0OktVeTQ5WHhQekxwTHVvSzB4aEJDNzdXNlZYaG10UVI5aVFobUlGampvWTRJcHhzVg==" # noqa
177
- )
180
+ self.BASIC_AUTHORIZATION: str = "Basic NmQ0NzdjMzgtM2NhNC00Y2YzLTk1NTctMmExOTI5YTk0NjU0OktVeTQ5WHhQekxwTHVvSzB4aEJDNzdXNlZYaG10UVI5aVFobUlGampvWTRJcHhzVg==" # noqa
178
181
  self.LOGIN_FORM_HOST = "accounts-eu.genesis.com"
179
182
  self.PUSH_TYPE = "GCM"
180
183
 
@@ -226,20 +229,6 @@ class KiaUvoApiEU(ApiImpl):
226
229
  + "&state=$service_id:$user_id"
227
230
  )
228
231
 
229
- def _get_authenticated_headers(self, token: Token) -> dict:
230
- return {
231
- "Authorization": token.access_token,
232
- "ccsp-service-id": self.CCSP_SERVICE_ID,
233
- "ccsp-application-id": self.APP_ID,
234
- "Stamp": self._get_stamp(),
235
- "ccsp-device-id": token.device_id,
236
- "Host": self.BASE_URL,
237
- "Connection": "Keep-Alive",
238
- "Accept-Encoding": "gzip",
239
- "Ccuccs2protocolsupport": self.ccu_ccs2_protocol_support,
240
- "User-Agent": USER_AGENT_OK_HTTP,
241
- }
242
-
243
232
  def login(self, username: str, password: str) -> Token:
244
233
  stamp = self._get_stamp()
245
234
  device_id = self._get_device_id(stamp)
@@ -1,5 +1,6 @@
1
1
  # pylint:disable=missing-class-docstring,missing-function-docstring,wildcard-import,unused-wildcard-import,invalid-name
2
2
  """Vehicle class"""
3
+
3
4
  import logging
4
5
  import datetime
5
6
  import typing
@@ -2,6 +2,7 @@
2
2
 
3
3
  # flake8: noqa
4
4
  from .ApiImpl import ApiImpl, ClimateRequestOptions, WindowRequestOptions
5
+ from .ApiImplType1 import ApiImplType1
5
6
  from .HyundaiBlueLinkAPIUSA import HyundaiBlueLinkAPIUSA
6
7
  from .KiaUvoApiCA import KiaUvoApiCA
7
8
  from .KiaUvoApiEU import KiaUvoApiEU
@@ -29,7 +29,13 @@ LOGIN_TOKEN_LIFETIME = datetime.timedelta(hours=23)
29
29
 
30
30
  LENGTH_KILOMETERS = "km"
31
31
  LENGTH_MILES = "mi"
32
- DISTANCE_UNITS = {None: None, 0: None, 1: LENGTH_KILOMETERS, 3: LENGTH_MILES}
32
+ DISTANCE_UNITS = {
33
+ None: None,
34
+ 0: None,
35
+ 1: LENGTH_KILOMETERS,
36
+ 2: LENGTH_MILES,
37
+ 3: LENGTH_MILES,
38
+ }
33
39
 
34
40
  TEMPERATURE_C = "°C"
35
41
  TEMPERATURE_F = "°F"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hyundai_kia_connect_api
3
- Version: 3.17.8
3
+ Version: 3.17.10
4
4
  Summary: Python Boilerplate contains all the boilerplate you need to create a Python package.
5
5
  Home-page: https://github.com/fuatakgun/hyundai_kia_connect_api
6
6
  Author: Fuat Akgun
@@ -20,6 +20,11 @@ Requires-Dist: curlify>=2.2.1
20
20
  Requires-Dist: python-dateutil
21
21
  Requires-Dist: pytz>=2021.3
22
22
 
23
+ Code Maintainers Wanted
24
+ =======================
25
+
26
+ I no longer have a Kia or Hyundai so don't maintain this like I used to. Others who are interested in jumping in are welcome to join the project! Even just pull requests are appreciated!
27
+
23
28
  Introduction
24
29
  ============
25
30
 
@@ -18,6 +18,7 @@ docs/make.bat
18
18
  docs/readme.rst
19
19
  docs/usage.rst
20
20
  hyundai_kia_connect_api/ApiImpl.py
21
+ hyundai_kia_connect_api/ApiImplType1.py
21
22
  hyundai_kia_connect_api/HyundaiBlueLinkAPIUSA.py
22
23
  hyundai_kia_connect_api/KiaUvoAPIUSA.py
23
24
  hyundai_kia_connect_api/KiaUvoApiAU.py
@@ -44,6 +44,6 @@ setup(
44
44
  test_suite="tests",
45
45
  tests_require=test_requirements,
46
46
  url="https://github.com/fuatakgun/hyundai_kia_connect_api",
47
- version="3.17.8",
47
+ version="3.17.10",
48
48
  zip_safe=False,
49
49
  )
@@ -1,7 +1,11 @@
1
1
  import pytest
2
2
 
3
3
  from hyundai_kia_connect_api.KiaUvoApiEU import _check_response_for_errors
4
- from hyundai_kia_connect_api.exceptions import *
4
+ from hyundai_kia_connect_api.exceptions import (
5
+ RateLimitingError,
6
+ InvalidAPIResponseError,
7
+ APIError,
8
+ )
5
9
 
6
10
 
7
11
  def test_invalid_api_response():