[APP][Pro] Mercedes Me App (Release 1.0.3)

I have just remembered (after looking at the code) the EV API is limited to 2 calls per hour so I have put that in the once per hour section.
I was obviously being lazy so I will add another timer so it gets it every 30 minutes.
So you should find the battery data does get updated within an hour.

The 1 hour interval works is enough for my use. Seems like it works fine now. I guess the communication is one way and controlling the car is not possible? I.e starting preheat is out of the question?

Keep up the great work!

The API doesn’t provide any methods to control the vehicle. It looks like it is in the Experimental API but that only works in a simulation.

I have been looking to see if there is another way but I have found one yet.

AFAIK the API doesn’t support it. One of the Home Assistant integrations doesn’t use the API but mimics the official Mercedes mobile app, which does have the option to control things like doors/windows, parking heater, etc.

1 Like

I did find that yesterday and was wondering how they were doing it. I thought they were using v1 of the API but using the mobile app API makes more sense.
I need to brush up on python to work out how they are doing it and maybe I can rip it off :blush:

1 Like

Excellent job, Adrian! I managed to install it using your very good and detailed instructions.
At first install you need to login into your Mercedes Me account on through the App and that failed a couple of times. But the third time I tried it all of a sudden worked and the App is now showing for instance the Fuel Range. Will try it out some more. Very good job so far!

1 Like

As you were asking for feedback, here are some first ideas from my side:

  1. Use a Virtual Devices (buttons) on the Homey App to
  • open doors
  • the trunk
  • the sunroof (ventilation and fully open)
  • the windows (to a different levels, each window separately)
  1. Get a notification when the fuel level is below 100 km range
  2. Get a notification when I am at home and I forgot to lock the car (which actually happened to a me couple of times)
  3. show tire pressures

Not sure if the APIs already can provide all of this, but one can always ask :wink:

1 Like

All good ideas.

  1. Unfortunately the API doesn’t allow controlling the vehicle. If they add that feature I will jump on it.

  2. This can be done using Homey flows.

  3. Also can be done with Homey flows.

  4. Again not currently available in the API.

Thanks Adrian,

The “Connected Vehicle” API however suggests it supports already controlling the vehicle. They state: “Feel free to experiment with individual status data from mileage to door status and the option to remotely open and close them.”

Although, I realise, as this API is still experimental, that not all features might be available yet.

But if you look at the subscription options it only offers " SANDBOX". That allows you to create a virtual vehicle and test the API against it.
I have tried to use it with my car using the Production URL: https://api.mercedes-benz.com/experimental/connectedvehicle/v2 but it doesn’t work.

Hi Adrian.

I’ve gone through your steps, once the grant permission window came up, but no cars is shown (I have two cars in my me account) this is the error I get:
{“success”:false,“message”:“invalid_id”}
i tripple checked al id:s and codes.
Any ideas for me? the Diagnostics log is empty…

When do you see the error?

Have you entered all the details in the Configuration page? One of the parameters is the VIN number of the car which is possibly the id that is invalid.
I think if you want to add two cars you will have to set the VIN number for the first car, add the car, then change the VIN number to the second car and add the car again.
Unfortunately, the free options don’t allow me to list all the cars for you to select, so for the BYOC API you need to specify the VIN number up front.

Hi,
Thanks for your job !
Just to tell you a little problem already deleted : When I want to add my car in the dashboard, I’m supposed to be redirected to the Mercedes website but I only get a blank page loading in Homey.
The only way I found to resolve this was to restart Homey and wait for the mercedes app to be ready. After that, the add of the car work like a charm.

Thanks for the information. I have seen users of other apps report similar issues so I wonder if it’s an issue in Homey. I will ask Athom if they are aware of any problems as I am using their OAuth template.

Hello, Just a word. THANK YOU. For your work. I succeeded in connecting my car thanks to your instructions.

1 Like

You rock! Thank you for nice app🙏 is it possible to implement this with Google home? Example ask googel for charge status? Or preheat climate?

Thanks, glad you find it useful.
I’m not sure about Google home as I don’t use it myself.

Hi Tor,

If those values are available as variable / tag, you could consider adding a Virtual Device of type thermometer, for each value you want to ask Google Assistant.
(One thingy, the assistant will say “degrees” after the value.)

Virtual Devices appear in Ghome automagically (if …more>Google Assistant > “sync with Google Assistant” is enabled)

Example of how to feed a virtual thermometer with a value of a device:

(The calc rounds the value to 0.5, like 20.5 or 19 etc.)
You see my V thermometer is called “3 temp display”.
Now, if I’d feed this one, in this flow, with
IF “MyMerc sensor charge level has changed” on this flow, and the level is 75%,
then this voice cmd should work:

“Hey google, what’s the temperature of 3 temp display?”

It should respond with: 75 degrees.

I’m sure it is possible to use other virtual sensor types.
I just thought of this: a battery capability (“measure_battery”) exists, you could use a virtual battery sensor. It reports level X%, like the charge level.
I’ve not tested this, but it should work:

“Hey google, what’s the battery level of 3 temp display?”

It should respond with: 75 percent.

This is just an idea of how you can accomplish this.

Cheers

1 Like

Hi Adrian,

I installed your application and it works very well. The setup instructions are crystal clear!
The main reason I was curious about this app was because every once in a while my back lit stands open because the remote is always in my pocket and that button is pressed for a few seconds when lacing my shoes or something.
I see that the variable back lit open or closed is not available in the app. Is is possible that this is added in a future version?
Thank you very much for the good work so far!

Greetings

I will look into that as it should be possible to create a trigger for that.