Farfar / homeassistant-seatconnect

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

Worked for a few day, now can not login any more #4

Closed xrado closed 2 years ago

xrado commented 3 years ago

Hi,

worked fine for about 3 days. I have scan_interval set to 15 min. Was the plugin blocked from accessing the APIs? I can login to my.seat/portal with no problems and all data is up to date. Anyone else having the same issue?

Logger: custom_components.seatconnect Source: custom_components/seatconnect/init.py:199 Integration: seatconnect (documentation, issues) First occurred: 10:33:01 AM (15 occurrences) Last logged: 2:07:52 PM

Could not login to Seat Connect, please check your credentials and verify that the service is working

acortesm commented 2 years ago

Same issue here. Not sure what is going on cause yesterday worked perfectly but after restarting HA it stopped working

mookkari commented 2 years ago

Same problem here after HA was restarted yesterday. Password change did not not solve the issue. Issue also noticed in skodaconnect: https://github.com/lendy007/homeassistant-skodaconnect/issues/73

Farfar commented 2 years ago

I need full debug logs to inspect what is happening with the login. Either the login service changed (unlikely since this is working for most) or there's still issues with VW-Group login servers.

xrado commented 2 years ago

It works for a few days, then stops for a day or 2, then works again and so on. These are the errors I'm getting: ` Could not query update from Seat Connect 8:59:53 AM – (WARNING) Seat Connect (custom integration) - message first occurred at September 22, 2021, 9:27:25 AM and shows up 48 times

Could not update information from Seat Connect: Login failed 8:59:53 AM – (WARNING) /usr/local/lib/python3.9/site-packages/seatconnect/connection.py - message first occurred at September 22, 2021, 9:27:25 AM and shows up 48 times

Login to Seat Connect failed! 8:59:53 AM – (WARNING) /usr/local/lib/python3.9/site-packages/seatconnect/connection.py - message first occurred at September 22, 2021, 9:27:25 AM and shows up 48 times Something went wrong when refreshing API tokens. <!doctype html>HTTP Status 403 – Forbidden

HTTP Status 403 – Forbidden


Type Status Report

Message Access Denied

Description The server understood the request but refuses to authorize it.


Apache Tomcat

8:59:51 AM – (WARNING) /usr/local/lib/python3.9/site-packages/seatconnect/connection.py - message first occurred at September 22, 2021, 9:27:24 AM and shows up 48 times `

mookkari commented 2 years ago

This what I have in HA main log. Let me know if there some more detailed log to help you.

Setup of seatconnect is taking over 10 seconds.
10.05.37 – (VAROITUS) /usr/local/lib/python3.9/asyncio/events.py - Viesti esiintyi ensimmäisen kerran 10.05.37 ja tämän jälkeen 3 kertaa

Could not login to Seat Connect, please check your credentials and verify that the service is working
10.05.47 – (VAROITUS) seatconnect (custom integration)

2021-09-23 10:05:41 DEBUG (MainThread) [seatconnect.connection] Got authorization endpoint, logging on.
2021-09-23 10:05:43 DEBUG (MainThread) [seatconnect.connection] Authenticating with email and password.
2021-09-23 10:05:44 DEBUG (MainThread) [seatconnect.connection] Parse auth code...
2021-09-23 10:05:44 DEBUG (MainThread) [seatconnect.connection] Get tokens...
2021-09-23 10:05:46 DEBUG (MainThread) [seatconnect.connection] User identity token verified OK.
2021-09-23 10:05:47 DEBUG (MainThread) [seatconnect.connection] Tokens wrong
2021-09-23 10:05:47 WARNING (MainThread) [custom_components.seatconnect] Could not login to Seat Connect, please check your credentials and verify that the service is working
2021-09-23 10:05:47 INFO (MainThread) [homeassistant.setup] Setup of domain seatconnect took 19.8 seconds
2021-09-23 10:05:47 ERROR (MainThread) [homeassistant.setup] Setup failed for seatconnect: Integration failed to initialize.
xrado commented 2 years ago

after enabling seatconnect.connection: debug


2021-09-23 09:15:06 INFO (MainThread) [custom_components.seatconnect] Starting Seat Connect, version 1.0.32
2021-09-23 09:15:06 DEBUG (MainThread) [seatconnect.connection] Using service <https://msg.volkswagen.de>
2021-09-23 09:15:06 INFO (MainThread) [custom_components.seatconnect] Starting seatconnect component
2021-09-23 09:15:17 WARNING (MainThread) [homeassistant.setup] Setup of seatconnect is taking over 10 seconds.
2021-09-23 09:15:27 DEBUG (MainThread) [seatconnect.connection] Got authorization endpoint, logging on.
2021-09-23 09:15:30 DEBUG (MainThread) [seatconnect.connection] Authenticating with email and password.
2021-09-23 09:15:33 DEBUG (MainThread) [seatconnect.connection] Parse auth code...
2021-09-23 09:15:33 DEBUG (MainThread) [seatconnect.connection] Get tokens...
2021-09-23 09:15:39 DEBUG (MainThread) [seatconnect.connection] User identity token verified OK.
2021-09-23 09:15:40 DEBUG (MainThread) [seatconnect.connection] Tokens wrong
2021-09-23 09:15:40 WARNING (MainThread) [custom_components.seatconnect] Could not login to Seat Connect, please check your credentials and verify that the service is working
2021-09-23 09:15:40 INFO (MainThread) [homeassistant.setup] Setup of domain seatconnect took 33.9 seconds
2021-09-23 09:15:40 ERROR (MainThread) [homeassistant.setup] Setup failed for seatconnect: Integration failed to initialize.```
tinet commented 2 years ago

