Page 5 of 8

Re: Mercedes Me (Connected Vehicle)

Posted: Monday 01 November 2021 20:47
by K0enH
hi All,

I am a proud owner of a new 2021 C-class 8-)
I have setup a developer account and followed all the steps.
however I keep getting errors in my logs of domoticz (have it set to run every minute).
as you can see below the errors are different every minute and I have no clue what is going wrong as the behavior is different every minute.
anybody with a clue?
2021-11-01 20:34:27.004 Error: Mercedes: Failed to get resource data readingLampFrontRight.
2021-11-01 20:37:28.879 Error: Mercedes: Failed to perform GET request (403)!
2021-11-01 20:38:32.180 Error: Mercedes: Failed to perform GET request (403)!
2021-11-01 20:38:32.180 Error: Mercedes: Failed to get resource data rangeliquid.
2021-11-01 20:39:32.747 Error: Mercedes: Failed to perform GET request (403)!
2021-11-01 20:39:32.748 Error: Mercedes: Failed to get data vehiclelockstatus.
2021-11-01 20:39:32.927 Error: Mercedes: Failed to perform GET request (403)!
2021-11-01 20:39:32.927 Error: Mercedes: Failed to get data payasyoudrive.
2021-11-01 20:40:34.028 Error: Mercedes: Failed to perform GET request (403)!
2021-11-01 20:40:34.028 Error: Mercedes: Failed to get data payasyoudrive.
2021-11-01 20:41:35.621 Error: Mercedes: Failed to perform GET request (403)!
2021-11-01 20:41:35.621 Error: Mercedes: Failed to get resource data positionHeading.
2021-11-01 20:42:36.749 Error: Mercedes: Failed to perform GET request (403)!
2021-11-01 20:42:36.749 Error: Mercedes: Failed to get resource data doorlockstatusgas.
2021-11-01 20:43:37.297 Error: Mercedes: Failed to perform GET request (403)!
2021-11-01 20:43:37.297 Error: Mercedes: Failed to get data vehiclelockstatus.
2021-11-01 20:44:38.382 Error: Mercedes: Failed to perform GET request (403)!
2021-11-01 20:44:38.639 Error: Mercedes: Failed to perform GET request (403)!
2021-11-01 20:44:38.992 Error: Mercedes: Failed to perform GET request (403)!
2021-11-01 20:44:38.992 Error: Mercedes: Failed to get data vehiclelockstatus.

ps I am running Version: 2021.1 on Ubuntu.

Re: Mercedes Me (Connected Vehicle)

Posted: Tuesday 02 November 2021 6:54
by kiddigital
A 403 code means Access Denied…

Check the log if the module has successfully retrieved an Access Token (which I think it did otherwise also other errors should be visible). To be sure.

If it did get an Access Token, then probably you did not get access to certain information/API’s because either you have not activated them or during sign-in you haven’t requested all corresponding claims.

Make sure all API’s are active and claimed.

Re: Mercedes Me (Connected Vehicle)

Posted: Wednesday 03 November 2021 11:14
by K0enH
Hi thanks for responding,

As I receive data, I assume my access token is working :)
I used this url to get the correct claims:

https://id.mercedes-benz.com/as/authori ... %20consent

and within the developer portal I have added the following products to my project:

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

all with the OAuth Credentials (Authorization Code Flow) and BYOCAR

looking into my latest logs I still get some errors know and then, however that is not everytime the data is being polled, and sometimes I get a 401, and other times a 502 error message...

2021-11-03 10:02:43.270 Error: Mercedes: Failed to perform GET request (401)!
2021-11-03 10:10:55.696 Error: Mercedes: Failed to perform GET request (502)!
2021-11-03 10:10:55.696 Error: Mercedes: Failed to get resource data odo.

so can anyone explain what is causing this?

Re: Mercedes Me (Connected Vehicle)

Posted: Wednesday 03 November 2021 21:11
by kiddigital
Hi @K0enH,

Looking at the info provide, it looks you are doing everything correctly :)

So I took a look at my own logs and see exactly the same messages appearing. I see that some sensors are still frequently updated, but some are not.

