robske110 / IDDataLogger

A DataLogger for Volkwagen ID vehicles. Includes an iOS Widget. Works with VW ID.3 and ID.4 vehicles.
GNU General Public License v3.0
90 stars 13 forks source link

MySkoda #23

Open mrubioroy opened 3 years ago

mrubioroy commented 3 years ago

Hi,

I've got IDDataLogger working with an ID.4. I'm trying now with a Skoda Enyaq but it doesn't work out of the box.

I suspect the problem being with weconnect references in LOGIN_BASE and in subsequent parsing:

LOGIN_BASE = "https://login.apps.emea.vwapps.io/authorize?nonce=asdfsadf3&redirect_uri=weconnect://authenticated"

When I use skodaid, myskoda, or skodaconnect in place of weconnect, the response I get is:

{"error":"invalid_request","error_description":"Mismatching redirection URI"}

The URLs below allow to login with the browser, but they don't provide the token, because that's not included in the response_type parameter we get from the server.

https://vwid.vwgroup.io/oidc/login-user?prompt=login&qualifier=vwid
https://skodaid.vwgroup.io/oidc/login-user?prompt=login&qualifier=skodaid

Any idea on what should we need to use as redirect_uri for Skoda?

mrubioroy commented 3 years ago

At EVCC there's code to connect to Skoda Enyaq. I'll try to make a patch for IDDataLogger.

robske110 commented 3 years ago

I am definitely open for PRs adding support for other vwag vehicles, if the changes required for them are of reasonable size and scope. It seems that EVCC is using a different method of authenticating to the VW api, which requires a client_id and seems to be more inline with a real openid authentication flow.

The biggest problem for me with adding support for cars I don't own is that I cannot test or help develop anything for them.

mrubioroy commented 2 years ago

Here's another code accessing Skoda API. It looks pretty generic, able to access ID API, too: https://github.com/lendy007/skodaconnect/blob/958c07ef0d73d4def100ba790a03503a67849ef5/skodaconnect/connection.py

I could provide you the credentials to my account to let you develop.