Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 403 when getting lock-status endpoint (Zoe50) #596

Open
LeclercqG opened this issue Apr 17, 2022 · 3 comments
Open

Error 403 when getting lock-status endpoint (Zoe50) #596

LeclercqG opened this issue Apr 17, 2022 · 3 comments

Comments

@LeclercqG
Copy link

Hello,

I'm having an issue, with the API for the lock-status endpoint.
I first noticed this issue using the renault integration for Home Assistant (not the custom one) where all the entities regarding status of doors or hatch are unavailable.
I tried debugging by trying to directly using this API in Python and in CLI and I'm getting an error 403 : Forbidden.

Trace got in CLI:
PS C:\Users\gleclercq> renault-api --debug http get /commerce/v1/accounts/{accountID}/kamereon/kca/car-adapter/v1/cars/{VIN}/lock-status

DEBUG:renault_api.kamereon:Received Kamereon response 502 on GET to https://api-wired-prod-1-euw1.wrd-aws.com/commerce/v1/accounts/{accountID}/kamereon/kca/car-adapter/v1/cars/{VIN}/lock-status?country=FR: {"type":"TECHNICAL","messages":[{"code":"err.tech.502","message":"{\"errors\":[{\"status\":\"502\",\"code\":\"gateway.processing\",\"title\":\"VNEXT\",\"detail\":\"an internal error occured while processing request : 403 FORBIDDEN\"}]}"}],"errors":[{"errorCode":"err.tech.502","errorMessage":"{\"errors\":[{\"status\":\"502\",\"code\":\"gateway.processing\",\"title\":\"VNEXT\",\"detail\":\"an internal error occured while processing request : 403 FORBIDDEN\"}]}"}],"error_reference":"TECHNICAL"}

Error: ('err.tech.502', 'VNEXT an internal error occured while processing request : 403 FORBIDDEN')

All other endpoints are working correctly, only this one seems to reply with an 403 forbidden.
I saw in another issue that it may be an endpoint for the Nissan car but as nothing is written about that on the docs (neither here or on the HomeAssistant integration page) I still wanted to open an issue to see if some other owner of Renault Zoé 50 has the same issue or not.

All services contracts are valid and I'm on the latest update in my car.

Thanks for your help.

-Gauthier

@jumpjack
Copy link

This is not the only one "forbidden endpoint", there are also HVAC-SESSIONS, TRIPS, TRIP-HISTORY, and others about horns, lights, windows,....
Somebody is investigating about "SRP authentication" which could be behind this "locks":

https://gitlab.com/tobiaswkjeldsen/dartnissanconnect/-/issues/1#note_893392557

@epenet
Copy link
Collaborator

epenet commented Apr 28, 2022

Currently there is no "official" way to know which endpoints are supported by which vehicles.
#508 added support for the lock_status endpoint, and it works on @FRSTR on his Duster

Technically you didn't receive a 403 error, but a 502 error Received Kamereon response 502 on GET:

  • 403 errors can indicate temporary failures, invalid permissions, invalid Renault contrat etc.
  • 502 errors indicate to me that it is unsupported by the car

Since you have received a 502 error, I suggest that you open a PR to adjust VEHICLE_SPECIFICATIONS and set "support-endpoint-lock-status": False for X102VE

VEHICLE_SPECIFICATIONS: Dict[str, Dict[str, Any]] = {
"X101VE": { # ZOE phase 1
"reports-charge-session-durations-in-minutes": True,
"reports-in-watts": True,
"support-endpoint-location": False,
"support-endpoint-lock-status": False,
},
"X102VE": { # ZOE phase 2
"warns-on-method-set_ac_stop": "Action `cancel` on endpoint `hvac-start` may not be supported on this model.", # noqa
},

@oliv3r
Copy link

oliv3r commented May 19, 2024

Not wanting to necro this thread, but on my Zoe40, I'm getting in home-assistant:

WARNING (MainThread) [homeassistant.components.renault.renault_vehicle] Ignoring endpoint xxxx res_state as it is denied: This endpoint is denied: ('err.func.403', 'Access is denied for this resource')

But no idea what res_state is :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants