Comments (5)
please comment if you are in canada and willing to verify the implementation there
from ha_kia_hyundai.
I'm in Canada an have a vehicle registered with uvo. I have python experience as well so I'm more than willing to chip in where I can.
from ha_kia_hyundai.
@speedking456 that's very exciting, I'll start on a API wrapper for CA today and should have something for you to try in a day or two from the pypi package
from ha_kia_hyundai.
@speedking456 I think the wrapper is ready, can you run it in the python console to improve the wrapper's documentation?
pip3 install kia-uvo-api==1.1.7
from a python console run
import logging
from kia_uvo_api import CaKia
logger = logging.getLogger("kia_uvo_api.ca")
logger.setLevel(logging.DEBUG)
ch = logging.StreamHandler()
ch.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
ch.setFormatter(formatter)
logger.addHandler(ch)
import asyncio
async def testing():
ca = CaKia()
pin = "PIN"
login_response = await ca.login("user", "pass")
access_token = login_response["access_token"]
vehicles = await ca.get_vehicles(access_token)
vehicle_id = vehicles["vehicles"][0]["vehicleId"]
await ca.get_cached_vehicle_status(access_token=access_token, vehicle_id=vehicle_id)
await ca.get_next_service_status(access_token=access_token, vehicle_id=vehicle_id)
pin_token = await ca.get_pin_token(access_token=access_token, pin=pin)
await ca.get_location(access_token=access_token, vehicle_id=vehicle_id, pin=pin, pin_token=pin_token)
asyncio.run(testing())
but with real username, password, and PIN. the console should show all the responses raw json; if you can post the responses I'll add them to the API files for reference like I did for the us kia version https://github.com/dahlb/kia_uvo/blob/master/kia_uvo_api/src/kia_uvo_api/us_kia.py#L139
BE SURE TO REMOVE ANY PII like vin, but I'm not sure which PII will be in the responses, you could email it to me at [email protected] if you want a second pair of eyes to check for PII before it's online. Feel free to add the documentation in a PR if you'd like :).
I'll start working on the HA side of changes for CA but that'll take a few days and be much better with the responses for reference.
from ha_kia_hyundai.
I think I've gotten the bulk of it working for Canada in the integration; it's in master. The service calls are still in F instead of C but I'm hoping to work that out tomorrow. I haven't been able to test it but short of typos I'm pretty confident it'll work, please let me know your experience.
Having those responses documented for the API is still important and will help with the vehicle attributes like model name and debugging.
PS: I'm new to python myself, only been doing it the last month or so for this project. If you notice any best practices or other issues, please let me know and I'll work on improving it.
from ha_kia_hyundai.
Related Issues (20)
- Start.climate service causing integration to get stuck in connected state HOT 1
- Unable to lock car, 'NoneType' object has no attribute 'completed' HOT 2
- Several issues with start_climate service HOT 3
- Align readme terminology with configuration terminology
- Add start/stop charge and set charge limits for Hyundai USA HOT 5
- SSL: Wrong signature type error on login HOT 5
- Running into 'dh key too small' for Hyundai HOT 6
- Doesn't work for Canada, SSL Error HOT 1
- Custom Component fails to load starting yesterday - SSL Error HOT 4
- won't connect HOT 2
- commands, unlock may not be working HOT 3
- Deprecated HA warning in 2022.11.2 for is_metric HOT 1
- Integration is using deprecated `DEVICE_CLASS_*` constants HOT 1
- Unable to Lock/Unlock Car HOT 2
- Unable to get SyncDate HOT 7
- Issue connecting/signing in HOT 2
- Unknow error trying to log in HOT 3
- Add EV battery SoC to default dashboard card HOT 2
- "unexpected error" after change at Hyundai/Kia HOT 3
- won't load HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ha_kia_hyundai.