Hyundai-Kia-Connect / kia_uvo

A Home Assistant HACS integration that supports Kia Connect(Uvo) and Hyundai Bluelink. The integration supports the EU, Canada and the USA.
MIT License
433 stars 85 forks source link

Car Battery (12v) showing as unavailable #481

Closed ParadingLunatic closed 1 year ago

ParadingLunatic commented 1 year ago

Please check Services, Known Bug / Issues and Troubleshooting over here first: https://github.com/fuatakgun/kia_uvo/blob/master/README.md Region and Brand of car USA / Kia Stinger

Version of the integration 1.8.5

Describe the bug the battery entity is showing up as Unavailable in HA. It also says that the entity is no longer being provided by the kia_uvo integration.

Debug logs if an error occurred Hopefully this will be readable.

2022-12-11 17:43:04.897 DEBUG (MainThread) [custom_components.kia_uvo] kia_uvo - async_setup_entry started - <homeassistant.config_entries.ConfigEntry object at 0x7fd4119da9b0>
2022-12-11 17:43:04.898 DEBUG (MainThread) [custom_components.kia_uvo.Vehicle] kia_uvo - Received token into Vehicle Object {'valid_until': '2022-12-11 18:16:45.503692', 'access_token': '51376e8c-406c-4252-b826-50904471879b', 'refresh_token': None, 'device_id': 'KNAE45LC3N6112421', 'vehicle_name': 'My STINGER', 'vehicle_id': '112421', 'vehicle_regid': '43571460-818f-4f0c-b14f-7b79005c61b4', 'vehicle_model': 'STINGER', 'vehicle_registration_date': 'missing', 'stamp': 'NoStamp'}
2022-12-11 17:43:04.898 DEBUG (MainThread) [custom_components.kia_uvo.Vehicle] kia_uvo - Refresh token started 2022-12-11 18:16:45.503692 2022-12-11 17:43:04.898588 False
2022-12-11 17:43:04.899 DEBUG (SyncWorker_4) [custom_components.kia_uvo.KiaUvoAPIUSA] sending https://api.owners.kia.com/apigw/v1/cmm/gvi request with {'vehicleConfigReq': {'airTempRange': '0', 'maintenance': '1', 'seatHeatCoolOption': '0', 'vehicle': '1', 'vehicleFeature': '0'}, 'vehicleInfoReq': {'drivingActivty': '0', 'dtc': '1', 'enrollment': '1', 'functionalCards': '0', 'location': '1', 'vehicleStatus': '1', 'weather': '0'}, 'vinKey': ['43571460-818f-4f0c-b14f-7b79005c61b4']}
2022-12-11 17:43:06.677 DEBUG (SyncWorker_4) [custom_components.kia_uvo.KiaUvoAPIUSA] got response {"status":{"statusCode":0,"errorType":0,"errorCode":0,"errorMessage":"Success with response body"},"payload":{"vehicleInfoList":[{"vinKey":"43571460-818f-4f0c-b14f-7b79005c61b4","vehicleConfig":{"vehicleDetail":{"vehicle":{"vin":"KNAE45LC3N6112421","trim":{"modelYear":"2022","salesModelCode":"H6382","optionGroupCode":"010","modelName":"STINGER","factoryCode":"J5","projectCode":"CKPE","trimName":"GT1","driveType":"1","transmissionType":"1","ivrCategory":"3","btSeriesCode":"H"},"telematics":1,"mileage":"6519.5","mileageSyncDate":"20221211071029","exteriorColor":"MICRO BLUE","exteriorColorCode":"M6B","fuelType":1,"invDealerCode":"VA065","testVehicle":"0","supportedApps":[{"appType":"0"},{"appType":"5","appImage":{"imageName":"uvo-app.png","imagePath":"/content/dam/kia/us/owners/image/common/app/access/","imageType":"2","imageSize":{"length":"100","width":"100","uom":0}}}],"activationType":2},"images":[{"imageName":"2022-stinger-gt1-m6b.png","imagePath":"/content/dam/kia/us/owners/image/vehicle-app/2022/stinger/gt1/","imageType":"1","imageSize":{"length":"100","width":"100","uom":0}}],"device":{"launchType":"0","swVersion":"CKPE.USA.S5W_M.V009.001.221011","telematics":{"generation":"3","platform":"1","tmsCenter":"1","billing":true},"versionNum":"GASOLINE","headUnitType":"0","hdRadio":"X40HA","ampType":"NA","modem":{"meid":"356787732190881","mdn":"6575014103"},"headUnitName":"avn5w","bluetoothRef":"20","headUnitDesc":"AVN5.0W"}},"maintenance":{"nextServiceMile":5480.5,"maintenanceSchedule":[6000,12000,15000,18000,24000,30000,36000,42000,45000,48000,54000,60000,66000,72000,75000,78000,84000,90000]},"billingPeriod":{"freeTrial":{"value":12,"unit":0},"freeTrialExtension":{"value":12,"unit":1},"servicePeriod":{"value":60,"unit":1}}},"lastVehicleInfo":{"vehicleNickName":"My STINGER","preferredDealer":"VA069","licensePlate":"","psi":"","customerType":0,"enrollment":{"provStatus":"4","enrollmentStatus":"1","enrollmentType":"0","registrationDate":"20211223","expirationDate":"20221219","expirationMileage":"100000","freeServiceDate":{"startDate":"20211219","endDate":"20221219"}},"activeDTC":{"dtcActiveCount":"0"},"vehicleStatusRpt":{"statusType":"2","reportDate":{"utc":"20221211224306","offset":-8},"vehicleStatus":{"climate":{"airCtrl":false,"defrost":false,"airTemp":{"value":"LOW","unit":1},"heatingAccessory":{"steeringWheel":0,"sideMirror":0,"rearWindow":0},"heatVentSeat":{"driverSeat":{"heatVentType":0,"heatVentLevel":1},"passengerSeat":{"heatVentType":0,"heatVentLevel":1},"rearLeftSeat":{"heatVentType":0,"heatVentLevel":1},"rearRightSeat":{"heatVentType":0,"heatVentLevel":1}}},"engine":false,"doorLock":true,"doorStatus":{"frontLeft":0,"frontRight":0,"backLeft":0,"backRight":0,"trunk":0,"hood":0},"lowFuelLight":false,"ign3":false,"transCond":true,"distanceToEmpty":{"value":273,"unit":3},"tirePressure":{"all":0},"dateTime":{"utc":"20221211224306","offset":-8},"syncDate":{"utc":"20221211221029","offset":-8},"batteryStatus":{"sensorStatus":1,"deliveryMode":1},"sleepMode":false,"lampWireStatus":{"headLamp":{"headLampStatus":false,"lampLL":false,"lampRL":false,"lampLH":false,"lampRH":false,"lampLB":false,"lampRB":false},"stopLamp":{"leftLamp":false,"rightLamp":false},"turnSignalLamp":{"lampLF":false,"lampRF":false,"lampLR":false,"lampRR":false}},"windowStatus":{"windowFL":0,"windowFR":0,"windowRL":0,"windowRR":0},"smartKeyBatteryWarning":false,"washerFluidStatus":false,"engineOilStatus":false,"engineRuntime":{},"remoteControlAvailable":1,"valetParkingMode":0,"rsaStatus":0}},"location":{"coord":{"lat":38.81915,"lon":-77.4348111111,"alt":87,"type":0,"altdo":0},"head":74,"speed":{"value":0,"unit":1},"accuracy":{"hdop":6,"pdop":10},"syncDate":{"utc":"20221211221029","offset":-8}},"financed":true,"financeRegistered":false,"linkStatus":0,"rsaStatus":0}}]}}
2022-12-11 17:43:06.775 DEBUG (MainThread) [custom_components.kia_uvo.Vehicle] kia_uvo - LastUpdated 2022-12-11 22:10:29+00:00 - Timezone UTC
2022-12-11 17:43:06.775 DEBUG (MainThread) [custom_components.kia_uvo.Vehicle] kia_uvo - Engine type set VEHICLE_ENGINE_TYPE.IC
2022-12-11 17:43:06.793 DEBUG (MainThread) [custom_components.kia_uvo.sensor] skipping sensor for missing data, key:vehicleStatus.fuelLevel
2022-12-11 17:43:06.793 DEBUG (MainThread) [custom_components.kia_uvo.sensor] skipping sensor for missing data, key:lastService.value
2022-12-11 17:43:06.793 DEBUG (MainThread) [custom_components.kia_uvo.sensor] skipping sensor for missing data, key:vehicleLocation.geocodedLocation.display_name
2022-12-11 17:43:06.793 DEBUG (MainThread) [custom_components.kia_uvo.sensor] skipping sensor for missing data, key:vehicleStatus.battery.batSoc

