seydx / homebridge-mercedesme

Mercedes plugin for homebridge
44 stars 4 forks source link

Error 400 invalid url #36

Open glk3504matic opened 3 years ago

glk3504matic commented 3 years ago

Hi,

Running into trouble with the invalid url. I have tried with and without the port number on the url and still running into trouble.

Any ideas?

2020 GLC 300 All end points have been added

jandewever commented 3 years ago

Same here: I entered my Homebridge UI address (basically localhost:8581, tried with 'localhost' and with IP-address). If I use this, I end up with the GUI of Homebridge, not with the pop-up as in your screengrab?

Error entered in the pop-ups url: 192.168.1.4:8581/?error_description=The requested scope is invalid, unknown, malformed, or exceeds that which the client is permitted to request.&error=invalid_scope#.

jandewever commented 3 years ago

OK, I got it working. It seems I was logged out from MercedesMe in the browser tab where I tried to configure Homebridge and the MercedesMe plugin. All of a sudden, while still using HTTP://IPadressofmyHomeBridge:8581, the popup didn't show the HomeBridge UI, but the MercedesMe login screen. Once done, I could authenticate and things started working.

However: I noticed the token I get is only valid for 24 hours. See other open issue I commented on.

glk3504matic commented 3 years ago

still run into the same issue when I try what you listed above, invalid url

homebridgeguy commented 3 years ago

I have the same issue with this error. I have tried IP address as well as Homebridge.local with and without ports. I have changed the port--no change in result. I have accessed the raspberry pi via a mac and PC still no luck. I have tried differnt browsers --- no change. No matter what I do, when I get to the authentication step I get a popup 400 invalid error.

The only step I am not clear on is..." Copy your Client ID and Client Secret and put it in your config.json (Config UI > Plugins > Homebridge Mercedesme Settings > Client ID/Client Secret)" I just entered that part via that information after hitting settings and then Start. I did not enter it on the JSON file directly.

Gabin85 commented 3 years ago

Hello, I have exactly the same problem. (Mercedes EQC 400 et CLS 450)

luke-rig commented 3 years ago

Hi, I have this same issue when pressing authenticate:

“ Oops Looks like something is not right. Please contact your administrator. 400 - Invalid redirect_uri”

car is EQA

marcelgood commented 3 years ago

Same issue. Found this plugin, but also can't get passed the invalid redirect url. I've added both the local IPv4 and IPv6 addresses of my Raspberry Pi as redirect URLs, but it doesn't work. Had hope that this plug-in would allow me to setup an automation to automatically open my garage door if I arrive at home in my car. The idea was that I could check if my engine is running as I enter the geofence around my house, and conclude that I'm in my car. The iOS shortcuts app doesn't seem to have an option to check if Bluetooth is connected to my car as I'm entering the geofence, which was my first idea. Basically I don't want my garage to open if I arrive on foot, so a simple if I arrive home automation isn't gonna do it.

Do I have to run a browser on the Raspberry Pi directly to configure this plugin?

Gabin85 commented 3 years ago

Same issue. Found this plugin, but also can't get passed the invalid redirect url. I've added both the local IPv4 and IPv6 addresses of my Raspberry Pi as redirect URLs, but it doesn't work. Had hope that this plug-in would allow me to setup an automation to automatically open my garage door if I arrive at home in my car. The idea was that I could check if my engine is running as I enter the geofence around my house, and conclude that I'm in my car. The iOS shortcuts app doesn't seem to have an option to check if Bluetooth is connected to my car as I'm entering the geofence, which was my first idea. Basically I don't want my garage to open if I arrive on foot, so a simple if I arrive home automation isn't gonna do it.

Do I have to run a browser on the Raspberry Pi directly to configure this plugin?

For what you want to do, if you use Apple Carplay, in the shortcut app you can do an automation in case of connection or disconnection of the one if

marcelgood commented 3 years ago

Same issue. Found this plugin, but also can't get passed the invalid redirect url. I've added both the local IPv4 and IPv6 addresses of my Raspberry Pi as redirect URLs, but it doesn't work. Had hope that this plug-in would allow me to setup an automation to automatically open my garage door if I arrive at home in my car. The idea was that I could check if my engine is running as I enter the geofence around my house, and conclude that I'm in my car. The iOS shortcuts app doesn't seem to have an option to check if Bluetooth is connected to my car as I'm entering the geofence, which was my first idea. Basically I don't want my garage to open if I arrive on foot, so a simple if I arrive home automation isn't gonna do it. Do I have to run a browser on the Raspberry Pi directly to configure this plugin?

