Skip to main content

Code Maintainers Wanted

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!

Introduction

This is a Kia UVO, Hyundai Bluelink, Genesis Connect(Canada Only) 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/Hyundai-Kia-Connect/kia_uvo. Much of this base code came from reading bluelinky and contributions to the kia_uvo home assistant project.

Chat on discord:: Discord

API 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.

Europe username/password login is supported directly for Kia, Hyundai, and Genesis (EU). No browser or manual token extraction is needed. The pycryptodome package (included as a dependency) is used for RSA password encryption during the EU login flow.

Remote climate options

start_climate takes seat, steering wheel, heating and mirror values through ClimateRequestOptions. Which body field carries the rear-window and mirror heating depends on the vehicle path:

  • EU CCS2 and EU GSPA vehicles: the heating option (1, 2 or 4) sends sideRearMirrorHeating: 1; 0 and 3 leave it off. Confirmed by single-field tests in issue #1398.

  • Legacy EU (pre-CCS2) and other regions: the heating option sends heating1, as before. On the legacy EU path an explicit side_rear_mirror_heating can also be sent in the same request.

An explicit side_rear_mirror_heating value takes precedence over the heating mapping.

MQTT push (Europe CCI/GSPA)

For Europe CCI/GSPA accounts the vehicle manager can receive server pushes over MQTT instead of polling. Push is receive-only: it never sends vehicle commands.

vm = VehicleManager(region=9, brand=1, username="...", password="...", pin="...")
vm.check_and_refresh_token()
vm.initialize_vehicles()
vm.set_push_connection_change_callback(lambda connected: print("push connected:", connected))
vm.set_push_status_callback(lambda vehicle_id, topic_type: print(vm.get_vehicle(vehicle_id)))
vm.start_push(vm.vehicles[vehicle_id].id)
  • start_push returns False when push is unavailable (unsupported region or account); connection problems surface in the connection-change callback and the manager reconnects with capped backoff.

  • The status callback fires per status push with (vehicle_id, topic_type).

  • stop_push disconnects; the callbacks stay registered unless replaced.

The Bluelink App is reset to English for users who have set another language in the Bluelink App in Europe when using hyundai_kia_connect_api. To avoid this, you can pass the optional parameter language (default is “en”) to the constructor of VehicleManager, e.g. for Dutch:

vm = VehicleManager(region=2, brand=1, username="username@gmail.com", password="password", pin="1234", language="nl")

Note: this is only implemented for Europe currently.

For a list of language codes, see here: https://www.science.co.il/language/Codes.php. Currently in Europe the Bluelink App shows the following languages:

- "en" English
- "de" German
- "fr" French
- "it" Italian
- "es" Spanish
- "sv" Swedish
- "nl" Dutch
- "no" Norwegian
- "cs" Czech
- "sk" Slovak
- "hu" Hungarian
- "da" Danish
- "pl" Polish
- "fi" Finnish
- "pt" Portuguese

In Europe and some other regions also trip info can be retrieved. For a month you can ask the days with trips. And you can ask for a specific day for all the trips of that specific day.:: - First call vm.update_month_trip_info(vehicle.id, yyyymm) before getting vehicle.month_trip_info for that month - First call vm.update_day_trip_info(vehicle.id, day.yyyymmdd) before getting vehicle.day_trip_info for that day

Example of getting trip info of the current month and day (vm is VehicleManager instance):

now = datetime.now()
yyyymm = now.strftime("%Y%m")
yyyymmdd = now.strftime("%Y%m%d")
vm.update_month_trip_info(vehicle.id, yyyymm)
if vehicle.month_trip_info is not None:
    for day in vehicle.month_trip_info.day_list:  # ordered on day
        if yyyymmdd == day.yyyymmdd:  # in example only interested in current day
            vm.update_day_trip_info(vehicle.id, day.yyyymmdd)
            if vehicle.day_trip_info is not None:
                for trip in reversed(vehicle.day_trip_info.trip_list):  # show oldest first
                    print(f"{day.yyyymmdd},{trip.hhmmss},{trip.drive_time},{trip.idle_time},{trip.distance},{trip.avg_speed},{trip.max_speed}")

In India the day trip list only carries start/end times, so each trip’s figures come from a per-trip detail call (cached per trip). India trips also report trip.end_hhmmss and the driving-behaviour counters trip.hard_braking_count, trip.rapid_acceleration_count and trip.excessive_speed_count.

CLI Usage

A tool bluelink is provided that enable querying the vehicles and save the state to a JSON file. Example usage:

bluelink --region Canada --brand Hyundai --username FOO --password BAR --pin 1234 info --json infos.json

Environment variables BLUELINK_XXX can be used to provide a default value for the corresponding –xxx argument.

Metadata

Release files for hyundai-kia-connect-api 5.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hyundai-kia-connect-api 5.4.0
File Size Uploaded Provenance Actions
hyundai_kia_connect_api-5.4.0.tar.gz 557.2 kB Without provenance Details for hyundai_kia_connect_api-5.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hyundai-kia-connect-api 5.4.0
File Interpreter ABI Platform Actions
hyundai_kia_connect_api-5.4.0-py3-none-any.whl Python 3 none any Details for hyundai_kia_connect_api-5.4.0-py3-none-any.whl

Total release size: 876.6 kB

Release files / hyundai_kia_connect_api-5.4.0.tar.gz

Download URL hyundai_kia_connect_api-5.4.0.tar.gz
Size 557.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d58a103d9e6c02640a577607efd333caf92ee96aec7eab0d114a660c13ac4b01
BLAKE2b-256 checksum
How to use checksums
264b03eb4d68f6a7edaae021cf2bdacaa380845a813bc7fd1b133fe115a53a7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / hyundai_kia_connect_api-5.4.0-py3-none-any.whl

Download URL hyundai_kia_connect_api-5.4.0-py3-none-any.whl
Size 319.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3afe9cc57c6e844377246f58a8d4e9648c0be6e85e16d8fc93b15ef511f4d9a0
BLAKE2b-256 checksum
How to use checksums
de9ab49e5c611a973fc10b4b2e93b19e7fd819e48a5db044d6dd85c539398dd8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for hyundai-kia-connect-api 5.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

5.4.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page