Didn't spend the time (yet) to figure out if the sensors that are not update are related to 1 or more specific API's (Vehicle Lock Status, etc.), but it sure looks that way. I guess that some API's are not behaving as they should (unless Mercedes changed things that we are not yet aware of) or maybe the proxies in front are misbehaving or something along those lines.

Hopefully Mercedes does see these errors as well (they are the ones returning these response codes so they could/should, so hopefully @mbdeveloper is reading along ;) ) and will react on it.

The API status does not show any issues at the moment.

Re: Mercedes Me (Connected Vehicle)

Posted: Friday 05 November 2021 9:36
by K0enH
thanks for explaining @ kidigital!

are you also aware if the location status issue is still applicable?
eg the state device in domoticz only shows value (0) Not Home.
and read in this topic earlier that this was due to the fact that Mercedes was not providing the location correctly!?

Re: Mercedes Me (Connected Vehicle)

Posted: Friday 05 November 2021 10:03
by kiddigital
Indeed, currently the API does not provide any location information. The Mercedes module uses the eVehicle framework which has a ‘Home’ location but that is not something that can be populated at the moment.

There is a feature request outstanding at Mercedes to at least provide the ‘area’ information (as one can currently define in the MercedesMe app). But if/when is not defined…

Re: Mercedes Me (Connected Vehicle)

Posted: Sunday 27 February 2022 21:04
by Gianni
can someone help me out

I still got this error
error ME.png
error ME.png (54.36 KiB) Viewed 2681 times
steps i did

register a app
Get client id en secret.
Go to the url with the client id
logged in with my account
Get a authentication code
Paste ID:Secret into domotoicz
PAste auth into domoticz

into Me settings remote retrevale is active

I already try 3 different auth codes

Mercedes Me (Connected Vehicle)

Posted: Monday 28 February 2022 6:38
by kiddigital
It seems that somehow the code is not accepted as a valid code.

Make sure you have activated all (5) API’s. Can you show a screenshot of the Mercedes Dev portal with all your licenses? (Like at the top of this post)

Re: Mercedes Me (Connected Vehicle)

Posted: Monday 28 February 2022 8:37
by Gianni
hello

here is a screenshot of the dev console.
I try to remove the spec module but cannot do this because it's still pending.
dev.png
dev.png (26.31 KiB) Viewed 2672 times

Re: Mercedes Me (Connected Vehicle)

Posted: Monday 28 February 2022 15:52
by Gianni
i just made a new project with only the 5 products.
Register en create my token.
Still a error but now a 401 instead of a 400

Code: Select all

 
2022-02-28 15:49:54.198 Status: Mercedes: Worker stopped...
2022-02-28 15:49:54.199 Status: Mercedes: Using Domoticz home location as car's home location.
2022-02-28 15:49:54.199 Status: Mercedes: Worker started...
2022-02-28 15:49:55.199 Mercedes: Attempting login (using provided Authorization code).
2022-02-28 15:49:55.567 Status: Mercedes: Received 401.. During authorisation proces. Aborting!
2022-02-28 15:49:55.567 Error: Mercedes: Failed to get token.
2022-02-28 15:49:55.567 Error: Mercedes: Login unsuccessful!
2022-02-28 15:49:56.567 Mercedes: Attempting login (using provided Authorization code).
2022-02-28 15:49:56.767 Status: Mercedes: Received 401.. During authorisation proces. Aborting!
2022-02-28 15:49:56.767 Error: Mercedes: Failed to get token.
2022-02-28 15:49:56.767 Error: Mercedes: Login unsuccessful!
2022-02-28 15:49:57.767 Mercedes: Attempting login (using provided Authorization code).
2022-02-28 15:49:57.956 Status: Mercedes: Received 401.. During authorisation proces. Aborting!
2022-02-28 15:49:57.956 Error: Mercedes: Failed to get token.
2022-02-28 15:49:57.956 Error: Mercedes: Login unsuccessful!
2022-02-28 15:49:58.956 Mercedes: Attempting login (using provided Authorization code).
2022-02-28 15:49:59.146 Status: Mercedes: Received 401.. During authorisation proces. Aborting!
2022-02-28 15:49:59.146 Error: Mercedes: Failed to get token.
2022-02-28 15:49:59.146 Error: Mercedes: Login unsuccessful!
2022-02-28 15:49:59.146 Error: Mercedes: Aborting due to too many failed authentication attempts (and prevent getting blocked)! 
Try it with postman but also a connection refused
error ME2.png
error ME2.png (201.88 KiB) Viewed 2665 times

