seydx / homebridge-mercedesme

Mercedes plugin for homebridge
43 stars 4 forks source link

Invalid redirect 400 #28

Closed anasiot closed 3 years ago

anasiot commented 3 years ago

Hi

i m’ not able to get the authentification pop up it’s saying invalid redirect 400 I have checked the dev app mercedes and the ui x port and it’s matching so don’t understand what is the problem BBEA99E4-9D1C-40E5-8F58-CB15B8FC3956 E7E34F40-5138-488E-ACC1-B1E4A1CD1964 6FEADC0C-D5AE-4005-A985-C2E2DF17B0B0

seydx commented 3 years ago

@anasiot

can u try with following redirect url on the mercedes developer site

http://192.168.1.33:8581 (this one is without "/" at the end)

anasiot commented 3 years ago

When I try this it open a new window of the UIx and at the url i have : A8569FCA-070A-4E97-B3EB-7EE9AA4E7479

seydx commented 3 years ago

@anasiot

can u post your config.json pls & which car? model? year?

anasiot commented 3 years ago

There is nothing that I have modified after installation on json

"cars": [], "platform": "MercedesPlatform", "name": "MercedesPlatform", "debug": false } ]

the model w204 , model 2013

seydx commented 3 years ago

@anasiot

your car is not supported

See here:

https://developer.mercedes-benz.com/products/fuel_status/details

https://developer.mercedes-benz.com/products/vehicle_status/details

https://developer.mercedes-benz.com/products/vehicle_lock_status/details

https://developer.mercedes-benz.com/products/electric_vehicle_status/details

marcelo0561 commented 3 years ago

Hi @SeydX. I'm having the same problem. As you can see the Redirect URL in the Mercedes API platform is the URL of the Config UI X image

But when I try to refresh the plugin to get the authorization token it just redirects me to the homepage of the Homebridge with the following URL: http://192.168.2.24:8581/?error_description=The%20requested%20scope%20is%20invalid,%20unknown,%20malformed,%20or%20exceeds%20that%20which%20the%20client%20is%20permitted%20to%20request.&error=invalid_scope#.

My car is model W177 year 2020.

Thank you!

seydx commented 3 years ago

@marcelo0561

added all endpoints to app??

look here https://github.com/SeydX/homebridge-mercedesme#first-steps-obtain-client-id-and-client-secret

pls also add Electric Vehicle Status Endpoint to app

marcelo0561 commented 3 years ago

@SeydX Oh amazing that works now! Thank you for the super quick message and for the continued work on this! Looking forward to more features in the future. 😁