Mercedes Me Component

I cannot accept the data policy… the site is down. (broken link)… :frowning:

Not Found

The requested URL /app/ciam/success.html was not found on this server.

Thanks for your help. As explained in my PM it was my end - even though my location service had expired last July it worked till last month. Just spent another £29.99 for a year and all is good :fu:

Hello,

Works like a charm!!! Waited for this for quiet some time. Thank you very much.

I only have an issue with the custom updater. The component does not show up in my update card.
Does it work on your end?
I have the following in my configuration.yaml:

custom_updater:
  show_installable: true
#  hidden: true
  track:
- components
- cards
- python_scripts
  card_urls: 
- https://raw.githubusercontent.com/kuuji/button-card/0.0.2/tracker.json
- https://raw.githubusercontent.com/kalkih/mini-graph-card/master/tracker.json
- https://raw.githubusercontent.com/bramkragten/custom-ui/master/updater.json
- https://raw.githubusercontent.com/iammexx/home-assistant-config/master/ui/darksky/version.json
  component_urls:
- https://raw.githubusercontent.com/ReneNulschDE/ha_cc_mbwebapppy/master/custom_updater.json

Thanks once again!

Hi, is it possible to activate climate control ? I do that in their webapp to warm up car prior driving during winter months, but their web app is so slow and annoying…

Hi,

Thank you Rene for great work! This is a killer feature with HA and electric car :slight_smile: My EV charger is already controlled with modbus TCP, but I need the state of charge (SOC) from car. Additionally I want all the possible driving statistics too :slight_smile: Unfortunately I was not as lucky as some above. I got an error (below).

Error during setup of component mbwebbeta
Traceback (most recent call last):
  File "/home/jruoho/.local/lib/python3.6/site-packages/homeassistant/setup.py", line 154, in _async_setup_component
    component.setup, hass, processed_config)  # type: ignore
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/jruoho/.homeassistant/custom_components/mbwebbeta/__init__.py", line 167, in setup
    mercedesme_api = Controller(username, password, scan_interval)
  File "/home/jruoho/.homeassistant/deps/lib/python3.6/site-packages/mbwebapppy/controller.py", line 212, in __init__
    self._get_cars()
  File "/home/jruoho/.homeassistant/deps/lib/python3.6/site-packages/mbwebapppy/controller.py", line 292, in _get_cars
    car.odometer = self.get_odometer(api_result, car.finorvin)
  File "/home/jruoho/.homeassistant/deps/lib/python3.6/site-packages/mbwebapppy/controller.py", line 334, in get_odometer
    option_status = CarAttribute(option.get("value"),
AttributeError: 'NoneType' object has no attribute 'get'

Debugging info:
Via web it works.
I was able to get the CAR_STATUS_URL data manually with browser.

Some head banging and I managed to make it work with a small test program :slight_smile:
My car (B250E, 2015) does not have “distanceReset” and ”distanceStart” on ”odo” section. Commenting them out from controller.py made the test program work.

My python knowledge is very limited. I have no idea how to fix it properly, so that others would benefit also. I hope someone else can bite the pullet.

hi jruoho,

great first post. Thank you.

I’ve updated the component the API to 0.1.10 and component to 0.2.1.

Could you please check again.

Fixes:

  • Crash on missing Odo status information

Breaking Change:

  • “Electric Distance Critical Reset” - changed sensor name (typo in old version)

Hi ajocius,

I have not found a way to activate the climate control.

BR
Rene

Hi Rene,

I tried to create a pull request for you, but it failed (I not yet fluent with git either). I’ll try to figure it out tomorrow.

This is needed anyways (this is what I tried to send in as pull-request):

mbwebapppy jruoho$ git diff master
diff --git a/mbwebapppy/controller.py b/mbwebapppy/controller.py
index 17d8987..be572d4 100644
--- a/mbwebapppy/controller.py
+++ b/mbwebapppy/controller.py
@@ -400,9 +400,12 @@ class Controller(object):
         for electric_option in ELECTRIC_OPTIONS:
             if car_detail is not None:
                 option = car_detail.get(electric_option)
-                option_status = CarAttribute(option.get("value"),
-                                             option.get("status"),
-                                             option.get("ts"))
+                if option is not None:
+                    option_status = CarAttribute(option.get("value"),
+                                                 option.get("status"),
+                                                 option.get("ts"))
+                else:
+                    option_status = CarAttribute(0, 4, 0)
                 setattr(electric, electric_option, option_status)
             else:
                 _LOGGER.warning("get_electric for %s failed", car_id)        

I did not get all my sensors work yet (i had already some other changes in place, so they are likely causing the issues), but I must go sleep now…

About remote climate / pre heat:
I have that option in the Mercedes web interface. Maybe I could try to capture something with browser or Wireshark. That’s really needed feature here in far-North (Finland) :slight_smile:

Related to preconditioning.

In browsers private mode, login with:

Then get:
https://app.secure.mercedes-benz.com/backend/vehicles/WDD2428901J007644/precond
Works at least with Electric car.

There is the most of info related to preconditioning. One very interesting side step is chargingstatus which can be found there.

Thanks. Normally we could use a post request to this endpoint with the command. I was not able to execute the command succesful. Looks like POST commands are blocked by the API-Gateway.

Hi, i’m still very new to Home Assistant. I already did installations like card-modder, layout-card and similar things but I’m a little bit confused at the moment. Can someone tell me how to install this beta version for mercedes me. Which file i have to put in which folder…

Hi Manuel,

Please create a folder „custom_components“ in your homeassistant folder.

Copy the mbwebbeta folder out of the github repo into that folder.

Add the configuration entry to your configuration.yaml:

mbwebbeta:
  username: YOUR_USERNAME
  password: YOUR_PASSWORD

Restart HA.

In case problems:

  1. Click on this link and login with your MB-account
  2. After the successful login your will see a “Not Found”-error page
  3. Click on this link and check if at least one car is registered in your account

This component works in Europe only.

Send me a private message if you have further problems.

1 Like

With this explanation it is working very fine. Thank you for the hints and the great work. I hope the thing with the heating and adressing other functions (like open the doors) will work sometime. This would make this even more usefull.

I get this error when clicking on the link you provided:

Not Found

The requested URL /app/ciam/success.html was not found on this server.

I live in Sweden, so it should work, right? :slight_smile:

Hi, this error is totally fine and expected. MB has removed the Webapps but the API is working :wink:

Please check the second link if you see your car in the result.

BR
Rene

I tried to open the first link in Incognito Mode now and actually got to a login page, same error when i tried to login though, but you say that is normal so. :slight_smile: Then i entered the second link and got loads of info in text-form, i see the car VIN and licenseplate etc. So i guess it works! :slight_smile:

Does anyone know if it is possible to expose the Mercedes sensors to Google Home/assistant somehow? Would be really cool to say “Hey Google, how much fuel is in the car?” and get a reply saying “90%”. :slight_smile:

Hi, that should not be a problem. You can expose the MB sensors like any other sensor. Please read here for google assistant and the new skill… https://www.nabucasa.com/config/google_assistant/

Hi all,
still looking forward to the possibility to trigger some actions in the car (pre-heater, unlock door or sth. like that). Do you have an idea if or when this could be possible?

In meantime here is what i did with all the informations provided by my mercedes :grinning: . First picture show the main cards. Second picture show all conditional cards I can show via the “Detail” card.Looking forward to your feedback or to see other implementations…

11 Likes

Love that!