robinostlund / homeassistant-volkswagencarnet

Volkswagen Carnet Component for home assistant
GNU General Public License v3.0
330 stars 60 forks source link

[INFORMATION WANTED] - Is this component working in your country - login issues? #284

Closed tubalainen closed 10 months ago

tubalainen commented 3 years ago

Dear all,

Please below, comment on this "Issue" below if you are experiencing issues with login, please answering the following questions: image

1.) Where do you live? 2.) What model and year? 3.) Have you migrated over to the new VW site and services from We Connect using https://www.portal.volkswagen-we.com/ and then followed the process after logging in? 4.) Are you able to control your car from the We Connect smartphone App after migration? - please test sending a command to your car and/or see if the sensors has been updated. 5.) Are you willing to help us identifying the servers used by your smartphone application by following this instruction and posting the results here? https://github.com/robinostlund/volkswagencarnet/issues/111#issuecomment-821032504

Your support to this project is much appreciated!


Confirmed working countries: Sweden

Countries with issues / not working countries: Romania (e-Golf -20) Italy (e-Up -20) Netherlands (Golf GTE -17 / e-Golf -20) UK (e-Golf 20)

madmic1314 commented 3 years ago
  1. UK
  2. 2020 eGolf
  3. Yes
  4. Yes
  5. Yes, android. Not rooted
  6. Primary user, no other accounts or users
stepir commented 3 years ago

1.) Italy (although I can login and use the UK version of the web portal - but setting up the integration with UK rather than IT as country code produce the same behaviour) 2.) e-UP 2020 3.) yes 4.) yes tried with climate control 5.) on iPhone / no jailbrake - happy to help as I can

noway42 commented 3 years ago
  1. Germany / DE
  2. Passat GTE 18, Golf 16, Touran 19 (all cars in one MyVolkswagen Account, does this work in theory btw.?)
  3. Yes
  4. Yes
  5. I will get into this later today
tubalainen commented 3 years ago
  1. Germany / DE
  2. Passat GTE 18, Golf 16, Touran 19 (all cars in one MyVolkswagen Account, does this work in theory btw.?)
  3. Yes
  4. Yes
  5. I will get into this later today

Yes it Should, all VIN numbers should appear in the drop down box when running the config flow. You have to "add integrations" three times to add all cars/VIN´s :)

isabellaalstrom commented 3 years ago
  1. Sweden SE
  2. Tiguan 2020
  3. Yes
  4. Yes
  5. Using non-jailbreaked iphone, so cannot.

Another bit of interesting information might be if you are the primary user of the service. I am not (my husband is), but that worked fine with the integration before.

nilskt commented 3 years ago
  1. Norway
  2. e-Golf 2015
  3. Yes
  4. Yes
  5. I'll try...
JRampager commented 3 years ago
  1. Sweden. I was not able to check the new terms and conditions in VW portal using SWE and had to use UK. Downside of that seems to be that We Connect app now seems to think im in the UK. I can only check service in UK for instance.
  2. Passat GTE 2020.
  3. Yes. See 1 also.
  4. Yes.
tubalainen commented 3 years ago
  1. Sweden. I was not able to check the new terms and conditions in VW portal using SWE and had to use UK. Downside of that seems to be that We Connect app now seems to think im in the UK. I can only check service in UK for instance.
  2. Passat GTE 2020.
  3. Yes. See 1 also.
  4. Yes.

Vafasiken! :/ Huh, odd. If I were you i´d start from scratch - delete all users in infotainment and in the web portal/app and start over? I had to pull the fuse out to reset my car completely.... :/

tmjo commented 3 years ago

I cannot connect with HA, but I did a test with the trocotronic version running the NativeAPI with python direcly and it works there.

1.) Norway 2.) e-Golf 2020 3.) Yes 4.) Yes 5.) I'll try

isabellaalstrom commented 3 years ago
  1. Sweden. I was not able to check the new terms and conditions in VW portal using SWE and had to use UK. Downside of that seems to be that We Connect app now seems to think im in the UK. I can only check service in UK for instance.
  2. Passat GTE 2020.
  3. Yes. See 1 also.
  4. Yes.

I did the same. Just tried with my husbands account, and he can't accept for Sweden either.

tubalainen commented 3 years ago

@JRampager @isabellaalstrom

I guess this component does not work if you are not able to join the car + app to the Swedish instance of the VW service.... @JohNan whats your take?

etique57 commented 3 years ago
  1. FR
  2. 2020 Tiguan L
  3. Yes
  4. Yes, locked the door from the app. First time failed, second time success.
  5. Yes, android. Not rooted
isabellaalstrom commented 3 years ago

I am contacting weconnect support now for this problem. Edit: I sent an email, will report back if/when they respond. This is about the issue when we can't accept terms for Sweden.

SVH-Powel commented 3 years ago

I am not able to log in

1) Norway 2) Passat GTE 2017 3) Yes 4) Yes 5) No (Work phone and not allowed to do certain things with it)

JackKlaasing commented 3 years ago

1) The Netherlands (NL) 2) E-golf 2018 3) Yes 4) Yes 5) No (Work phone and not allowed to do certain things with it)

Thanks!

tmjo commented 3 years ago

I cannot connect with HA, but I did a test with the trocotronic version running the NativeAPI with python direcly and it works there.

1.) Norway 2.) e-Golf 2020 3.) Yes 4.) Yes 5.) I'll try

Not sure if this is any helpful, but a bit more info: The NativeAPI from trocotronic works and shows vehicle and car data. Trying to run the volkswagencarnet directly with python stops since there is no "Location" in the received header. If I try to bypass this check it fails due to trying more then 10 redirects.

tmjo commented 3 years ago

I cannot connect with HA, but I did a test with the trocotronic version running the NativeAPI with python direcly and it works there. 1.) Norway 2.) e-Golf 2020 3.) Yes 4.) Yes 5.) I'll try

Not sure if this is any helpful, but a bit more info: The NativeAPI from trocotronic works and shows vehicle and car data. Trying to run the volkswagencarnet directly with python stops since there is no "Location" in the received header. If I try to bypass this check it fails due to trying more then 10 redirects.

Wohaaa, it's working again. Following some leads from other issues, I tried to select UK version of the landing page for WeConnect. There I was able to click the Allow-button and suddenly both python call and HA integration works great again. When I tried it with the Norwegian version, it didn't show me any allow button so although I found it strange I just supposed everything was ok, but it was never accepted.

I see UK has access: image

No idea if this is a problem or not, but it's working :D

stepir commented 3 years ago

I cannot connect with HA, but I did a test with the trocotronic version running the NativeAPI with python direcly and it works there. 1.) Norway 2.) e-Golf 2020 3.) Yes 4.) Yes 5.) I'll try

Not sure if this is any helpful, but a bit more info: The NativeAPI from trocotronic works and shows vehicle and car data. Trying to run the volkswagencarnet directly with python stops since there is no "Location" in the received header. If I try to bypass this check it fails due to trying more then 10 redirects.

Wohaaa, it's working again. Following some leads from other issues, I tried to select UK version of the landing page for WeConnect. There I was able to click the Allow-button and suddenly both python call and HA integration works great again. When I tried it with the Norwegian version, it didn't show me any allow button so although I found it strange I just supposed everything was ok, but it was never accepted.

I see UK has access: image

No idea if this is a problem or not, but it's working :D

did you setup then the integration using UK?

tubalainen commented 3 years ago

I cannot connect with HA, but I did a test with the trocotronic version running the NativeAPI with python direcly and it works there. 1.) Norway 2.) e-Golf 2020 3.) Yes 4.) Yes 5.) I'll try

Not sure if this is any helpful, but a bit more info: The NativeAPI from trocotronic works and shows vehicle and car data. Trying to run the volkswagencarnet directly with python stops since there is no "Location" in the received header. If I try to bypass this check it fails due to trying more then 10 redirects.

Wohaaa, it's working again. Following some leads from other issues, I tried to select UK version of the landing page for WeConnect. There I was able to click the Allow-button and suddenly both python call and HA integration works great again. When I tried it with the Norwegian version, it didn't show me any allow button so although I found it strange I just supposed everything was ok, but it was never accepted.

I see UK has access: image

