hyundai-kia-connect / kia_uvo Goto Github PK
View Code? Open in Web Editor NEWA Home Assistant HACS integration that supports Kia Connect(Uvo) and Hyundai Bluelink. The integration supports the EU, Canada and the USA.
License: MIT License
A Home Assistant HACS integration that supports Kia Connect(Uvo) and Hyundai Bluelink. The integration supports the EU, Canada and the USA.
License: MIT License
After updating HA to 2021.6 (not sure if it's related) I can't login to the EU server anymore.
After getting error messages (not documented, sorry) I decided to re-add the integration, but now I receive an error:
Login failed into Kia Uvo EU Servers. Please use official Kia Uvo app to logout and log back in and try again!
I did as suggested, but I still receive the same error while trying to add the integration.
hello, i have a KIA Niro EV SX Touring and i can't see the battery level and mileage remaining, looks like it doesn't recognize it's an EV.
here is the trace of the data of binary_sensor.niro_de_ev_sx_touring_data
vehicle_data:
vehicleStatus:
lastStatusDate: '20210924122744'
airCtrlOn: false
engine: false
doorLock: true
doorOpen:
frontLeft: 0
frontRight: 0
backLeft: 0
backRight: 0
trunkOpen: false
airTempUnit: C
airTemp:
value: 00H
unit: 0
defrost: false
acc: false
evStatus:
batteryCharge: false
batteryStatus: 95
batteryPlugin: 0
remainTime2:
etc1:
value: 0
unit: 1
etc2:
value: 0
unit: 1
etc3:
value: 40
unit: 1
atc:
value: 0
unit: 1
drvDistance:
- rangeByFuel:
gasModeRange:
value: 0
unit: 1
evModeRange:
value: 447
unit: 1
totalAvailableRange:
value: 447
unit: 1
type: 2
hoodOpen: false
transCond: true
steerWheelHeat: 0
sideBackWindowHeat: 0
dte: {}
tirePressureLamp:
tirePressureLampAll: 0
battery:
batSoc: 80
batSignalReferenceValue: {}
remoteIgnition: true
seatHeaterVentInfo: {}
sleepModeCheck: false
lampWireStatus:
headLamp: {}
stopLamp: {}
turnSignalLamp: {}
windowOpen: {}
engineRuntime: {}
time: '20210924122744'
odometer:
unit: 1
value: 281.1
vehicleLocation:
head: 37
coord:
lat: xx.xxxxxx
lon: -xx.xxxxxx
alt: 34
type: 0
accuracy:
hdop: 6
pdop: 11
time: '20210924125429'
speed:
value: 0
unit: 0
vehicle_name: NIRO (DE EV) SX TOURING
friendly_name: NIRO (DE EV) SX TOURING Data
Getting this on attempted update:
Have migrated to Kia Account and has been working fine for a while but no longer working
kia_uvo - Exception in force update : string indices must be integers
Traceback (most recent call last):
File "/config/custom_components/kia_uvo/__init__.py", line 80, in update
await vehicle.update()
File "/config/custom_components/kia_uvo/Vehicle.py", line 41, in update
self.vehicle_data = await self.hass.async_add_executor_job(self.kia_uvo_api.get_cached_vehicle_status, self.token)
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/kia_uvo/KiaUvoApi.py", line 190, in get_cached_vehicle_status
return response["resMsg"]["vehicleStatusInfo"]
TypeError: string indices must be integers
Can you add the lock and unlock commands to the lock ?
Calling lock.lock on the lock.car_door_lock entity or pressing the lock button always results in a car unlock. The logs point to a successful lock action however the car always receives an unlock command. Unlocking the car works perfectly with the unlock service / button.
I've also recorded the locking + notification from the UVO app and attached.
2021-09-23 06:11:03 DEBUG (SyncWorker_8) [custom_components.kia_uvo.KiaUvoApiCA] kia_uvo - Received Pin validation response <Response [200]>
2021-09-23 06:11:06 DEBUG (SyncWorker_8) [custom_components.kia_uvo.KiaUvoApiCA] kia_uvo - Received lock_action response {'responseHeader': {'responseCode': 0, 'responseDesc': 'Success'}}
After the lock command is called there is a force update, and I am also seeing an error there potentially due to running the force update too closely to the lock command.
2021-09-23 06:11:16 DEBUG (MainThread) [custom_components.kia_uvo.Vehicle] kia_uvo - force_update_loop start 0 5
2021-09-23 06:11:16 DEBUG (MainThread) [custom_components.kia_uvo.Vehicle] kia_uvo - force_update_loop last_updated 2021-09-23 10:04:03+00:00
2021-09-23 06:11:19 DEBUG (SyncWorker_1) [custom_components.kia_uvo.KiaUvoApiCA] kia_uvo - Received forced vehicle data {'error': {'errorCode': '6533', 'errorDesc': 'We are currently processing an earlier inquiry for your vehicle. Please wait 90 seconds before issuing next request.'}, 'responseHeader': {'responseCode': 1, 'responseDesc': 'Failure'}}
2021-09-23 06:11:21 DEBUG (SyncWorker_10) [custom_components.kia_uvo.KiaUvoApiCA] kia_uvo - get_cached_vehicle_status response {'responseHeader': {'responseCode': 0, 'responseDesc': 'Success'}, 'result': {'status': {'lastStatusDate': '20210923100619', 'airCtrlOn': False, 'engine': False, 'doorLock': True, 'doorOpen': {'frontLeft': 0, 'frontRight': 0, 'backLeft': 0, 'backRight': 0}, 'trunkOpen': False, 'airTempUnit': 'C', 'airTemp': {'value': '01H', 'unit': 0}, 'defrost': False, 'lowFuelLight': False, 'acc': False, 'hoodOpen': False, 'transCond': True, 'steerWheelHeat': 0, 'sideBackWindowHeat': 0, 'dte': {}, 'tirePressureLamp': {}, 'battery': {'batSoc': 82, 'batSignalReferenceValue': {}}, 'remoteIgnition': True, 'seatHeaterVentInfo': {}, 'sleepModeCheck': False, 'lampWireStatus': {'headLamp': {}, 'stopLamp': {}, 'turnSignalLamp': {}}, 'windowOpen': {}, 'engineRuntime': {}}}}
2021-09-23 06:11:22 DEBUG (SyncWorker_10) [custom_components.kia_uvo.KiaUvoApiCA] kia_uvo - Get Service status data {'responseHeader': {'responseCode': 0, 'responseDesc': 'Success'}, 'result': {'maintenanceInfo': {'mtspServiceDate': '20190427', 'imatServiceOdometer': 12000.0, 'imatServiceOdometerUnit': 1, 'mtitServiceDate': '20200427', 'currentOdometer': 58480.1, 'currentOdometerUnit': 1, 'serviceOdometerDuration': 12000.0, 'serviceDaysDuration': 366, 'serviceMonthsThreshold': 12}}}
2021-09-23 06:11:23 DEBUG (SyncWorker_10) [custom_components.kia_uvo.KiaUvoApiCA] kia_uvo - Received Pin validation response <Response [200]>
2021-09-23 06:11:24 DEBUG (SyncWorker_10) [custom_components.kia_uvo.KiaUvoApiCA] kia_uvo - Get Vehicle Location {'error': {'errorCode': '6533', 'errorDesc': 'We are currently processing an earlier inquiry for your vehicle. Please wait 90 seconds before issuing next request.'}, 'responseHeader': {'responseCode': 1, 'responseDesc': 'Failure'}}
2021-09-23 06:11:24 ERROR (MainThread) [custom_components.kia_uvo.Vehicle] kia_uvo - Exception in update : 'result' - traceback: Traceback (most recent call last):
File "/config/custom_components/kia_uvo/Vehicle.py", line 54, in update
self.vehicle_data = await self.hass.async_add_executor_job(self.kia_uvo_api.get_cached_vehicle_status, self.token)
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/kia_uvo/KiaUvoApiCA.py", line 127, in get_cached_vehicle_status
vehicle_status["vehicleLocation"] = self.get_location(token)
File "/config/custom_components/kia_uvo/KiaUvoApiCA.py", line 144, in get_location
return response["result"]
KeyError: 'result'
2021-09-23 06:11:24 DEBUG (MainThread) [custom_components.kia_uvo.Vehicle] kia_uvo - force_update_loop force_update_finished 2021-09-23 10:04:03+00:00 2021-09-23 10:04:03+00:00
This integration looks awesome... Would love to help test in Canada..
Suggestion that the icons for the EV battery changed based on how much battery is remaining. Similar to how the battery shows for a mobile phone device.
100% mdi:battery
50% mdi:battery-50
As of now, entities are mixed into each other without clear separation. Need to come up with better structure.
The vehicle name that's set in UVO is part of the friendly name of all entities. However, it's not add as an attribute, so it's not possible to dynamically add it to your lovelace setup (ie. Markdown).
It would be nice if it was an attribute of the data entity too.
Enable unit testing, attach them as build flow
I get this error when trying to setup the integration.
2021-05-27 06:11:01 DEBUG (SyncWorker_1) [custom_components.kia_uvo.KiaUvoApi] kia_uvo - Get Device ID response {'retCode': 'F', 'resCode': '4017', 'resMsg': 'Invalid request value - Invalid Application Id.', 'msgId': 'ce1914c2-ed09-42de-9d8f-7124c2866856'}
2021-05-27 06:11:01 ERROR (MainThread) [custom_components.kia_uvo.config_flow] kia_uvo Exception in kia_uvo login : string indices must be integers
This worked great before update.
I tried removing the integration and then adding it again and still get this error when I try to login.
Could you add the low fuel and tyre pressure binary sensors please ? The overall tyre pressure warning would be enough for me but each tyre is available as well.
Hi,
Thanks for this integration, it looks promising!
I tried to install it, unfortunately it crashes after entering the login information with following exception:
ERROR (MainThread) [custom_components.kia_uvo.config_flow] kia_uvo Exception in kia_uvo login : 'redirectUrl'
Regards,
Kees
Hi
I'm trying to log into my migrated account, assuming that the UK is still classed as the EU as far as Kia are concerned (the website url I see to log in is eu-account.kia.com so I presume so) but is throwing the same error as #22.
Username and password are copied from keychain (the exact details used to log into the app on my iPhone) so certain they are correct.
After first forced update I see
But then after doing a second forced update I get
Was being driven about between updates hence the range difference from 223 to 213
Originally posted by @gadgetshed in #61 (comment)
So i have the blackout set to default (10pm - 6am). My car charges between 12:30am and 4:30am as my schedule for cheapest electric is then. However because of the blackout the binary_sensor.ioniq_charging never updates.
Is there a way to ignore the blackout when the charger is connected or something else similar to that?
I like the blackout as it avoids unrequired battery usage especially as i dont charge daily.
Only a minor thing, but the readme says the force update happens ever 2 hours. But currently the const for FORCE_SCAN_INTERVAL is currently 240 minutes - so 4 hours. So I'm not sure if the const should be reduced to 120 mins or the readme updated?
Hi,
looks good, integration was super easy !
Thank you very much for your great work !!! 1111 ๐
Is there any reason the integration "only" creates 10 entities? e.g. on your screenshot it shows the 12 v battery but the entity wasnt created in Homeassitant when I installed it.
Thank you again !
Not sure if you have seen this icon but seems more suited to the car doors ?
mdi:car-door
When adding the integration, I am able to login however only 3 entities appear.
binary_sensor.car_data (shows On)
sensor.car_last_update (shows Invalid Timestamp)
device_tracker.car_location (shows unavailable)
Tried removing the integration and repo from HACS, rebooting the host, re-adding the repo, restarting HA and re-adding. Only getting the above 3 entities instead of the 10+ previously. Also tried logging out and in to the UVO app and site during the above steps, no change.
Also the binary_sensor.car_data vehicle_data attribute is empty (state is {}).
Found the following two error logs right after adding the integration:
Logger: custom_components.kia_uvo.Vehicle
Source: custom_components/kia_uvo/Vehicle.py:62
Integration: Kia Uvo / Hyundai Bluelink (documentation)
First occurred: 9:28:30 PM (1 occurrences)
Last logged: 9:28:30 PM
kia_uvo - Exception in update : 'result' - traceback: Traceback (most recent call last): File "/config/custom_components/kia_uvo/Vehicle.py", line 54, in update self.vehicle_data = await self.hass.async_add_executor_job(self.kia_uvo_api.get_cached_vehicle_status, self.token) File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/kia_uvo/KiaUvoApiCA.py", line 127, in get_cached_vehicle_status vehicle_status["vehicleLocation"] = self.get_location(token) File "/config/custom_components/kia_uvo/KiaUvoApiCA.py", line 144, in get_location return response["result"] KeyError: 'result'
And:
Logger: homeassistant.components.lock
Source: custom_components/kia_uvo/lock.py:38
Integration: Lock (documentation, issues)
First occurred: 9:28:30 PM (2 occurrences)
Last logged: 9:28:30 PM
Error adding entities for domain lock with platform kia_uvo
Error while setting up kia_uvo platform for lock
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 503, in _async_add_entity
original_icon=entity.icon,
File "/config/custom_components/kia_uvo/lock.py", line 42, in icon
return "mdi:lock" if self.is_locked else "mdi:lock-open-variant"
File "/config/custom_components/kia_uvo/lock.py", line 38, in is_locked
return self.vehicle.vehicle_data["vehicleStatus"]["doorLock"]
KeyError: 'vehicleStatus'
Hi,
I am interested in understanding the API flow in more detail. I don't have HAS but want to be able to query the car battery status for my own in-home display.
Looking at the API flow, there are quite a few calls being made to get to that point.
My questions are:
Bonus question: why have Kia made this sooooo complex?
And deploy it into pypi
If possible it would be nice if a geocoded location was added tot the location. That way you could add the current address of the car to a dashboard or to a notification.
Just had 2 occurrences of this in my log:
Logger: homeassistant.util.async_
Source: util/async_.py:131
First occurred: 12:12:06 (2 occurrences)
Last logged: 12:42:06
Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for kia_uvo doing I/O at custom_components/kia_uvo/KiaUvoApi.py, line 37: response = requests.post(url, headers=headers, json=payload)
Positive posts;
Investigation required;
Looks great so far, I'm currently using NR and Bluelinky so this is a great progression
There is a missing entity for me, the fuel range, signified in the vehicle data as dte: value:
unit: 3
is miles.
Also would it be possible for an option for the odometer to be in miles also ? No problem if not, I'll just create a template sensor.
vehicle_data:
vehicleLocation:
coord:
lat: xxxxxxxxx
lon: -xxxxxxxxx
alt: 0
type: 0
head: 2
speed:
value: 0
unit: 1
accuracy:
hdop: 10
pdop: 10
time: '20210410224324'
vehicleStatus:
airCtrlOn: false
engine: false
doorLock: true
doorOpen:
frontLeft: 0
frontRight: 0
backLeft: 0
backRight: 0
trunkOpen: false
airTemp:
value: 01H
unit: 0
hvacTempType: 1
defrost: false
lowFuelLight: false
acc: false
hoodOpen: false
steerWheelHeat: 0
sideBackWindowHeat: 0
dte:
value: 106
unit: 3
tirePressureLamp:
tirePressureLampAll: 0
tirePressureLampFL: 0
tirePressureLampFR: 0
tirePressureLampRL: 0
tirePressureLampRR: 0
battery:
batSoc: 61
batState: 0
time: '20210410224323'
odometer:
value: 4175.7
unit: 1
Hi!
First of all, thanks for creating this integration, it works out of the box ๐ฏ
I wonder if you could integrate sending the data to ABRP. I'm currently using Tronity to do this, but is has some disadvantages:
I think this integration can make a difference there because:
I have some examples to might help to estimate if this is something you might consider:
As a suggesting on how to set it up:
Think it would be great! Going on a long trip, flip the switch in home-assistant and voila, ABRP gets the data every 30 minutes and updates the routing plan ๐
After updating to 2c0853f the integration doesn't start:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 293, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/config/custom_components/kia_uvo/__init__.py", line 123, in async_setup_entry
await update(dt_util.utcnow())
File "/config/custom_components/kia_uvo/__init__.py", line 110, in update
event_time_local = event_time_utc.astimezone(getTimezoneByRegion(vehicle.kia_uvo_api.region))
File "/config/custom_components/kia_uvo/utils.py", line 17, in getTimezoneByRegion
if REGIONS[region] == REGION_CANADA:
KeyError: False
First of all, I just wanted to say a massive thank you for taking the time to put this together. I was really hoping someone would, and really appreciate it.
When I installed it, I got an exception setting up the sensors:
2021-04-10 17:38:54 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.kia_uvo
2021-04-10 17:38:54 INFO (MainThread) [homeassistant.components.device_tracker] Setting up device_tracker.kia_uvo
2021-04-10 17:38:54 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.kia_uvo
2021-04-10 17:38:54 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.kia_uvo entity: binary_sensor.niro_ev_19_hood
2021-04-10 17:38:54 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.kia_uvo entity: binary_sensor.niro_ev_19_trunk
2021-04-10 17:38:54 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.kia_uvo entity: binary_sensor.niro_ev_19_door_front_left
2021-04-10 17:38:54 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.kia_uvo entity: binary_sensor.niro_ev_19_door_front_right
2021-04-10 17:38:54 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.kia_uvo entity: binary_sensor.niro_ev_19_door_rear_left
2021-04-10 17:38:54 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.kia_uvo entity: binary_sensor.niro_ev_19_door_rear_right
2021-04-10 17:38:54 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.kia_uvo entity: binary_sensor.niro_ev_19_door_lock
2021-04-10 17:38:54 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.kia_uvo entity: binary_sensor.niro_ev_19_engine
2021-04-10 17:38:54 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.kia_uvo entity: binary_sensor.niro_ev_19_data
2021-04-10 17:38:54 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new device_tracker.kia_uvo entity: device_tracker.niro_ev_19_location
2021-04-10 17:38:54 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up kia_uvo platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 200, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/kia_uvo/sensor.py", line 16, in async_setup_entry
("fuelDrivingDistance", "Range by Fuel", vehicle.vehicle_data["vehicleStatus"]["evStatus"]["drvDistance"][0]["rangeByFuel"]["gasModeRange"]["value"], "km", "mdi:road-variant", None),
KeyError: 'gasModeRange'
Our Kia is an eNiro 4, so pure electric, so I'm not surprised by this. I guess it just needs handling.
When I look at binary_sensor.niro_ev_19_data the data seems to be all there as attributes, so I guess it is just the creation of the sensors, with a way to handle not having gasModeRange for pure EVs
evStatus:
batteryCharge: false
batteryStatus: 47
batteryPlugin: 0
remainTime2:
etc1:
value: 41
unit: 1
etc2:
value: 1180
unit: 1
etc3:
value: 400
unit: 1
atc:
value: 380
unit: 1
drvDistance:
- rangeByFuel:
evModeRange:
value: 123
unit: 3
totalAvailableRange:
value: 123
unit: 3
type: 2
Hi, thanks for inventing this integration. I tried it but I get this message in the logging during integration (after entering username and password):
Logger: custom_components.kia_uvo.config_flow
Source: custom_components/kia_uvo/config_flow.py:46
Integration: Kia Uvo (documentation)
First occurred: 10:01:22 PM (3 occurrences)
Last logged: 10:03:14 PM
kia_uvo Exception in kia_uvo login : 'redirectUrl'
I login from Nederland. Can you help me?
William
Hey @fuatakgun,
thanks a lot for your hard work on this.
Are there any plans to apply this Home Assistant Integration into Home Assistant Core to list as an official integration?
If yes, do you know what is missing or where support is needed?
In the US and would love to use this integration on my Kia Sorrento. I won't be much use in help developing but would be happy to test and provide any helpful logs etc. Let me know.
When submitting my username and password I get 'Unknown error occurred'. Looking at the log I am none the wiser and hope they make sense to you.
I am in the EU, and had previously migrated to the Kia Account, and looking at previous issues it doesn't look like the same error.
2021-05-16 20:39:02 WARNING (MainThread) [homeassistant.loader] You are using a custom integration kia_uvo which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-05-16 20:42:31 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
resp = await self._request_handler(request)
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 56, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 18, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 74, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 135, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 131, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 155, in post
return await super().post(request, flow_id)
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 63, in wrapper
result = await method(view, request, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 109, in post
result = await self._flow_mgr.async_configure(flow_id, data)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 199, in async_configure
result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 257, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
File "/config/custom_components/kia_uvo/config_flow.py", line 70, in async_step_user
self.kia_uvo_api = KiaUvoApi(username, password)
TypeError: __init__() missing 1 required positional argument: 'use_email_with_geocode_api'
Odd issue where the battery for a period of time showed 0% despite showing 90% previously.
This actually reflected the app until i forced a refresh to get the value back to normal. I've noticed this a few times with the bluelink app?
Maybe some logic to check for instant recharge of battery which couldn't happen unless the odometer increases or something is left on but even then it wouldn't be 90%-0%
thanks for your integration. I switched from Domoticz, where I used my own plugin using a python version of the BlueLinky API-wrapper. In HA I am using a node-red/MQTT interface with the Bluelinky api-wrapper. In the BlueLinky api-wrapper a few more information requests and controls of the car are available (also in node red) such as:
Also in the implementation of BLuelinky vs you integration I see a few differences:
Getting a unique stamp header, every time it is run
A pin code (giving a control token, expiring every 10 minutes) in the UVO-app is needed for the actions on the car and a daily refresh of an access token is implemented. I don't see that pin implemented in your code.
In my python lib and node-red implementation I also added the possibility to plan a route by ABRP (including charging stations) and send it to the car.
I see you mentioning BlueLinky in the reactions here. Are you also familiar with the discord forum on Bluelinky, i didn't find your account name?
Do you have a wishlist in which I can contribute?
So, first time trying the integration on running car and the Engine Binary Sensor doesn't update, the engine is showing as true in the data though:
vehicleLocation:
coord:
lat: xxxxxx
lon: -xxxxxxx
alt: 0
type: 0
head: 167
speed:
value: 0
unit: 1
accuracy:
hdop: 10
pdop: 10
time: '20210412101103'
vehicleStatus:
airCtrlOn: true
engine: true
doorLock: true
doorOpen:
frontLeft: 0
frontRight: 0
backLeft: 0
backRight: 0
trunkOpen: false
airTemp:
value: 0CH
unit: 0
hvacTempType: 1
defrost: false
lowFuelLight: false
acc: true
hoodOpen: false
transCond: true
steerWheelHeat: 0
sideBackWindowHeat: 0
dte:
value: 88
unit: 3
tirePressureLamp:
tirePressureLampAll: 0
tirePressureLampFL: 0
tirePressureLampFR: 0
tirePressureLampRL: 0
tirePressureLampRR: 0
battery:
batSoc: 65
batState: 0
time: '20210412101103'
odometer:
value: 4175.7
unit: 1
I have created two new hyundai accounts but when I try to install kia_uvo with them it fails with the following error/log:
2021-08-10 14:49:44 DEBUG (SyncWorker_3) [custom_components.kia_uvo.KiaUvoApiEU] kia_uvo - Get Device ID request {'ccsp-service-id': '6d477c38-3ca4-4cf3-9557-2a1929a94654', 'Stamp': 'fWILIMmJ...V6YC9BI=', 'Content-Type': 'application/json;charset=UTF-8', 'Host': 'prd.eu-ccapi.hyundai.com:8080', 'Connection': 'Keep-Alive', 'Accept-Encoding': 'gzip', 'User-Agent': 'okhttp/3.12.0'} {'pushRegId': 'cS0...A8j5B', 'pushType': 'GCM', 'uuid': '3daa...b4ff9a'}
2021-08-10 14:49:44 DEBUG (SyncWorker_3) [custom_components.kia_uvo.KiaUvoApiEU] kia_uvo - Get Device ID response {'retCode': 'S', 'resCode': '0000', 'resMsg': {'deviceId': 'f980e146-4202-41d1-9be9-436a3faf90b3'}, 'msgId': '4c503cf7-0000-0000-0000-c20d000000'}
2021-08-10 14:49:44 DEBUG (SyncWorker_3) [custom_components.kia_uvo.KiaUvoApiEU] kia_uvo - Get cookies request https://prd.eu-ccapi.hyundai.com:8080/api/v1/user/oauth2/authorize?response_type=code&state=test&client_id=000000000-3ca4-4cf3-9557-000000000000&redirect_uri=https://prd.eu-ccapi.hyundai.com:8080/api/v1/user/oauth2/redirect&lang=en
2021-08-10 14:49:45 DEBUG (SyncWorker_3) [custom_components.kia_uvo.KiaUvoApiEU] kia_uvo - Get cookies response {'TS0154565f': '01cba...b36a7dc', 'account': 'ZDJjZD...de7ac938f'}
2021-08-10 14:49:45 DEBUG (SyncWorker_3) [custom_components.kia_uvo.KiaUvoApiEU] kia_uvo - Sign In Response {'errId': '33a0...e347', 'errCode': '4003', 'errMsg': 'Invalid values', 'errBody': {'userId': '', 'remainCount': 4, 'remainTime': 300}}
2021-08-10 14:49:45 ERROR (MainThread) [custom_components.kia_uvo.config_flow] kia_uvo Exception in kia_uvo login : 'redirectUrl' - traceback: Traceback (most recent call last):
File "/config/custom_components/kia_uvo/config_flow.py", line 150, in async_step_user
self.token = await self.hass.async_add_executor_job(
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/kia_uvo/KiaUvoApiEU.py", line 150, in login
parsed_url = urlparse(response.json()["redirectUrl"])
KeyError: 'redirectUrl'
Any hints?
First of all, I was thrilled to find this integration, really great work!
I ran into an issue today with the car location not being updated along with the rest of the data. An hour after arriving home, and after force updating multiple times, the car would still report as being parked at a remote location, even though I was home.
I checked the UVO app, and sure enough, same thing there. After updating through the app, the location still wasn't updated.
I was able to get the correct location in the app by unchecking and then checking the car location symbol, as indicated by the arrow below. Therefore, I suspect that the location is updated by a different API call, which is not called from this integration when force updating.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.