Farfar / homeassistant-seatconnect

Seat Connect - A home assistant plugin to add integration with your car
Apache License 2.0
61 stars 14 forks source link

Login Problem #34

Closed metcrl closed 1 year ago

metcrl commented 1 year ago

Hello, Since this morning the integration don't work. I tried to reconfigure all, but i can't even access anymore. When I insert my login mail/password, the screen with rounding circle "access to Seat Connect" apper and nothing appen

metcrl commented 1 year ago

Senza titolo-1 This is the problem, delete all and reinstall didn't work

AlexZ1402 commented 1 year ago

i have same problem since HomeAssistant update

RamBra commented 1 year ago

I'm getting the same 401 message. Had to restart HA and after reboot integration stopped working

matrevis commented 1 year ago

Same problem

AlexZ1402 commented 1 year ago

Logger: seatconnect.connection Source: custom_components/seatconnect/init.py:796 Integration: Seat Connect (documentation, issues) First occurred: 29. Juni 2023 um 22:45:48 (92 occurrences) Last logged: 00:44:15

An API error was encountered during login, try again later

and

Logger: homeassistant.config_entries Source: config_entries.py:1247 First occurred: 29. Juni 2023 um 23:00:58 (1 occurrences) Last logged: 29. Juni 2023 um 23:00:58

Config entry 'VSXXXXXXXXX' for seatconnect integration not ready yet: Token exchange failed. Request status: 401; Retrying in background

willew commented 1 year ago

I have the same problem. Seat Connect mobile app works ok. Worked ok yesterday.

Vaniffew commented 1 year ago

Same problem. Cupra App works.

willew commented 1 year ago

Here is the log, Password is 'None' ??

