trocotronic / weconnect

API to interact with Volkswagen's service We Connect (formerly CarNet)
Open Data Commons Open Database License v1.0
83 stars 17 forks source link

Weconnect app deactivated #21

Closed videopix closed 11 months ago

videopix commented 1 year ago

Looks like VW finally replaced their Weconnect app with their new VW app which leads to the following errors:

[17/11/2023 18:09:55] [API::WARNING] Session file not found [17/11/2023 18:09:55] [API::WARNING] Access file not found [17/11/2023 18:09:55] [API::WARNING] Forcing login [17/11/2023 18:09:57] [API::CRITICAL] Raising error msg: Error 401 Traceback (most recent call last): File "./call_weconnect.py", line 21, in vwc.login() File "./NativeAPI.py", line 291, in login return self.force_login() File "./NativeAPI.py", line 424, in __force_login r = self.get_url('https://tokenrefreshservice.apps.emea.vwapps.io/exchangeAuthCode', post=data) File "./NativeAPI.py", line 131, in __get_url raise UrlError(r.status_code, msg, r) NativeAPI.UrlError: Error 401

Any idea already how to fix this? Best, Uwe

trocotronic commented 12 months ago

Yep, finally they shut down Weconnect. I'll try with the new app but it will require me some time. I do not know yet if it is a simple backend change or they modified the entire workflow.

beschoenen commented 12 months ago

@trocotronic I tried to check this a bit over the weekend but it doesn't seem so simple.

But this repo is still working, maybe it can help you. https://github.com/tillsteinbach/WeConnect-python

trocotronic commented 12 months ago

Seems a good repo. I did not review in detail but if you miss something drop an issue here and I'll take a look. Yesterday I logged all the workflow from the new app and I am deploying the new one.

enzioardesch commented 11 months ago

Do you expect it to be as functional as it was before VW changed things?

trocotronic commented 11 months ago

I have to review what functionalities have been removed.

Did you try https://github.com/tillsteinbach/WeConnect-python ? It seems a good replacement btw.

signag commented 11 months ago

I have now changed my application to use https://github.com/tillsteinbach/WeConnect-python which worked fine. The only feature, I was missing up to now, was to get all trips. WeConnect-python only retrieves the last trip. It was, however, straightforward to implement this feature based on the given code.

trocotronic commented 11 months ago

I updated the API with the newest backend.

get_trip_data(self, vin, type='shortterm', last=True) now accepts a parameter last=True, which returns the last trip or the full list if last=False.

videopix commented 11 months ago

Hi trocotronic, Thanks for updating - but I'm still getting

[28/11/2023 11:36:06] [API::WARNING] Session file not found
[28/11/2023 11:36:06] [API::WARNING] Access file not found
[28/11/2023 11:36:06] [API::WARNING] Forcing login

[28/11/2023 11:36:09] [API::CRITICAL] Raising error msg: Error: status code 401
Traceback (most recent call last):
  File "example.py", line 15, in <module>
    vwc.login()
  File "/home/ubuntu/carnet/weconnect_trocotronic_test/NativeAPI.py", line 281, in login
    return self.__force_login()
  File "/home/ubuntu/carnet/weconnect_trocotronic_test/NativeAPI.py", line 426, in __force_login
    r = self.__get_url('https://www.volkswagen.es/app/authproxy/vw-es/user', headers=headers)
  File "/home/ubuntu/carnet/weconnect_trocotronic_test/NativeAPI.py", line 130, in __get_url
    raise UrlError(r.status_code, msg, r)
NativeAPI.UrlError: Error: status code 401
enzioardesch commented 11 months ago

I am getting the same (on a completely blank/new setup).