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 is broken. #22

Closed SrOne closed 2 years ago

SrOne commented 2 years ago

Hi, I update the homeassistant and after that reboot that stop to login. I have try two different main and sub-account account and result is same. Visit from my.seat/portal but no any accept forms appear.

Logbook: 2022-02-11 21:29:39 DEBUG (MainThread) [seatconnect.connection] Finalizing login 2022-02-11 21:29:39 DEBUG (MainThread) [seatconnect.connection] Using login action url: "https://identity.vwgroup.iologin/authenticate" 2022-02-11 21:29:39 DEBUG (MainThread) [seatconnect.connection] POSTing following form data: {'_csrf': '05856c02-xxxreplacewithxxx2-4c41-8726-20xreplacewithxf92fe23d', 'relayState': 'df9ce90c83fbf4xxxxxc13b3b3c45498xxreplacewithxxd206a', 'hmac': '492e2xxxxx0f83b7e23096bdb4d9edxxxreplacewithxxxa219c40fc02161284e9a0ba', 'email': 'mymail@gmail.com', 'password': 'rightpassword'} 2022-02-11 21:29:39 ERROR (MainThread) [seatconnect.connection] Login failed for mymail@gmail.com, Cannot connect to host identity.vwgroup.iologin:443 ssl:default [Name does not resolve] 2022-02-11 21:29:39 DEBUG (MainThread) [custom_components.seatconnect.config_flow] Unable to login to Seat Connect. Need to accept a new EULA/T&C? Try logging in to the portal: https://my.seat/portal

DrIc03R commented 2 years ago
2022-02-11 23_21_11-Einstellungen – Home Assistant

Hi Farfar,

I got the same issue this evening.

I think the problem is, that there is a missing "/" in the URL: https://identity.vwgroup.iologin/authenticate

vwgroup.iologin is not a valid domain.

At the moment I'm trying to understand the code to find a solution to fix this problem.

enricog03 commented 2 years ago

Same issue here after HA update!

Pulpyyyy commented 2 years ago

@DrIc03R seems right Looks better with / image

enricog03 commented 2 years ago

I solved the issue manually merging the changes from last skodaconnect library commit in my HA.

https://github.com/lendy007/skodaconnect/commit/0714de01ab470be9e276bb68860b81b4dae0fbb4

I think that Farfar will update the main branch soon.

tulkarxxx commented 2 years ago

Same issue for me after HA update

DrIc03R commented 2 years ago

I solved the issue manually merging the changes from the skodaconnect library commit in my HA.

lendy007/skodaconnect@0714de0

I think that Farfar will update the main branch soon.

Hi enricog03,

thanks for the hint, I managed to get through the authentication by merging with skodaconnect, but I'm stuck by fetching vehicles. At this part, there are some differences between skodaconnect and seatconnect, I do not get managed to merge.

Do you think, you're willing to share you're merged files? This would be an enormous help. Thank you.

enricog03 commented 2 years ago

I solved the issue manually merging the changes from the skodaconnect library commit in my HA. lendy007/skodaconnect@0714de0 I think that Farfar will update the main branch soon.

Hi enricog03,

thanks for the hint, I managed to get through the authentication by merging with skodaconnect, but I'm stuck by fetching vehicles. At this part, there are some differences between skodaconnect and seatconnect, I do not get managed to merge.

Do you think, you're willing to share you're merged files? This would be an enormous help. Thank you.

Hi, you can download my connection.py file below. You need to put it in the "/usr/local/lib/python3.9/site-packages/seatconnect/" path of your HA instance. I think it will be overwritten with every HA update, so I hope Farfar will update the official version.

connection.zip

DrIc03R commented 2 years ago

I solved the issue manually merging the changes from the skodaconnect library commit in my HA. lendy007/skodaconnect@0714de0 I think that Farfar will update the main branch soon.

Hi enricog03, thanks for the hint, I managed to get through the authentication by merging with skodaconnect, but I'm stuck by fetching vehicles. At this part, there are some differences between skodaconnect and seatconnect, I do not get managed to merge. Do you think, you're willing to share you're merged files? This would be an enormous help. Thank you.

Hi, you can download my connection.py file below. You need to put it in the "/usr/local/lib/python3.9/site-packages/seatconnect/" path of your HA instance. I think it will be overwritten with every HA update, so I hope Farfar will update the official version.

connection.zip

Thank you! Works great again.

HerrmannsdoerferS commented 2 years ago

Hi, maybe a silly question, but if i navigate to the folder "/usr/local/lib/" there is no folder "python3.9". What i'm doing wrong?

any help appreciated

oneofthemany commented 2 years ago

Hi, maybe a silly question, but if i navigate to the folder "/usr/local/lib/" there is no folder "python3.9". What i'm doing wrong?

any help appreciated

try here:

/config/deps/lib/python3.9/site-packages/seatconnect/

HerrmannsdoerferS commented 2 years ago

thanks for the reply, but same thing as mentioned above, no folder when connecting with sftp. im running this ha setting: image

so when i enter the container which runs tagged as homeassistant i could find this folder. but i have no clue ho to exchange this file without crashing my system

DrIc03R commented 2 years ago

If you're using docker based HA try the following:

  1. SSH to the OS (you must have activated ssh in the terminal plugin you find in supervised addon store)
  2. Run "exec -it homeassistant bash" Now you have access to the console in the docker container. Try again to find the folder /usr/local/lib/python3.9/site-packages/seatconnect
DrIc03R commented 2 years ago

thanks for the reply, but same thing as mentioned above, no folder when connecting with sftp. im running this ha setting: image

so when i enter the container which runs tagged as homeassistant i could find this folder. but i have no clue ho to exchange this file without crashing my system

Sorry didn't read your last sentence.

I did the following:

  1. Rename the original connection.py to connection.bak
  2. Create the file new with "vi connection.py"
  3. Open the connection.py by enricog03 in an GUI Editor of you choice an copy the whole content to the clipboard.
  4. Go into insert mode in vi and copy the whole content of the connection.py by enricog03 into vi by right click.
  5. Leave insert mode with "ESC" and save with :wq
  6. Restart your HA Core

Working with the connection.py while HA ist running, will not crash the system.

HerrmannsdoerferS commented 2 years ago

thanks for the reply, but same thing as mentioned above, no folder when connecting with sftp. im running this ha setting: image so when i enter the container which runs tagged as homeassistant i could find this folder. but i have no clue ho to exchange this file without crashing my system

Sorry didn't read your last sentence.

I did the following:

  1. Rename the original connection.py to connection.bak
  2. Create the file new with "vi connection.py"
  3. Open the connection.py by enricog03 in an GUI Editor of you choice an copy the whole content to the clipboard.
  4. Go into insert mode in vi and copy the whole content of the connection.py by enricog03 into vi by right click.
  5. Leave insert mode with "ESC" and save with :wq
  6. Restart your HA Core

Working with the connection.py while HA ist running, will not crash the system.

THANKS for the great explanation!!! πŸ₯‡ now it works again πŸ‘

oneofthemany commented 2 years ago

if you're running a container - as I am albeit in podman and not docker - the location is as above in the config folder:

/config/deps/lib/python3.9/site-packages/seatconnect/

it is potentially easier to just cd to the folder location above and then:

wget https://github.com/Farfar/homeassistant-seatconnect/files/8054761/connection.zip && unzip connection.zip && rm connection.zip && docker restart homeassistant

xrado commented 2 years ago

@Farfar still here?

Farfar commented 2 years ago

Fixed in latest release πŸ‘πŸΌ