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.

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

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.2.1
File Size Uploaded Provenance Actions
hyundai_kia_connect_api-5.2.1.tar.gz 543.5 kB Without provenance Details for hyundai_kia_connect_api-5.2.1.tar.gz

Built distribution (wheel)

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

Total release size: 860.1 kB

Release files / hyundai_kia_connect_api-5.2.1.tar.gz

Download URL hyundai_kia_connect_api-5.2.1.tar.gz
Size 543.5 kB
Tags Source
SHA-256 checksum
How to use checksums
69bb0d80fbefb593b41105dd9b07e364f68e90d5af33f6f024101133624e21f7
BLAKE2b-256 checksum
How to use checksums
fdfd7964ee7364cd77431c6b009bd7e89da06b57f55fd0dfd5ae04ba911ba789
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.2.1-py3-none-any.whl

Download URL hyundai_kia_connect_api-5.2.1-py3-none-any.whl
Size 316.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a2a9d93e71590213b5fba461fcdc41a8de51417be39e41c500191a673b11219e
BLAKE2b-256 checksum
How to use checksums
338ae735cee1a30e1d23888e997763ae010386e6f393c3d22a8b07071d9d9f61
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.2.1

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