Same behaviour, I can't connect

I think this is related to the latest update of HA core to version core-2021.9.7

acortesm commented 2 years ago

2021-09-23 11:07:26 DEBUG (MainThread) [seatconnect.connection] Got authorization endpoint, logging on. 2021-09-23 11:07:26 DEBUG (MainThread) [seatconnect.connection] Authenticating with email and password. 2021-09-23 11:07:27 DEBUG (MainThread) [seatconnect.connection] Parse auth code... 2021-09-23 11:07:27 DEBUG (MainThread) [seatconnect.connection] Get tokens... 2021-09-23 11:07:27 DEBUG (MainThread) [seatconnect.connection] User identity token verified OK. 2021-09-23 11:07:27 DEBUG (MainThread) [seatconnect.connection] Tokens wrong 2021-09-23 11:07:27 WARNING (MainThread) [custom_components.seatconnect] Could not login to Seat Connect, please check your credentials and verify that the service is working 2021-09-23 11:08:43 ERROR (MainThread) [homeassistant.components.hassio.handler] /ingress/validate_session return code 401

enricog03 commented 2 years ago

Same issue here. After HA restart it stopped working.

acortesm commented 2 years ago

Same behaviour, I can't connect

I think this is related to the latest update of HA core to version core-2021.9.7

Dont think so cause i'm on 2021.9.6

Farfar commented 2 years ago

I have a hard time testing this since I no longer have access to a Seat. The library and integration are due for an update to benefit from all the changes in Skoda Connect library/intagration.

If someone would add me as a guest user I could bump the versions and perhaps fix this issue a little easier.

xrado commented 2 years ago

@Farfar I've sent you an invite. Check your email.

Farfar commented 2 years ago

@Farfar I've sent you an invite. Check your email.

I will keep a lookout for the invite, nothing yet though. Edit: Nothing on the email but I found the invite on the portal. Will get to work right away.

Farfar commented 2 years ago

@Farfar I've sent you an invite. Check your email.

Do you need to enable something after I have accepted the invite? It's been a few hours now but I still can't see any cars in the web portal.

xrado commented 2 years ago

@Farfar hmm weird, I've already accepted too and I see you as a secondary user, next to my wife. I don't have any other options.

Farfar commented 2 years ago

I am working on merging all changes from Skoda Connect to this fork, might take a little while though.

Farfar commented 2 years ago

Please test latest release. I have tested what I can and all seems to be working. No mutable actions tested since I don't have any Seat myself. Important: remove yaml config and setup new version with config flow only since yaml config might interfere and break the integration. @xrado, @acortesm, @enricog03, @tinet, @mookkari, @VictorDuenasIllana, @yoku70

GurtKnev commented 2 years ago

I deleted the old config, rebooted, set up the integration with the config flow, and everything seems to be working! Even after rebooting it reconnects without problems! Will test actions later.

tinet commented 2 years ago

I can only find "skoda connect" in HA HACS, no "seat connect" is found in HACS

Do I need to install "skoda connect" instead?

Thank you

image

Farfar commented 2 years ago

I can only find "skoda connect" in HA HACS, no "seat connect" is found in HACS

Do I need to install "skoda connect" instead?

image

No, this integration is not included in HACS (yet anyway) so you need to add it manually. It's described in the README. Either clone the repo into custom_components or add the repo to HACS manually.

xrado commented 2 years ago

@Farfar looks good, got all the data + some new entities I didn't saw before. Awesome! Let's see how it works after a day or two.

tinet commented 2 years ago

I can only find "skoda connect" in HA HACS, no "seat connect" is found in HACS Do I need to install "skoda connect" instead? image

No, this integration is not included in HACS (yet anyway) so you need to add it manually. It's described in the README. Either clone the repo into custom_components or add the repo to HACS manually.

@Farfar, Thank you for your help (I am a newbie in HA integrations, sorry)

SEAT Connect is now working properly with my SEAT Mii !

Thanks a lot for your time and development

Agusti

Farfar commented 2 years ago

Closing this issue now since initial testing seems fine. If there's any problems with 1.1.0 version it should be a new issue.

acortesm commented 2 years ago

Many thanks crack