flobz / psa_car_controller

Control psa car with connected_car v4 API.
GNU General Public License v3.0
402 stars 210 forks source link

No vehicle in your account is compatible with this API, you vehicle is probably too old... #917

Open DavidFFerreira opened 1 month ago

DavidFFerreira commented 1 month ago

Does not make anysense, I have the eC4 2020 in my citroen account. It was working before the update Problably the endpoint on REST is wrong???? "psa_car_controller.psa.connected_car_api.rest.ApiException: (404)"

image image

`HOST_BRANDID : https://id-dcr.citroen.com/mobile-services sitecode: AC_PT_ESP{"session":"1c0a0de2ebaecc506175e91a8b807467","returnCode":"NEED_AUTHORIZATION","token":"73c82ca04ae36870086b3aa89bd8c6870c66ef874836ac7014b4faa3728577a7"} Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/setup/app_decoder.py", line 59, in init self.token = res.json()["accessToken"] KeyError: 'accessToken'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/web/view/config_views.py", line 137, in connectPSA INITIAL_SETUP = InitialSetup(app_name, email, password, countrycode) File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/setup/app_decoder.py", line 68, in init raise ConnectionError(msg) from ex ConnectionError: Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/setup/app_decoder.py", line 59, in init self.token = res.json()["accessToken"] KeyError: 'accessToken'

HOST_BRANDID : https://id-dcr.citroen.com/mobile-services sitecode: AC_PT_ESP{"session":"1c0a0de2ebaecc506175e91a8b807467","returnCode":"NEED_AUTHORIZATION","token":"73c82ca04ae36870086b3aa89bd8c6870c66ef874836ac7014b4faa3728577a7"} 2024-07-17 09:39:09,054 :: INFO :: 172.30.32.1 - - [17/Jul/2024 09:39:09] "POST /_dash-update-component HTTP/1.1" 200 - 2024-07-17 09:39:22,109 :: INFO :: Initial setup... 2024-07-17 09:39:28,794 :: INFO :: 172.30.32.1 - - [17/Jul/2024 09:39:28] "POST /_dash-update-component HTTP/1.1" 200 - 2024-07-17 09:39:34,663 :: INFO :: 172.30.32.1 - - [17/Jul/2024 09:39:34] "GET /config_connect?url=https://idpcvs.citroen.com/am/oauth2/authorize?client_id%3D49799a4b-f335-4de2-bafb-e198a3f54ef9%26redirect_uri%3Dmymacsdk%253A%252F%252Foauth2redirect%252Fpt%26response_type%3Dcode%26scope%3Dopenid%2520profile%26state%3DtvnACeiCFkBXxEUD8iDWgg%26code_challenge%3DhGMCWorOxIZ2xqtYy0wWOuf1-SG9y7AvFEEs7KVB6Y8%26code_challenge_method%3DS256 HTTP/1.1" 200 - 2024-07-17 09:39:34,785 :: INFO :: 172.30.32.1 - - [17/Jul/2024 09:39:34] "GET /_dash-layout HTTP/1.1" 200 - 2024-07-17 09:39:34,786 :: INFO :: 172.30.32.1 - - [17/Jul/2024 09:39:34] "GET /_dash-dependencies HTTP/1.1" 200 - 2024-07-17 09:39:34,799 :: INFO :: 172.30.32.1 - - [17/Jul/2024 09:39:34] "POST /_dash-update-component HTTP/1.1" 200 - 2024-07-17 09:39:34,811 :: INFO :: 172.30.32.1 - - [17/Jul/2024 09:39:34] "POST /_dash-update-component HTTP/1.1" 204 - 2024-07-17 09:40:04,893 :: INFO :: save config change 2024-07-17 09:40:05,352 :: ERROR :: get_vehicles: Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 140, in get_vehicles res = self.api().get_vehicles_by_device() File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/connected_car_api/api/vehicles_api.py", line 1331, in get_vehicles_by_device (data) = self.get_vehicles_by_device_with_http_info(**kwargs) # noqa: E501 File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/connected_car_api/api/vehicles_api.py", line 1400, in get_vehicles_by_device_with_http_info return self.api_client.call_api( File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/oauth.py", line 125, in call_api raise e File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/oauth.py", line 107, in call_api return self._ApiClient__call_api(resource_path, method, File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/connected_car_api/api_client.py", line 157, in __call_api response_data = self.request( File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/connected_car_api/api_client.py", line 347, in request return self.rest_client.GET(url, File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/connected_car_api/rest.py", line 234, in GET return self.request("GET", url, File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/connected_car_api/rest.py", line 228, in request raise ApiException(http_resp=r) psa_car_controller.psa.connected_car_api.rest.ApiException: (404) Reason: Not Found HTTP response headers: HTTPHeaderDict({'Connection': 'close', 'Date': 'Wed, 17 Jul 2024 08:40:05 GMT', 'Content-Type': 'application/hal+json', 'Expires': '0', 'Cache-Control': 'no-store, no-cache, must-revalidate, private', 'Set-Cookie': 'rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Tue, 16-Jul-2024 08:40:05 GMT, JSESSIONID=IVnWCJDdIlFhbtwGPevGgqSl_VtZYzWDGTP9G-WY; path=/, PSACountry=PT; Domain=.groupe-psa.com; Path=/', 'Strict-Transport-Security': 'max-age=15724800; includeSubDomains', 'X-Global-Transaction-ID': '9761fa3e66978365d2b81bcf'}) HTTP response body: {"uuid":"a17dfbab-a371-48c1-846b-3654ddbc5ff5","code":40400,"message":"No vehicle found","timestamp":"2024-07-17T08:40:05.309Z"}

2024-07-17 09:40:05,354 :: ERROR :: finish_oauth: Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/web/view/config_oauth.py", line 56, in finish_oauth config_views.INITIAL_SETUP.connect(code) File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/setup/app_decoder.py", line 117, in connect raise ValueError( ValueError: No vehicle in your account is compatible with this API, you vehicle is probably too old... 2024-07-17 09:40:05,354 :: INFO :: 172.30.32.1 - - [17/Jul/2024 09:40:05] "POST /_dash-update-component HTTP/1.1" 200 -`

