Skip to main content

Python Boilerplate contains all the boilerplate you need to create a Python package.

Project description

Introduction

This is a Kia UVO and Hyundai Bluelink written in python. It is primary consumed by home assistant. If you are looking for a home assistant Kia / Hyundai implementation please look here: https://github.com/fuatakgun/kia_uvo. Much of this base code came from reading bluelinky and contributions to the kia_uvo home assistant project.

Usage

This package is designed to simplify the complexity of using multiple regions. It attempts to standardize the usage regardless of what brand or region the car is in. That isn’t always possible though, in particular some features differ from one to the next.

Vehicle manager is the key class that is called to manage the vehicle lists. One vehicle manager should be used per login. Key data points required to instantiate vehicle manager are:

region: int
brand: int,
username: str
password: str
pin: str (required for CA, and potentially USA, otherwise pass a plan str)

Key values for the int exist in the constant(https://github.com/fuatakgun/hyundai_kia_connect_api/blob/master/hyundai_kia_connect_api/const.py) file as:

REGIONS = {1: REGION_EUROPE, 2: REGION_CANADA, 3: REGION_USA}
BRANDS = {1: BRAND_KIA, 2: BRAND_HYUNDAI}

Once this is done you can now make the following calls against the vehicle manager:

get_vehicle(self, vehicle_id)
update_all_vehicles_with_cached_state(self)
update_vehicle_with_cached_state(self, vehicle_id)
force_refresh_all_vehicles_states(self)
force_refresh_vehicles_states(self, vehicle_id)
check_and_refresh_token(self)
check_and_force_update_vehicles(self, force_refresh_interval) # Interval in seconds - consider API Rate Limits https://github.com/Hacksore/bluelinky/wiki/API-Rate-Limits

An example call would be:

from hyundai_kia_connect_api import *
vm = VehicleManager(region=2, brand=1, username="username@gmail.com", password="password", pin="1234")
vm.check_and_refresh_token()
vm.update_all_vehicles_with_cached_state()
print(vm.vehicles)

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hyundai_kia_connect_api-1.19.4.tar.gz (25.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hyundai_kia_connect_api-1.19.4-py2.py3-none-any.whl (26.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file hyundai_kia_connect_api-1.19.4.tar.gz.

File metadata

  • Download URL: hyundai_kia_connect_api-1.19.4.tar.gz
  • Upload date:
  • Size: 25.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for hyundai_kia_connect_api-1.19.4.tar.gz
Algorithm Hash digest
SHA256 0f06157391ece6b948f9a241a6f2de1dab0f376a9ae14799595c5a680a2efe22
MD5 3ec98d15d90e71ceab7402f729f5aa4a
BLAKE2b-256 44b7adad11b2987138a0af8fe9956495fd312d57caaba73e38a55c475e7b6cf9

See more details on using hashes here.

File details

Details for the file hyundai_kia_connect_api-1.19.4-py2.py3-none-any.whl.

File metadata

  • Download URL: hyundai_kia_connect_api-1.19.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 26.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for hyundai_kia_connect_api-1.19.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 90176d9fa972be6588ad2df8f217062051d28e22ccae9eb6ba4973bf39c1c19f
MD5 9ce40f19a1cba1c364e1644640517b16
BLAKE2b-256 dee479fb3d3adb3fd82d0e04f918bdb412e00e3492a849cd2830019b66a5be0f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page