Mercedes Me (Connected Vehicle)

Others (MiLight, Hue, Toon etc...)

Moderator: leecollings

sger
Posts: 10
Joined: Friday 12 February 2021 17:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Mercedes Me (Connected Vehicle)

Post by sger »

Hi,
my Domoticz access to Mercedes server fixed by itself, it seemed to be some glitch in server.
For people suffering from same issue, here is what seemed to happen:

1. Nothing I did on Mercedes developer site fixed "403, Access denied" for services.
-I deleted and re-created my project at Mercedes site, connected to new project from Domoticz.
-Connection and re-authorization was fine, but 403 issue persisted.
-One of the Mercedes services had note, that intermittent issues may occur during 28-29 June, which will go away when car updates status
2. Last night something seemed to happen when car started charging batteries.
-Still issues for some of the sensors
3. In the morning, when using Mercedes Me application from phone, application asked identification again.
-At that exact same moment, issues from rest of the sensors disappeared.
-Issues disappeared even before putting in the app lock-code that is sent into e-mail for app

So...looks like some Mercedes Me database issue.

One note is that there seems to be rather continous ping from Domoticz to Mercedes service, when 403 occurs.
I needed to turn some of the logs off, since my logfiles where swamped with messages occurring few seconds interval.
I'm assuming normally status updates from server happens 10 minutes interval,
but when something goes wrong pinging for information starts to happen few seconds interval.
User avatar
rolandbreedveld
Posts: 156
Joined: Wednesday 09 March 2016 11:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Contact:

Re: Mercedes Me (Connected Vehicle)

Post by rolandbreedveld »

@sger

same here, the errors are suddenly gone, indeed some temporary problems on the Mercedes-Me site
Raspberry Pi(SSD)+UPS HAT,Dashticz on WallTablet,HomeBridge, P1, HarmonyHub,FritzBox,API to 123Solar+ABB-PowerOne+SMA,ESP-Leds(flashed LSC),Tasmota,Shelly,MQTT,Mosquito,Node-Red,http://wiki.breedveld.net/index.php?title=RPiWaterMeter, Mercedes-Me
sundodger
Posts: 29
Joined: Sunday 11 August 2019 17:24
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Mercedes Me (Connected Vehicle)

Post by sundodger »

Hi all,
Trying to set this up and when i get to the test piece i cannot connect to localhost.
Tried multiple times and no luck.
Any ideas what to try?
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Mercedes Me (Connected Vehicle)

Post by kiddigital »

sundodger wrote:Hi all,
Trying to set this up and when i get to the test piece i cannot connect to localhost.
Tried multiple times and no luck.
Any ideas what to try?
Can you show a screenshot of what happens?

When requesting an initial token, it is supposed to give a ‘localhost’ connection message in which the url is containing the token that has to be entered into domoticz.