DavidFFerreira commented 1 month ago

@flobz can you check this please?

robinalden commented 1 month ago

I am trying to register a new vehicle for the first time, a new 2024 Citroen C3, and I also get a 'No vehicle in your account is compatible with this API, you vehicle is probably too old' message. I too see a 404 in the logs.

2024-07-22 12:14:51,626 :: INFO :: save config change
2024-07-22 12:14:52,049 :: ERROR :: get_vehicles:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psacc/application/psa_client.py", line 140, in get_vehicles
res = self.api().get_vehicles_by_device()
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/connected_car_api/api/vehicles_api.py", line 1331, in get_vehicles_by_device
(data) = self.get_vehicles_by_device_with_http_info(**kwargs) # noqa: E501
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/connected_car_api/api/vehicles_api.py", line 1400, in get_vehicles_by_device_with_http_info
return self.api_client.call_api(
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/oauth.py", line 125, in call_api
raise e
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/oauth.py", line 107, in call_api
return self._ApiClient__call_api(resource_path, method,
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/connected_car_api/api_client.py", line 157, in __call_api
response_data = self.request(
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/connected_car_api/api_client.py", line 347, in request
return self.rest_client.GET(url,
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/connected_car_api/rest.py", line 234, in GET
return self.request("GET", url,
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/connected_car_api/rest.py", line 228, in request
raise ApiException(http_resp=r)
psa_car_controller.psa.connected_car_api.rest.ApiException: (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({'Connection': 'close', 'Date': 'Mon, 22 Jul 2024 11:14:52 GMT', 'Content-Type': 'application/hal+json', 'Expires': '0', 'Cache-Control': 'no-store, no-cache, must-revalidate, private', 'Set-Cookie': 'rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Sun, 21-Jul-2024 11:14:51 GMT, JSESSIONID=YcXC53tWuIfZMYyXX2afmNZAgyL_131n2dMOnEJV; path=/, PSACountry=GB; Domain=.groupe-psa.com; Path=/', 'Strict-Transport-Security': 'max-age=15724800; includeSubDomains', 'X-Global-Transaction-ID': '08f333a5669e3f2b747b2f41'})
HTTP response body: {"uuid":"7130f23e-208a-49c2-8861-528b010a9ff1","code":40400,"message":"No vehicle found","timestamp":"2024-07-22T11:14:52.016Z"}

2024-07-22 12:14:52,052 :: ERROR :: finish_oauth:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/web/view/config_oauth.py", line 56, in finish_oauth
config_views.INITIAL_SETUP.connect(code)
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psa/setup/app_decoder.py", line 117, in connect
raise ValueError(
ValueError: No vehicle in your account is compatible with this API, you vehicle is probably too old...
matthewturner commented 3 weeks ago

I'm getting the same error when trying to connect to a new Vauxhall Corsa E 2024. In my case the car doesn't seem to be compatible with the My Vauxhall app as the app isn't showing battery status (or any other options).

I have opened a ticket with Vauxhall to see if the API needs updating.

Update: I've had a response back from Vauxhall. They said in my case it's to do with the global component shortage which forced them to swap out a specific component which is not currently supported by the API. They are working on an OTA update which will be installed automatically. No ETA on this, but I'll update here when I find out more.

Blauenfeldt commented 1 week ago

I have the same issue with my Citroën C3

frostworx commented 1 week ago

Same issue here with a Citroën C3 Aircross. I would appreciate it if this could be fixed - never seen the addon in action yet :)

edit (to avoid mails):

just updated to home assistant addon version v3.5.3 _(with psa_carcontroller v3.5.2), the problem persists, unfortunately.

HiQual commented 2 days ago

I'm getting the same error when trying to connect to a new Vauxhall Corsa E 2024. In my case the car doesn't seem to be compatible with the My Vauxhall app as the app isn't showing battery status (or any other options).

I have opened a ticket with Vauxhall to see if the API needs updating.

Update: I've had a response back from Vauxhall. They said in my case it's to do with the global component shortage which forced them to swap out a specific component which is not currently supported by the API. They are working on an OTA update which will be installed automatically. No ETA on this, but I'll update here when I find out more.

Also for me with a new 2024 UK Corsa-e .. image (Using Docker) I have now opened a ticket with Vauxhall - thanks for the information.