For what you want to do, if you use Apple Carplay, in the shortcut app you can do an automation in case of connection or disconnection of the one if

I do use CarPlay sometimes, but that's not gonna do it. I could also trigger it when Bluetooth disconnects (just noticed that can't be done, either), however, if I'm pulling up to my garage, both CarPlay and Bluetooth won't disconnect until I turn off the car and open the driver's door. I actually park my car in my garage and not in my driveway, so this doesn't help. I'd want the garage door to open as I pull up, then I park my car inside, turn it off and get out, and only then would Bluetooth or CarPlay disconnect.

luke-rig commented 3 years ago

Hi, I have this same issue when pressing authenticate:

“ Oops Looks like something is not right. Please contact your administrator. 400 - Invalid redirect_uri”

car is EQA

I managed to overcome this issue by fully setting up the config, previously i missed part of the instructions and working now. looking forward to other enhancements being added particularly charge status

marcelgood commented 3 years ago

Figured it out, too. Had to add http://homebridge.local as a Redirect Url, but looks like most features don't seem to work for my 2019 C63S. Can't lock/unlock the car for example. The log says fuel and lock status is not supported. My car use the latest Mercedes me connect platform, so not sure why this would be. Going to uninstall the plugin as it doesn't do anything useful for me at this point.

user combination is not valid.","exVeErrorRef":"5422c730-9a35-4ab1-8b55-3e31bec90753"}}
[23/08/2021, 13:37:43] [MercedesPlatform] C63CS vehiclelockstatus: {"status":403,"message":"Forbidden","data":{"exVeErrorId":"3","exVeErrorMsg":"This vehicle / user combination is not valid.","exVeErrorRef":"d590c27c-24e2-410e-9c7a-846164697bdd"}}
[23/08/2021, 13:37:44] [MercedesPlatform] C63CS vehiclestatus: {"status":403,"message":"Forbidden","data":{"exVeErrorId":"3","exVeErrorMsg":"This vehicle / user combination is not valid.","exVeErrorRef":"30a3b625-1010-45a2-904a-352f498e3041"}}
[23/08/2021, 13:38:45] [MercedesPlatform] C63CS fuelstatus: {"status":403,"message":"Forbidden","data":{"exVeErrorId":"3","exVeErrorMsg":"This vehicle / user combination is not valid.","exVeErrorRef":"4221bb67-128f-4be9-b916-001ee7870ce5"}}
[23/08/2021, 13:38:45] [MercedesPlatform] C63CS vehiclelockstatus: {"status":403,"message":"Forbidden","data":{"exVeErrorId":"3","exVeErrorMsg":"This vehicle / user combination is not valid.","exVeErrorRef":"e4963dc6-1c5b-42f0-acde-1dd5809136b1"}}
[23/08/2021, 13:38:46] [MercedesPlatform] C63CS vehiclestatus: {"status":403,"message":"Forbidden","data":{"exVeErrorId":"3","exVeErrorMsg":"This vehicle / user combination is not valid.","exVeErrorRef":"9b474795-5fc7-4fe8-91e3-107bad81d801"}}
[23/08/2021, 13:39:47] [MercedesPlatform] C63CS fuelstatus: {"status":403,"message":"Forbidden","data":{"exVeErrorId":"3","exVeErrorMsg":"This vehicle / user combination is not valid.","exVeErrorRef":"0b26ec63-586c-4216-b1ab-7232c8fbfd5b"}}
[23/08/2021, 13:39:48] [MercedesPlatform] C63CS vehiclelockstatus: {"status":403,"message":"Forbidden","data":{"exVeErrorId":"3","exVeErrorMsg":"This vehicle / user combination is not valid.","exVeErrorRef":"0b236ad4-3ae6-4462-89f7-49ff95887136"}}
[23/08/2021, 13:39:48] [MercedesPlatform] C63CS vehiclestatus: {"status":403,"message":"Forbidden","data":{"exVeErrorId":"3","exVeErrorMsg":"This vehicle / user combination is not valid.","exVeErrorRef":"d709cc88-f465-4290-b03c-2143fb65391e"}}
[23/08/2021, 13:40:49] [MercedesPlatform] C63CS fuelstatus: {"status":403,"message":"Forbidden","data":{"exVeErrorId":"3","exVeErrorMsg":"This vehicle / user combination is not valid.","exVeErrorRef":"b1f2b3a1-2351-437e-845a-4ec2764b8b4c"}}
[23/08/2021, 13:40:50] [MercedesPlatform] C63CS vehiclelockstatus: {"status":403,"message":"Forbidden","data":{"exVeErrorId":"3","exVeErrorMsg":"This vehicle / user combination is not valid.","exVeErrorRef":"8286b17c-ab8c-45ce-ad0e-1e5477d641bc"}}
[23/08/2021, 13:40:50] [MercedesPlatform] C63CS vehiclestatus: {"status":403,"message":"Forbidden","data":{"exVeErrorId":"3","exVeErrorMsg":"This vehicle / user combination is not valid.","exVeErrorRef":"7c2afe78-50d1-430f-a63d-8c21f103137b"}}
[23/08/2021, 13:41:51] [MercedesPlatform] C63CS fuelstatus: {"status":403,"message":"Forbidden","data":{"exVeErrorId":"3","exVeErrorMsg":"This vehicle / user combination is not valid.","exVeErrorRef":"89a6a560-c9c1-4a66-ae29-35c8ded426e9"}}
[23/08/2021, 13:41:52] [MercedesPlatform] C63CS vehiclelockstatus: {"status":403,"message":"Forbidden","data":{"exVeErrorId":"3","exVeErrorMsg":"This vehicle / user combination is not valid.","exVeErrorRef":"1bab7b35-cc89-4c02-af06-7daa2d2dae7c"}}
[23/08/2021, 13:41:52] [MercedesPlatform] C63CS vehiclestatus: {"status":403,"message":"Forbidden","data":{"exVeErrorId":"3","exVeErrorMsg":"This vehicle / user combination is not valid.","exVeErrorRef":"78d2bccb-15d8-4bed-830e-954b4b9efa85"}}
[23/08/2021, 13:41:54] [MercedesPlatform] C63CS: Can not change lock state. Not supported at the moment!
[23/08/2021, 13:42:09] [MercedesPlatform] C63CS: Can not change lock state. Not supported at the moment!
[23/08/2021, 13:42:53] [MercedesPlatform] C63CS fuelstatus: {"status":403,"message":"Forbidden","data":{"exVeErrorId":"3","exVeErrorMsg":"This vehicle / user combination is not valid.","exVeErrorRef":"84e5a972-45a9-4e8b-b221-5b2e7766e1d5"}}
[23/08/2021, 13:42:54] [MercedesPlatform] C63CS vehiclelockstatus: {"status":403,"message":"Forbidden","data":{"exVeErrorId":"3","exVeErrorMsg":"This vehicle / user combination is not valid.","exVeErrorRef":"9b88ff43-dbf7-4fc5-939d-c449250f504f"}}
[23/08/2021, 13:42:55] [MercedesPlatform] C63CS vehiclestatus: {"status":403,"message":"Forbidden","data":{"exVeErrorId":"3","exVeErrorMsg":"This vehicle / user combination is not valid.","exVeErrorRef":"54b5688e-92f9-4438-a4cf-c0369167ee19"}}

I'm pretty sure I added all the necessary products to my account:

Electric Vehicle Status BYOCAR Fuel Status BYOCAR Pay As You Drive Insurance BYOCAR Vehicle Lock Status BYOCAR Vehicle Status BYOCAR

Segelmichel commented 2 years ago

I was running into the same problem, but you have to be "very clear" about the redirect url in your config at mercedes me. You have to add the same url, as it is displayed in your browser when accessing the specific home bridge instance. I added http://homebridge.fritz.box:8080 and http://homebridgepi.fritz.box:8080 (which is a staging system running on a raspberry pi)
Now it works brilliantly ....

pierroferrero commented 2 years ago

Hi! I’m a beginner I don’t understand this part :

Copy your Client ID and Client Secret and put it in your config.json (Config UI > Plugins > Homebridge Mercedesme Settings > Client ID/Client Secret)

where am I suppose to past this? thanks a lot