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
398 stars 84 forks source link

Daily stats not working #760

Open Madifor1972 opened 8 months ago

Madifor1972 commented 8 months 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

Version of the integration

Describe the bug A clear and concise description of what the bug is.

The daily stats stays on 0 it doesn’t seem to work (Hyundai Tucson / Europe)

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

To Reproduce

Expected behavior

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

Additional context

cdnninja commented 8 months ago

As per our issues template, what version is this? Did this work before? What year is the car? Most likely will need debug logs too.

Madifor1972 commented 8 months ago

car is from 2022 . The feature daily stats is as far as I know a new function in the home assistant integration (Never seen it working). Using latest ha integration version

cdnninja commented 8 months ago

It is working in your native app?

Madifor1972 commented 8 months ago

Yes in the native (Hyundai) app, all works fine. I can see all my trips …

chrbast commented 7 months ago

Same problem here with my Kia (Niro EV)

Madifor1972 commented 6 months ago

Any news regarding the issue with the missing driving in the home assist plugin. As said in the Hyundai app , all works fine…

cdnninja commented 6 months ago

A beta is out. Give that a try.

Madifor1972 commented 6 months ago

Where can i find the beta ? I hope it will not brick my install when i copy the beta over the original release

cdnninja commented 6 months ago

I switched this to standard release now. HACS should auto update to 2.19

Madifor1972 commented 6 months ago

Updated my ha / hacs integration this morning..

used my car after that so far the intergration doesn’t seem to work. Looks like it is not pulling the data. But that looks like to valid for more entities.. last update varies between last update 2-4 hours ago..scan interval is set to 15 minutes and forced refresh to minimum value of 90 minutes.Some entities update more frequently (for example location).. The last updated at,entity value is now 27 minutes

cdnninja commented 6 months ago

Please provide logs. I would also adjust those scan times to be longer in particular force scan. That is rather short and can impact your 12v battery.

Madifor1972 commented 6 months ago

Not sure which log file you want, what I can see that there is no entry in the default log view (selected from the side bar) stating that it is retrieving the daily driving stat(s) or that this value is in error state. So as far as I can tell now , HA / the integration isn’t asking for it ?

cdnninja commented 6 months ago

Please follow the read me and enable debug logging.

cdnninja commented 6 months ago

What region are you in?

Madifor1972 commented 6 months ago

Eu Verstuurd vanaf mijn iPhoneOp 28 jan 2024 om 17:04 heeft cdnninja @.***> het volgende geschreven: What region are you in?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

Bubo08 commented 5 months ago

Hi Madifor1972

Were you able to create a debug log or is the bug solved?

Madifor1972 commented 5 months ago

Issue is still there ,my problem is that the debug log is not stored separately ( to my knowledge) meaning a lot more info will be then to need for your trouble shooting. Please confirm my assumption is correct or give me some tips how to create a separate debug log for this entity.

fuatakgun commented 5 months ago

You are right, there is only one log file, you can just keep the logs coming from kia_uvo/ hyundai_kia_connect and remove the rest.

Madifor1972 commented 5 months ago

It is enabled will check the coming days if I see any entries and let you know

Madifor1972 commented 5 months ago

I have enabled the debug with the options as described in the intergration description and the following file is created. [home-assistant_kia_uvo_2024-02-03T19-16-57.500Z.log](https://github.com/Hyundai-Kia-Connect/kia_uvo/files/14152630/home-assistant_kia_uvo_2024-02-03T19-16-57.500Z.log)

Madifor1972 commented 5 months ago

Could it be that the option is currently not yet fully implemented ? Checking the GitHub page nothing is mentioned about it. https://github.com/Hyundai-Kia-Connect/kia_uvo

cdnninja commented 5 months ago

Looks like your car type is different. It is returning

2024-02-03 07:50:01.988 DEBUG (SyncWorker_1) [hyundai_kia_connect_api.KiaUvoApiEU] hyundai_kia_connect_api - Get Vehicles Response: {'retCode': 'S', 'resCode': '0000', 'resMsg': {'vehicles': [{'vin': 'TMAJE812DNJ076321', 'vehicleId': 'dc4736a1-77d1-4073-b00e-36efbc475933', 'vehicleName': 'TUCSON', 'type': 'PE', 'tmuNum': '-', 'nickname': 'TUCSON', 'year': '2022', 'master': True, 'carShare': 0, 'regDate': '2022-03-09 10:24:28.737', 'detailInfo': {'inColor': 'NNB', 'outColor': 'A5G', 'saleCarmdlCd': 'JF', 'bodyType': '2', 'saleCarmdlEnNm': 'TUCSON'}, 'protocolType': 0, 'ccuCCS2ProtocolSupport': 0}]}, 'msgId': '5e50d617-3ea2-4460-86ed-a16a8167cd44'}

No engine type but rather a Type of PE. We only process daily stats for EV right now. What type of engine is this? Is this a plugin electric or full electric?

@Bubo08 can you check what yours is returning for engine type or type? Code that needs correcting is here but want to align to yours as well. https://github.com/Hyundai-Kia-Connect/hyundai_kia_connect_api/blob/2ca8b233c0c012d702f511702bb40991914f42c1/hyundai_kia_connect_api/KiaUvoApiEU.py#L286-L294

Madifor1972 commented 5 months ago

Plugin hybrid so that makes sense then. As the Hyundai app it selves keep a record of the trips you make during the day (I must atmit this is not always 100% correct sometime the last trip of a day is not shown ) But gives a good idea how much I drive.. An other option in HA would be make a daily diff calculation and store that some where .. Hopenfully you get it also for the other engine models working but I can imagine it isn’t always easy if you can’t test it yourselves

cdnninja commented 5 months ago

Easy to adjust. I'll do that soon and send something to test.

cdnninja commented 5 months ago

https://github.com/Hyundai-Kia-Connect/hyundai_kia_connect_api/pull/507 may solve this for PHEV owners. Could you edit your manifest.json file and switch the API version to 3.17.3 and let me know if it works for you? A restart of home assistant will be needed once the file is edited.

Madifor1972 commented 5 months ago

Finally understood what you meant / have read your message correctly.. Just after json update and restart, also new version of the integration.. let you know if it works now

cdnninja commented 5 months ago

It's now in the standard release so no need to adjust as of today's update.

Madifor1972 commented 5 months ago

Look like that it is not working for plugin hybrids or not supported on the eu servers for Hyundai… Solar no luck yet .

cdnninja commented 5 months ago

Does your native app show driving stats?

Madifor1972 commented 5 months ago

As you can see in the app the trips for today are there

Verzonden vanuit Outlook voor iOShttps://aka.ms/o0ukef


Van: cdnninja @.> Verzonden: Monday, February 26, 2024 7:51:50 PM Aan: Hyundai-Kia-Connect/kia_uvo @.> CC: Madifor1972 @.>; Author @.> Onderwerp: Re: [Hyundai-Kia-Connect/kia_uvo] Daily stats not working (Issue #760)

Does your native app show driving stats?

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

ZuinigeRijder commented 3 months ago

@cdnninja I have a user with a Hyundai Kona SX2 (ICE version) in Europe., which also does not show daily driving stats. However, the trip info is retrieved. So I think KiaUvoApiEU.py should try to retrieve daily stats in Europe for all engine.types and not only for EV and PHEV?

See this (closed) issue from hyundai_kia_connect_monitor: https://github.com/ZuinigeRijder/hyundai_kia_connect_monitor/issues/58#issuecomment-2028891197

Note that I did not have a response back of the user who submitted (and closed) the issue.

Madifor1972 commented 3 months ago

Doesn’t work for phev either so most likely works only for full electric.

Verzonden vanuit Outlook voor iOShttps://aka.ms/o0ukef


Van: Zuinige Rijder @.> Verzonden: Tuesday, April 2, 2024 5:16:10 PM Aan: Hyundai-Kia-Connect/kia_uvo @.> CC: Madifor1972 @.>; Author @.> Onderwerp: Re: [Hyundai-Kia-Connect/kia_uvo] Daily stats not working (Issue #760)

@cdnninjahttps://github.com/cdnninja I have a user with a Hyundai Kona SX2 (ICE version) in Europe., which also does not show daily driving stats. However, the trip info is retrieved. So I think KiaUvoApiEU.py should try to retrieve daily stats in Europe for all engine.types and not only for EV and PHEV?

See this (closed) issue from hyundai_kia_connect_monitor: ZuinigeRijder/hyundai_kia_connect_monitor#58 (comment)https://github.com/ZuinigeRijder/hyundai_kia_connect_monitor/issues/58#issuecomment-2028891197

Note that I did not have a response back of the user who submitted (and closed) the issue.

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

cdnninja commented 3 months ago

It's filtered in our code. If it works in native app we could change that but many cars don't support it. Need to figure out which ones do vs don't.

Madifor1972 commented 3 months ago

The app from Hyundai shows me the trip info. So if you sum them you have the daily amount of driven km’s.

Verzonden vanuit Outlook voor iOShttps://aka.ms/o0ukef


Van: cdnninja @.> Verzonden: Tuesday, April 2, 2024 6:34:25 PM Aan: Hyundai-Kia-Connect/kia_uvo @.> CC: Madifor1972 @.>; Author @.> Onderwerp: Re: [Hyundai-Kia-Connect/kia_uvo] Daily stats not working (Issue #760)

It's filtered in our code. If it works in native app we could change that but many cars don't support it. Need to figure out which ones do vs don't.

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

ZuinigeRijder commented 3 months ago

@Madifor1972

The DailyStats shows the % of electricity use of the different parts of the system:

Recuperation    Engine  Climate Electr. Batt.Care
19.3%           92% 1.2%    6.7%    0%

So it makes sense this is only available to an EV.

Of course the totals of tripinfo of a day could be computed, but this is not the information shown in dailystats.