Re: Mercedes Me (Connected Vehicle)

Posted: Monday 28 February 2022 16:00
by kiddigital
How does the url look like to get the token? Maybe something wrong with the claims?

Re: Mercedes Me (Connected Vehicle)

Posted: Monday 28 February 2022 16:10
by Gianni

Re: Mercedes Me (Connected Vehicle)

Posted: Monday 28 February 2022 16:16
by kiddigital
That look like a valid response, but I meant the URL to start the login/token procedure.

Re: Mercedes Me (Connected Vehicle)

Posted: Monday 28 February 2022 16:18
by Gianni

Re: Mercedes Me (Connected Vehicle)

Posted: Monday 28 February 2022 16:21
by Gianni
and this is my postman token config
postman.png
postman.png (60.26 KiB) Viewed 2659 times

Re: Mercedes Me (Connected Vehicle)

Posted: Monday 28 February 2022 16:52
by kiddigital
Gianni wrote: Monday 28 February 2022 16:18 heeheh here you go

https://id.mercedes-benz.com/as/authori ... %20consent
You did not replace the clientid in the URL! This should be the client ID of the new project you just created.

Re: Mercedes Me (Connected Vehicle)

Posted: Monday 28 February 2022 18:06
by Gianni
i replaced <client id> with my client id but i removed it here to post it :-)

Re: Mercedes Me (Connected Vehicle)

Posted: Wednesday 15 June 2022 11:12
by rolandbreedveld
Hi
since a while I get these errors in the Domoticz log file
as you see, Battery level and others are working fine, but not all, like "vehiclelockstatus" :
vehiclelockstatus, is there in my mercedes-me console.
other stuff like automatic token refresh is working fine.

2022-06-15 10:33:12.859 Status: EQA250: Executing command: Get All states
2022-06-15 10:33:13.631 Error: EQA250: Failed to perform GET request (403)!
2022-06-15 10:33:13.631 Status: EQA250: Received 403.. Access has been denied!
2022-06-15 10:33:13.632 Error: EQA250: Failed to get data vehiclelockstatus.
2022-06-15 10:33:13.632 Status: EQA250: Access has been denied to the VehicleLockStatus data!
2022-06-15 10:33:15.923 EQA250: General/Percentage (EQA250 Battery Level)
2022-06-15 10:33:15.992 EQA250: General/Custom Sensor (EQA250 Odometer)
2022-06-15 10:33:16.055 EQA250: General/Alert (EQA250 Open Alert)
2022-06-15 10:33:16.130 EQA250: Light/Switch (EQA250 decklidstatus)

Re: Mercedes Me (Connected Vehicle)

Posted: Monday 04 July 2022 18:33
by sger
Hi,
I started to get these "403, Access has been denied!" messages since Jul 1.
It has continued from there on, I don't get any data to Domoticz.

At Jul1, first, some "Received 500/503, Service not available" for ten minutest, then few timeouts to requests.
After that, "Received 403" for pretty much everything that Domoticz tries to access from Mercedes server.

Then after minute or two, "Received 400/401", and automatic re-authorization happens.
re-authorization seems to be ok, "Login credentials Refresh successful."

But, after that, only "Received 403", it has continued after that.

I did manual re-authorization few times, re-authorization seem to be ok according to log message.
I also upgraded Domoticz to latest stable version, re-authorized again, again re-authorization seems to go ok.
But...."Received 403" continues.

There were message in Mercedes site that some reconfiguration happens 28-29 Jun.

Is Domoticz Mercedes Me Connect plugin still working ok for somebody?

Re: Mercedes Me (Connected Vehicle)

Posted: Monday 04 July 2022 19:23
by kiddigital
Just checked and I still receive data, last data from a few hours ago.