No idea if this is a problem or not, but it's working :D

To quote a movie: "This does not compute!!!" ... Very odd. Glad that it worked!

tmjo commented 3 years ago

did you setup then the integration using UK?

No, if you mean in HA I just wrote NO for Norway and it responded with the VIN-number selector quite quickly. I didn't study the code too deeply, but not sure what the location does, because when running it with python directly I never gave anything more than user and password.

stepir commented 3 years ago

Wont work for me unfortunately - I accepted T&C using the uk page but integration still won't work. Doesn't matter which country I report

etique57 commented 3 years ago

Wont work for me unfortunately - I accepted T&C using the uk page but integration still won't work. Doesn't matter which country I report

Same for me. Loging in is spinning forever. image And I have the integration for both french & uk websites: image

JRampager commented 3 years ago

@JRampager @isabellaalstrom

I guess this component does not work if you are not able to join the car + app to the Swedish instance of the VW service.... @JohNan whats your take?

Sorry for not being clear, integration works fine even after accepting via UK page. I can see no issues in HA/Integration regarding the UK choice.

tmjo commented 3 years ago

Wont work for me unfortunately - I accepted T&C using the uk page but integration still won't work. Doesn't matter which country I report

Strange. Did you try your luck with a different country? I don't know what all this boils down to. When it was not working, I noticed the VW Norway was there all the time (ref image in post above). So it was there and appeared accepted, but it could have been from before they closed the web api. And the funny thing was that the other trocotronic API seemed to get contact with my car, so in one way or another something was accepted.

noway42 commented 3 years ago

I gathered some information about the servers being used for DE as requested (according to robinostlund/volkswagencarnet#111 (comment)):

tokenrefreshservice.apps.emea.vwapps.io msg.volkswagen.de customer-profile.apps.emea.vwapps.io vum.apps.emea.vwapps.io mal-1a.prd.ece.vwg-connect.com usermanagementservice.apps.emea.vwapps.io api-dcrm-service.volkswagen.net e2ed-sensor.emea.vwapps.io identity.vwgroup.io mbboauth-1d.prd.ece.vwg-connect.com shop.volkswagen-we.com mal-3a.prd.eu.dp.vwg-connect.com

and some common google servers: maps.googleapis.com clients4.google.com csi.gstatic.com

stepir commented 3 years ago

Wont work for me unfortunately - I accepted T&C using the uk page but integration still won't work. Doesn't matter which country I report

Strange. Did you try your luck with a different country? I don't know what all this boils down to. When it was not working, I noticed the VW Norway was there all the time (ref image in post above). So it was there and appeared accepted, but it could have been from before they closed the web api. And the funny thing was that the other trocotronic API seemed to get contact with my car, so in one way or another something was accepted.

yes tried with Malta - same output

robinostlund commented 3 years ago

@JohNan when we know which countries that is working we maby should change the Region config to a dropdown?

noway42 commented 3 years ago

I just tested the login via UK and FR (first login on the according VW hp and then HA Integration region), but no luck as well :-(

danielkaldheim commented 3 years ago

Working perfectly!

  1. Norway
  2. Passat GTE 2018
  3. Yes
  4. Yes
  5. Yes
shift-del1 commented 3 years ago

Not working. Removed 4.4.36, installed 4.4.40, can't add the integration anymore.

1.) Hungary 2.) e-up! 2020 3.) Yes. 4.) Yes. 5.) Would like to, but have a company managed Android phone.

tubalainen commented 3 years ago

Working perfectly!

  1. Norway
  2. Passat GTE 2018
  3. Yes
  4. Yes
  5. Yes

Are you registered to We Connect via the Norwegian site?

danielkaldheim commented 3 years ago

Working perfectly!

  1. Norway
  2. Passat GTE 2018
  3. Yes
  4. Yes
  5. Yes

Are you registered to We Connect via the Norwegian site?

Yes

ddeconin-gh commented 3 years ago

1.) Begium 2.) Tiguan Allspace 2019 3.) Yes 4.) No, but I can from the website. 5.) Yes

tmjo commented 3 years ago

One idea that may or may not work since the results seem to be so different: Anyone tried to remove access and then reactivate it? Perhaps it just needs a re-authorization somehow? Mine is working now, so I prefer not to touch it, but perhaps it could work for some of you?

image

madmic1314 commented 3 years ago

I tried that, removed all them except we connect / carnet - didn't want to stuff up the car connection. Maybe someone is braver than I to try it?

TranceSetter commented 3 years ago

1) The Netherlands 2) VW Golf Variant - 2020 3) Yes 4) Yes 5) Not sure how to do this on a non-jailbroken iPhone

TranceSetter commented 3 years ago

I removed all my connections except Carnet itself. Added then NL and UK again, but cannot login via the add integration screen.

JohNan commented 3 years ago

I gathered some information about the servers being used for DE as requested (according to robinostlund/volkswagencarnet#111 (comment)):

tokenrefreshservice.apps.emea.vwapps.io msg.volkswagen.de customer-profile.apps.emea.vwapps.io vum.apps.emea.vwapps.io mal-1a.prd.ece.vwg-connect.com usermanagementservice.apps.emea.vwapps.io api-dcrm-service.volkswagen.net e2ed-sensor.emea.vwapps.io identity.vwgroup.io mbboauth-1d.prd.ece.vwg-connect.com shop.volkswagen-we.com mal-3a.prd.eu.dp.vwg-connect.com

and some common google servers: maps.googleapis.com clients4.google.com csi.gstatic.com

Can you also see the urls that was used? There should be something like DE or maybe NO in there?

tmjo commented 3 years ago

Can you also see the urls that was used? There should be something like DE or maybe NO in there?

@JohNan: is it possible to retrieve the info you guys are requesting by debugging the python api instead of on the phone? I notice that the calls I did has a lot of /DE/ in the urls (although I'm in Norway and also have a connection to UK now to make it work). If it helps I can try to extract from running the python script.

noway42 commented 3 years ago

Can you also see the urls that was used? There should be something like DE or maybe NO in there?

I don't exactly know what you mean or where to find the urls... In the "NetCapture" app, I can open "Packet Detail" and get a lot of cyrptic characters, but not any clue for the region/url.

GitHubxtsnl commented 3 years ago

1.) the Netherlands 2.) VW Sharan 2017 3.) yes 4.) I'm not sure because 5.) yes

Note, when I was using the manual configuration in my .yaml file the integration was working without issues. Now it has to be setup via the Configuration \ Integrations page which does not work for me.

image

mitchellrj commented 3 years ago

From logs: "Login failed for VW account, User appears unauthorized"

Adding extra debugging, we get:

May 03 15:19:42 vesta hass[3176]: Traceback (most recent call last):
May 03 15:19:42 vesta hass[3176]:   File "/srv/homeassistant/lib/python3.9/site-packages/vw_connection.py", line 306, in _login
May 03 15:19:42 vesta hass[3176]:     raise e
May 03 15:19:42 vesta hass[3176]:   File "/srv/homeassistant/lib/python3.9/site-packages/vw_connection.py", line 282, in _login
May 03 15:19:42 vesta hass[3176]:     raise Exception('User appears unauthorized')

and more...

May 03 15:22:39 vesta hass[3338]: Traceback (most recent call last):
May 03 15:22:39 vesta hass[3338]:   File "/srv/homeassistant/lib/python3.9/site-packages/vw_connection.py", line 282, in _login
May 03 15:22:39 vesta hass[3338]:     raise Exception('User appears unauthorized')
May 03 15:22:39 vesta hass[3338]: Exception: User appears unauthorized

and finally we get a response body for the login (where a Location header is expected):