2023-06-30 07:03:51.741 DEBUG (MainThread) [custom_components.seatconnect.config_flow] Creating connection to Seat Connect
2023-06-30 07:03:51.743 INFO (MainThread) [seatconnect.connection] Init Seat Connect library, version 1.1.6
2023-06-30 07:03:51.743 DEBUG (MainThread) [seatconnect.connection] Using service https://msg.volkswagen.de
2023-06-30 07:03:51.746 INFO (MainThread) [seatconnect.connection] Initiating new login
2023-06-30 07:03:51.748 DEBUG (MainThread) [seatconnect.connection] Starting authorization process for client seat
2023-06-30 07:03:52.108 DEBUG (MainThread) [seatconnect.connection] Got redirect to signin-service
2023-06-30 07:03:52.157 DEBUG (MainThread) [seatconnect.connection] Start authorization for user <myemail>@hotmail.com
2023-06-30 07:03:52.611 DEBUG (MainThread) [seatconnect.connection] Found dynamic credentials form, extracting attributes
2023-06-30 07:03:52.612 DEBUG (MainThread) [seatconnect.connection] JSON: {'clientLegalEntityModel': {'clientId': '50f215ac-4444-4230-9fb1-fe15cd1a9bcc@apps_vw-dilab_com', 'clientAppName': 'SEAT Connect App', 'clientAppDisplayName': 'SEAT Connect App', 'legalEntityInfo': {'name': 'SEAT & CUPRA', 'shortName': 'SEAT', 'productName': 'SEAT ID & CUPRA ID', 'theme': 'seat', 'defaultLanguage': 'de', 'termAndConditionsType': 'DEFAULT', 'legalProperties': {'revokeDataContact': 'customercare@seat.es', 'imprintText': 'IMPRINT', 'countryOfJurisdiction': 'DE'}}, 'legalEntityCode': 'seat', 'imprintTextKey': 'imprint.link.text'}, 'template': 'loginAuthenticate', 'hmac': '<hmac>', 'useClientRendering': True, 'titleKey': 'title.login.password', 'title': None, 'emailPasswordForm': {'@class': 'com.volkswagen.identitykit.signin.domain.model.dto.EmailPasswordForm', 'email': '<myemail>@hotmail.com', 'password': None}, 'error': None, 'relayState': 'de7322f9352c7ef2be6bf8f3e64e574f1bb2d796', 'nextButtonDisabled': False, 'enableNextButtonAfterSeconds': 0, 'postAction': 'login/authenticate', 'identifierUrl': 'login/identifier'}
2023-06-30 07:03:52.613 DEBUG (MainThread) [seatconnect.connection] Finalizing login
2023-06-30 07:03:56.169 DEBUG (MainThread) [seatconnect.connection] Received authorization code, exchange for tokens.
2023-06-30 07:03:56.486 ERROR (MainThread) [seatconnect.connection] An API error was encountered during login, try again later
2023-06-30 07:03:56.491 ERROR (MainThread) [custom_components.seatconnect.config_flow] Login failed with error: Token exchange failed. Request status: 401`
LaNo-GH commented 1 year ago

I have the same problem. Seat Connect mobile app works ok

MickLesk commented 1 year ago

Dont work on stable release & beta release.

2023-06-30 14:21:06.677 ERROR (MainThread) [seatconnect.connection] An API error was encountered during login, try again later
2023-06-30 14:21:18.268 ERROR (MainThread) [seatconnect.connection] An API error was encountered during login, try again later
2023-06-30 14:21:40.446 ERROR (MainThread) [seatconnect.connection] An API error was encountered during login, try again later
2023-06-30 14:22:22.456 ERROR (MainThread) [seatconnect.connection] An API error was encountered during login, try again later
2023-06-30 14:23:12.964 ERROR (MainThread) [seatconnect.connection] An API error was encountered during login, try again later
2023-06-30 14:23:12.971 ERROR (MainThread) [custom_components.seatconnect.config_flow] Login failed with error: Token exchange failed. Request status: 401
2023-06-30 14:23:44.558 ERROR (MainThread) [seatconnect.connection] An API error was encountered during login, try again later
2023-06-30 14:25:06.472 ERROR (MainThread) [seatconnect.connection] An API error was encountered during login, try again later
2023-06-30 14:26:28.485 ERROR (MainThread) [seatconnect.connection] An API error was encountered during login, try again later
2023-06-30 14:27:50.652 ERROR (MainThread) [seatconnect.connection] An API error was encountered during login, try again later
2023-06-30 14:29:12.570 ERROR (MainThread) [seatconnect.connection] An API error was encountered during login, try again later
2023-06-30 14:29:38.423 DEBUG (MainThread) [custom_components.seatconnect.config_flow] Creating connection to Seat Connect
2023-06-30 14:29:39.989 ERROR (MainThread) [seatconnect.connection] An API error was encountered during login, try again later
2023-06-30 14:29:39.993 ERROR (MainThread) [custom_components.seatconnect.config_flow] Login failed with error: Token exchange failed. Request status: 401
AlexZ1402 commented 1 year ago

I use proxmox, tested a month-old backup and it doesn't work either, so the problem isn't with HomeAssistant but with the addon

I'm afraid the web portal (that's where the addon gets its data from) has been completely shut down l, so you have to look for another solution?!

metcrl commented 1 year ago

But no one seems to have any problem with the other platform (skoda connect, vw connect,ecc)

Stephan1908 commented 1 year ago

I have the same problem. which homepage does the addon access? the Cupra app works

AlexZ1402 commented 1 year ago

But no one seems to have any problem with the other platform (skoda connect, vw connect,ecc)

Only Seat has decided to switch off the web portal, whether others will do so later or if they are in the planning, I don't know

Stephan1908 commented 1 year ago

has seat announced that the portal will be shut down?

AlexZ1402 commented 1 year ago

Seat published this message a year ago

SEAT CONNECT

Fresh wind.

We restructure. The My SEAT portal will be replaced from April 22nd 2023. From this point on, you can only access everything via the SEAT CONNECT app – free of charge, of course.

Stephan1908 commented 1 year ago

oh no, that's very bad news...

metcrl commented 1 year ago

Wait, but from what I'm reading, at least for skoda connect and vw connect it looks like the app APIs (android/ios) were used, or do I misunderstand?

Didi-321 commented 1 year ago

The web portal is down since April 2022. Found this on a SEAT site:

<<<<< Update notification

As of April 22nd 2022, the SEAT CONNECT portal is no longer available online. Download the SEAT CONNECT app, totally free of charge.

In order to check the latest version of the CONNECT legal texts, you can find all the information here.

Choose your country and discover how to download your application

So there should be another reason for this issue besides the web portal.

Schlichi83 commented 1 year ago

I got the same problem since yesterday. Before it worked perfectly. The app still works, so it can't the the servers.

I use my SEAT Connect with four services:

AlexZ1402 commented 1 year ago

if I connect via Python Seatconnect / https://github.com/Farfar/seatconnect then it breaks off like with HomeAssistant and there is a certificate error on HTTPS://msg.volkswagen.de

and https://identity.vwgroup.io

VW Group Identity Provider. Follow the documentation: https://identitykit.io/

and https://identity.vwgroup.io/oidc/v1/authorize {"error":"invalid_request","error_description":"Missing Parameter client_id"}

API Problem?

lufegut commented 1 year ago

Same problem

willew commented 1 year ago

Since connect app works and other vwgroup cars do not have this problem, must be that something has changed in the api. Anyone here able to reverse engineer what Seat connect app does during the login? I do not have a rooted phone. See https://discord.gg/826X9jEtCh.

Farfar commented 1 year ago

This is a fork from Skodaconnect and it mimics the Android app and it's API requests, not the web app. I don't maintain this fork since I don't own a Seat and never did.

From the looks of it something has changed with the login procedure. I think someone needs to intercept the login from the official app and compare it to the library to see what's changed. Mitmproxy and a rooted Android phone/emulated device is needed to bypass Android ssl pinning. AFAIK the Seat app also use ssl pinning but I might remember incorrectly.

Schlichi83 commented 1 year ago

I don't own an Android Phone and I'm not able to do what you wrote. But if it helps, I can temporarily change the password of my wife's secondary login to our SEAT Connect Login and give this to someone that can do this - if it helps.

MickLesk commented 1 year ago

This is a fork from Skodaconnect and it mimics the Android app and it's API requests, not the web app. I don't maintain this fork since I don't own a Seat and never did.

From the looks of it something has changed with the login procedure. I think someone needs to intercept the login from the official app and compare it to the library to see what's changed. Mitmproxy and a rooted Android phone/emulated device is needed to bypass Android ssl pinning. AFAIK the Seat app also use ssl pinning but I might remember incorrectly.

Ive start PCAP and here is a list for you. The Login work ober identity.vwgroup.io PCAPdroid_02_Juli_18_26_00.pdf

AlexZ1402 commented 1 year ago

fixed https://github.com/ahivert/homeassistant-seatconnect

THANKS :)

Stephan1908 commented 1 year ago

How can I update the integration?

metcrl commented 1 year ago

fixed https://github.com/ahivert/homeassistant-seatconnect

THANKS :)

Thank you man, it works absolutely fine!

How to integrate this and update the release?

How can I update the integration?

You can try this by replacing the new manifest.json file instead of the old one, in the custom_components/seatconnect folder

MickLesk commented 1 year ago

Approved.

Works. Replacing File & Reboot the HA Interface.

RamBra commented 1 year ago

It works, thanks.

Just replace the manifest.json file and restart HA

Schlichi83 commented 1 year ago

IT WORKS! :-) Thank you so much!

Stephan1908 commented 1 year ago

Perfect! It works. Thank you very much!

matrevis commented 1 year ago

Nice work! Tku!

vancif commented 1 year ago

Replaced the manifest and rebooted HA but I'm stuck on a loading dialog when trying to add integration (before the login form shows up). After a minute or so this error appears. 16884156535932275777484471905382

AlexZ1402 commented 1 year ago

Deleted Restart

Download ZIP from Link Unpack Copy top custom folder

supertypo commented 1 year ago

Can you get this fix merged? @Farfar

https://github.com/Farfar/homeassistant-seatconnect/compare/main...ahivert:homeassistant-seatconnect:main

Farfar commented 1 year ago

I've merged the PR in underlying library to use the Cupra client instead and bumped versions. Might take a little while until the new lib version is available for all but new versions are available and should solve this issue.

supertypo commented 1 year ago

Thank you! 🥇

metcrl commented 1 year ago

I've merged the PR in underlying library to use the Cupra client instead and bumped versions. Might take a little while until the new lib version is available for all but new versions are available and should solve this issue.

Many many thanks!

Schlichi83 commented 1 year ago

Does anybody else has the problem, that after a few hours Home Assistant loses the values from SEAT Connect integration (all values „not available“). If you go to integrations and click on reload, it works again. But loses the values again after some time. What can I do?

AlexZ1402 commented 1 year ago

Does anybody else has the problem, that after a few hours Home Assistant loses the values from SEAT Connect integration (all values „not available“). If you go to integrations and click on reload, it works again. But loses the values again after some time. What can I do?

hmm that's strange, do you have a log?

Schlichi83 commented 1 year ago

Can you help me to get a log?

Schlichi83 commented 1 year ago

Okay - I found something:

Logger: seatconnect.connection Source: custom_components/seatconnect/init.py:818 Integration: Seat Connect (documentation, issues) First occurred: 3. Juli 2023 um 21:37:55 (4707 occurrences) Last logged: 14:53:41

and

Logger: custom_components.seatconnect Source: custom_components/seatconnect/init.py:756 Integration: Seat Connect (documentation, issues) First occurred: 3. Juli 2023 um 21:37:56 (1569 occurrences) Last logged: 14:53:41

An error occured while requesting update from Seat Connect: 'serviceInfo'

Schlichi83 commented 1 year ago

Today I completely removed the integration, reinstalled it and configured it again - the issue still persists. After a few hours the data is gone. Any ideas?

Farfar commented 1 year ago

Today I completely removed the integration, reinstalled it and configured it again - the issue still persists. After a few hours the data is gone. Any ideas?

What did you configure the poll interval to? Set it to 1 minute or 10 minutes maximum.

Schlichi83 commented 1 year ago

Changed it to 10minutes - Problem still persists. 😢 Any ideas?

vancif commented 1 year ago

Changed it to 10minutes - Problem still persists. 😢 Any ideas?

Try go log in into your SEAT account https://seatid.vwgroup.io/ and delete all Linked Apps

Schlichi83 commented 1 year ago

I did that. There were two connected apps. One with "SEAT" and one that's called "SEAT Connect / Cupra Connect". The First one I could remove, the second one says "unable to remoe Application. Contact Application support".

Schlichi83 commented 1 year ago

Changed it to 10minutes - Problem still persists. 😢 Any ideas?

Try go log in into your SEAT account https://seatid.vwgroup.io/ and delete all Linked Apps

This morning - one again, I had to reload the integration to get back the current values.