See the Wiki (https://www.domoticz.com/wiki/Mercedes) and the top of this thread for more information.
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
sundodger
Posts: 29
Joined: Sunday 11 August 2019 17:24
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Mercedes Me (Connected Vehicle)

Post by sundodger »

I have got past that problem but i now get.
My Car: Received (400) Bad Request.. Unexpected unless something has changed! ({"error_description":"Authorization code is invalid or expired.","error":"invalid_grant"})
I have tried resetting client secret but same error.
I am missing something small i think but cannot figure it out.
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Mercedes Me (Connected Vehicle)

Post by kiddigital »

You should see some status messages saying that authentication was successful.

If so, devices will get created. Sometimes it seems that the returned data is not in the expected format. But most of the time it is.

I am looking into it as I see that same message also sometimes.
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
sundodger
Posts: 29
Joined: Sunday 11 August 2019 17:24
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Mercedes Me (Connected Vehicle)

Post by sundodger »

Tried again this evening and it worked...not sure what the problem was.
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Mercedes Me (Connected Vehicle)

Post by kiddigital »

sundodger wrote:Tried again this evening and it worked...not sure what the problem was.
Great.. enjoy
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
sger
Posts: 10
Joined: Friday 12 February 2021 17:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Mercedes Me (Connected Vehicle)

Post by sger »

Ok, now again Mercedes Me service stopped reponding to domoticz plugin.

This time it seems to return
Received 500/503.. Service is not available!
instead of what I previously reported
Error: Mercedes: Failed to perform GET request (403)!

This started around midnight Oct 1 and has continued since then.

Has anybody else problems connecting to service?

Again, refreshing login credential is fine, and again, domoticz log is filled with error messages written in few seconds period.
Loggin into developers site does not indicate any issues.
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Mercedes Me (Connected Vehicle)

Post by kiddigital »

I see that on my installation the plugin also got some error messages and that I have to re-authenticate.

But if you get 5xx messages (500, 503, etc) this means something is not working correctly at the Mercedes/Daimler side of things and not in Domoticz.

These errors also appeared a few months back when there was work done on the IT Gateway infrastructure at Mercedes. Hopefully Mercedes sees these problems as well and fixes any problems they seem to have.

Let’s wait and see…
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
sger
Posts: 10
Joined: Friday 12 February 2021 17:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Mercedes Me (Connected Vehicle)

Post by sger »

Today, I logged again into developer site, and there is following message on top of the pages

"Currently facing an outage with our car-related data products as well as with their respective BYOCAR solutions - we are working on it already."
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Mercedes Me (Connected Vehicle)

Post by kiddigital »

Yup, got the same response from support.. at least they updated the status.. hope it is solved soon.
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
sger
Posts: 10
Joined: Friday 12 February 2021 17:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Mercedes Me (Connected Vehicle)

Post by sger »

Message about issues is still on Mercedes developers web-page, but my domoticz Mercedes Me plugin started to work already.
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Mercedes Me (Connected Vehicle)

Post by kiddigital »

ATTENTION

Mercedes is making a change to its MercedesMe environment. On the 2nd of November 2022, they will switch to a new Authentication and Authorization back-end, using OpenID. This means a few authorization URL's will change and therefor the Domoticz module has to be updated.

More information on the migration can be found here.

A Pull Request for this change has been prepared and will be merged into the Beta a.s.a.p.

This means that the current 'Mercedes Me Connect' module in Domoticz Stable version won't work anymore after the 2nd of November! At the moment to make it work again, you need to switch to the Beta channel and install the latest Beta. Beware that some other things might break due to switching to a Beta version! And switching back to the latest Stable can only be done by restoring a backup (both executable AND database)!

After you updated Domoticz to support the new module, new credentials have to be generated in the Mercedes Developer Console. You will need to generate a new clientID and clientSecret for the currently register application (think most people will call it Domoticz).

With the new ID and Secret, you can go through the login procedure using the new authorization endpoint and you should end-up with a new Authorization code. These 3 new id's should be entered into the existing Mercedes Me Connect module in Domoticz in the Username and Password fields. (Username contains <clientID>:<clientSecret>).

That should make everything work again as before.
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
mbdeveloper
Posts: 9
Joined: Tuesday 08 September 2020 9:30
Target OS: Linux
Domoticz version:
Location: Germany
Contact:

Re: Mercedes Me (Connected Vehicle)

Post by mbdeveloper »

Hello Domoticz Community and Mercedes-Benz Fans,
we hope you all succeed with the migration and the connection with your car(s) works well again. We have migrated from Google/apigee towards Microsoft/Azure with our API Management platform. With this step - and after more than 5 years operation of the "old" platform - we are future-ready, more performant and scalable and within Mercedes-Benz closer to the connected car backend systems. Next year we will offer extended services for our BYOCAR users. I expect it in Q2, but we started working on it. This year we had the focus on the migration.
Greetings
Olaf from Mercedes-Benz /developers
Mercedes-Benz /developers team
contact: [email protected]
sger
Posts: 10
Joined: Friday 12 February 2021 17:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Mercedes Me (Connected Vehicle)

Post by sger »

Pheww, new credentials working after few hickups. I will share short description of the six pitfalls I had after moving to Domoticz beta and beginning to use new credentials. Maybe it will help somebody else who reads instructions as sloppy as me:
1. new credentials generation ended up to have redirect uri "http:\\localhost" instead of "https:\\localhost" which I had earlier
2. there are two NEW urls to request access token and refresh token
3. access token request needs to have "scope=openid" added
4. refresh token request "Authorization: Basic" needs to have character "=" at the end
5. refresh token request needs (probably...it doesn't hurt anyways) to have "scope=openid" added
6. you need to have new "<clientid>:<clientsecret>" modified into Domoticz plugin "username"
And then just like before, put requested refresh token into Domoticz uservariable and requested access token into plugin "password"
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Mercedes Me (Connected Vehicle)

Post by kiddigital »

sger wrote:Pheww, new credentials working after few hickups. I will share short description…
Great that it also works again for you as well.

NOTE: no need to switch to Beta anymore as new stable has been released just today which uses the new URL’s.

Few notes on @sger findings:
- redirect URL has to be ‘https://localhost’ (and not plain http)
- look at the Wiki and the updates in the documentation at the beginning of this forum thread to find the correct URL to start the authentication and authorization process.
- it has the ‘openid’ scope added indeed
- no need to put the refresh token in the User Variables because when the module starts, it will request a new token again which also provides a new refreshtoken which will be stored.
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
jeroenbs
Posts: 7
Joined: Monday 06 February 2023 14:24
Target OS: Linux
Domoticz version:
Contact:

Re: Mercedes Me (Connected Vehicle)

Post by jeroenbs »

Hi,
I have a problem trying to install the Mercedes me integration.
I have a Mercedes, and an account on the Mercedes me website. (same emailadress)
Created a project redirected it to Https://localhost. Added all 5 BYOCAR products
Received a Client ID and a Client secret code
In Domoticz (version 2022-2 build 15018)
Filled VIN
Username = client-id:client-secret.
Logging in
brings me to the Mercedes me portal, logging is fine but then I receive.

https://localhost/?code=lv56svzcxthamkjun5cxa74pj&state=test
Unable to connect
An error occurred during a connection to localhost.

The site could be temporarily unavailable or too busy. Try again in a few moments.
If you are unable to load any pages, check your computer’s network connection.
If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.

Don’t know if this is correct but after entering lv56svzcxthamkjun5cxa74pj as the password. In the log file the following appears.

Error: Mercedes: Failed to perform POST request (6)!
Error: Mercedes: Failed to get token.
Error: Mercedes: Login unsuccessful!
Error: Mercedes: Failed to perform POST request (6)!
Error: Mercedes: Failed to get token.
Error: Mercedes: Login unsuccessful!
Error: Mercedes: Aborting due to too many failed authentication attempts (and prevent getting blocked)!

so any idea what is wrong?
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Mercedes Me (Connected Vehicle)

Post by kiddigital »

jeroenbs wrote: Thursday 09 February 2023 9:58 Hi,
I have a problem trying to install the Mercedes me integration.
...

Don’t know if this is correct but after entering lv56svzcxthamkjun5cxa74pj as the password. In the log file the following appears.
It looks you are taking all the rights steps and indeed the code is used as password.
jeroenbs wrote: Thursday 09 February 2023 9:58 Error: Mercedes: Failed to perform POST request (6)!
Error: Mercedes: Failed to get token.
Error: Mercedes: Login unsuccessful!
Error: Mercedes: Failed to perform POST request (6)!
Error: Mercedes: Failed to get token.
Error: Mercedes: Login unsuccessful!
Error: Mercedes: Aborting due to too many failed authentication attempts (and prevent getting blocked)!

so any idea what is wrong?
The (curl) errorcode 6 means 'Couldn't resolve host'. It looks like somehow your Domoticz machine isn't able to (DNS) resolve the names of the Daimler API servers. So could be a DNS/connection issue at your end, so check to see if you can ping/wget/curl the API server(s) from your Domoticz machine. Or, which seems to happen from time to time as I also see some connection issues once in a while, you just have to try again to see if it works.
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
jeroenbs
Posts: 7
Joined: Monday 06 February 2023 14:24
Target OS: Linux
Domoticz version:
Contact:

Re: Mercedes Me (Connected Vehicle)

Post by jeroenbs »

Hi, thanks for the suggestion. But I don't think that is the problem, NSlookup work and wget works as well
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest