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
Built Distribution
Hashes for hyundai_kia_connect_api-1.21.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf20de75d762325fdb05bf5cdd1108492ff31990df54ff869a5e9d927c6b669a |
|
MD5 | 76f2a7774b94cadbdb18666b35bc296a |
|
BLAKE2b-256 | c028d608a501d7622433c24a0a10e2d76c735082183783d6a22727eeff02026b |
Hashes for hyundai_kia_connect_api-1.21.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd142955f5791b6aced345415bcb81d8b76b0d4890c98eb0cdc40f42399ae29d |
|
MD5 | 536a94fa30c01cbfe0183f99327f9d03 |
|
BLAKE2b-256 | 83b6bbb1c95d52d7ba0173e8d40c7cfa3fac480137b9553f74be32a661082a06 |