Outlined here: https://github.com/fuatakgun/kia_uvo/blob/master/README.m

To Reproduce Not really sure if there's a way to force reproduce the behavior.

Expected behavior battery status to be available

Screenshots If applicable, add screenshots to help explain your problem.

Additional context

ParadingLunatic commented 1 year ago

Also for some info. HACS version 1.28.4. HA Core 2022.12.1 (just updated to 2022.12.2 and same issue). I know it was working prior to the 2022.12 update but not sure about after although I'm not sure if HA Core version matters much.

cdnninja commented 1 year ago

Do you mean the "Car Battery" sensor that was a percentage? If so please check this is showing up in the native kia app. I don't see this data in your logs. Only data showing is "batteryStatus":{"sensorStatus":1,"deliveryMode":1}

ParadingLunatic commented 1 year ago

That's the strange thing, I don't recall ever seeing battery percentage in the Kia Access app or the Kia Owners website. But with that said, the Kia Access app on the phone itself was updated on my phone 3 days ago and it got quite a revamp/makeover. The website doesn't look like it has changed at all.

cdnninja commented 1 year ago

If the native app and website don't show battery percentage and the api doesn't contain it unfortunately nothing I can do to fix this one. You would simple delete the sensor.

Now we have seen apis briefly miss data and fix it in the future. At which point the sensor will return.

ParadingLunatic commented 1 year ago

Yeah that makes sense. Pretty sure I've seen something like that happen before. If you want go ahead and close it and I'll delete the entity. Hopefully it comes back.

On Sun, Dec 11, 2022, 9:03 PM cdnninja @.***> wrote:

If the native app and website don't show battery percentage and the api doesn't contain it unfortunately nothing I can do to fix this one. You would simple delete the sensor.

Now we have seen apis briefly miss data and fix it in the future. At which point the sensor will return.

— Reply to this email directly, view it on GitHub https://github.com/Hyundai-Kia-Connect/kia_uvo/issues/481#issuecomment-1345761906, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD33KWQPUL4OE4ELWKWKJ43WM2BXRANCNFSM6AAAAAAS3IQDBY . You are receiving this because you authored the thread.Message ID: @.***>