...
        <div id="title" class="title">
            <h1 class="main-title">Allow access</h1>
            <div class="sub-title">We Connect / Car-Net would like to access the following information, provided this is available in your Volkswagen ID:</div>
        </div>

        <div class="scopes">
                <input type="hidden" name="internalAndAlreadyConsentedScopes" value="openid" checked="true" />
                <input type="hidden" name="internalAndAlreadyConsentedScopes" value="mbb" checked="true" />
                <input type="hidden" name="internalAndAlreadyConsentedScopes" value="profile" checked="true" />
                <input type="hidden" name="internalAndAlreadyConsentedScopes" value="cars" checked="true" />
                <input type="hidden" name="internalAndAlreadyConsentedScopes" value="address" checked="true" />
                <input type="hidden" name="internalAndAlreadyConsentedScopes" value="email" checked="true" />
                <input type="hidden" name="internalAndAlreadyConsentedScopes" value="birthdate" checked="true" />
                <input type="hidden" name="internalAndAlreadyConsentedScopes" value="nickname" checked="true" />
                <input type="hidden" name="internalAndAlreadyConsentedScopes" value="phone" checked="true" />
                <input type="hidden" name="internalAndAlreadyConsentedScopesHmac" value="6b0452f2c23cab1868282b14ddfca5080ca74c164bd300fb8e63eea981c98d0c" checked="true" />
            <div class="scope-section mandatory-scope-section">

                <ul class="scope-list">
...

So some sort of OAuth scope interstitial is interrupting things, perhaps? Possibly if users haven't used the new VW app yet.

Some of this manual debugging could be helped adding logging entries by default for exceptions, and using raise ... from ... syntax for re-raised exceptions.

mitchellrj commented 3 years ago

After following the auth link (https://identity.vwgroup.io/oidc/v1/authorize?redirect_uri=carnet://identity-kit/login&prompt=login&nonce=REDACTED&code_challenge_method=s256&code_challenge=REDACTED&response_type=code%20id_token%20token&client_id=9496332b-ea03-4091-a224-8c746b885068%40apps_vw-dilab_com&scope=openid%20mbb%20profile%20cars%20address%20email%20birthdate%20nickname%20phone%20vin%20profession%20vin) in the browser and logging in, I've confirmed I get prompted with OAuth scopes before the redirect. After accepting the scopes, the next error is:

Error fetching volkswagencarnet data: Failed to update WeConnect. Need to accept EULA? Try logging in to the portal: https://www.portal.volkswagen-we.com/

mitchellrj commented 3 years ago

This last error is caused because the vehicle VIN is now upper-case rather than lower-case. Fixed this with:

self.vin = entry.data[CONF_VEHICLE].upper() if vehicle.vin.upper() == self.vin:

tubalainen commented 3 years ago

This last error is caused because the vehicle VIN is now upper-case rather than lower-case. Fixed this with:

self.vin = entry.data[CONF_VEHICLE].upper() if vehicle.vin.upper() == self.vin:

Ping @JohNan please include this in your PR. Thanks :)

mitchellrj commented 3 years ago

Final note: a new vehicle device and entities is created with this change.

sorenbache commented 3 years ago

1.) Denmark 2.) Passat Variant GTE 2021 3.) Yes 4.) Yes 5.) Yes (have an iPhone)

stepir commented 3 years ago

It worked!!! sorry for crossposting!!!

tonight I thought about giving it another try - now I don't know if timing did the trick, or VW is just slowly solving their own issue with this...

but I tried configuring the integration - I completed only the username/password and default country. Since I had to move on for the dinner I left the integration setup going over and over awaiting for something like 2hrs.

When I got back it was asking for the VIN and then it worked!

JohNan commented 3 years ago

that's great news @stepir !

I removed all scopes that was not in interstitial page posted by @mitchellrj and hopefully that will resolve some of the login problems. I didn't see any change in the data retrieved by removing the scopes.

I also added the suggested change from @mitchellrj regarding setting VIN number to uppercase.

A new release has been published with these changes: https://github.com/robinostlund/homeassistant-volkswagencarnet/releases/tag/v4.4.41

Let me know how it goes! :)

JackKlaasing commented 3 years ago

that's great news @stepir !

I removed all scopes that was not in interstitial page posted by @mitchellrj and hopefully that will resolve some of the login problems. I didn't see any change in the data retrieved by removing the scopes.

I also added the suggested change from @mitchellrj regarding setting VIN number to uppercase.

A new release has been published with these changes: https://github.com/robinostlund/homeassistant-volkswagencarnet/releases/tag/v4.4.41

Let me know how it goes! :)

It works! I’m from the Netherlands. I only entered my E-Mail and password, leave the region to DE and asked for the VIN number after 10 seconds.

Great job!