Mercedes Me Component

Looks like the API is back online again. :slight_smile:

1 Like

I’ll enable it now!!! Thanks :wink:

EDIT: All back and working :slight_smile:

I never removed the component when the api was unavailable for a week or so. But can’t get it working…

Log Details (ERROR)

Sat Feb 16 2019 12:18:54 GMT+0200 (FLE Standard Time)

Error during setup of component mbwebbeta

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/setup.py", line 148, in _async_setup_component
    component.setup, hass, processed_config)  # type: ignore
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.homeassistant/custom_components/mbwebbeta.py", line 159, in setup
    from mbwebapppy.controller import Controller
  File "/srv/homeassistant/lib/python3.5/site-packages/mbwebapppy/controller.py", line 16, in <module>
    import lxml.html
  File "/srv/homeassistant/lib/python3.5/site-packages/lxml/html/__init__.py", line 53, in <module>
    from .. import etree
ImportError: libxslt.so.1: cannot open shared object file: No such file or directory

Any hints?

Hi Jake, did you installed or uninstalled other components? Looks like lxml is not installed correctly. please try

pip install lxml

If this is not solving the problem, post some more information about your environment.

Uh, now that you reminded, one tiny change meanwhile. I did a scratch install of hassbian and restored .homeassistant/ -folder contents from backup.

pip3 install lxml didn’t do the trick. It did install lxml without problems, but the error remains same. With this hint did some extensive googling and “sudo apt-get install libxslt-dev” fixed it. Looked like installing lxml was a prereq anyway. Thanks!

New version: 0.2.0

Changes:

  • Reorganize file structure and names to be compatible with further HA version 0.89.0
2 Likes

Thanks @ReneNulschDE!

All good except the device tracker - does this still work?

Thanks!

Hi, in my environment it looks good, at least I expect and HA reports that my car is at the airport parking lot. Do you have more insights why the device tracker should not work?

It shows up in HA as a device tracker, but the GPS coordinates are -1,-1.

I have a Dev and a Prod HA and it is he same in both. Using the most recent build of the component and HA.

I don’t think it has worked since the hiccup last week when it was down?

Would somebody be so kind to share his automations, views (lovelace) and template sensors?

Thx!

Thank you for your interest in this component. What would you like to achieve or what are your interests?

Hi, for me it works very well. Could it be that your subscription to this service has ended? Do you see the car in the official portal?

Is it possible to add unlock and lock functionality. Probably this requires more effort because its a POST?

curl -X POST “https://api.mercedes-benz.com/experimental/connectedvehicle/v1/vehicles/<insert_your_vehicle_id_here>/doors” \ -H “Content-Type: application/json” \ -H “authorization: Bearer <insert_the_access_token_here>” \ -d “{ “command”: “LOCK”}”

Hi, this is the new experimental api and these api is not available for real cars. I‘m using on older unofficial version and have not found the lock yet.

Good to know. Can I help to find?

My subscription doesn’t end until July this year :frowning:

It is so weird - this is what I get for it (excuse the bad editing :slight_smile: )

Everything else works perfectly. I am sure I am missing something obvious.

EDIT:
Here is how i have it set up


I have checked and all three python files are version 2.0.0 of the CC.

Are you familiar with android instrumentation like FRIDA and can overcome the certificate pinning? Then a proxy could show the api requests.

Hi, I‘ll send you two urls to test as soon as I‘m back from vacation.

1 Like

can you make a step by step guide how to add this custom component…

thx.

I get this error…

2019-03-05 13:38:37 ERROR (MainThread) [homeassistant.setup] Error during setup of component mbwebbeta
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/setup.py”, line 154, in _async_setup_component
component.setup, hass, processed_config) # type: ignore
File “/usr/lib/python3.5/asyncio/futures.py”, line 380, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.5/asyncio/tasks.py”, line 304, in _wakeup
future.result()
File “/usr/lib/python3.5/asyncio/futures.py”, line 293, in result
raise self._exception
File “/usr/lib/python3.5/concurrent/futures/thread.py”, line 55, in run
result = self.fn(*self.args, **self.kwargs)
File “/home/homeassistant/.homeassistant/custom_components/mbwebbeta/init.py”, line 167, in setup
mercedesme_api = Controller(username, password, scan_interval)
File “/srv/homeassistant/lib/python3.5/site-packages/mbwebapppy/controller.py”, line 209, in init
self.session_cookies = self._get_session_cookies(username, password)
File “/srv/homeassistant/lib/python3.5/site-packages/mbwebapppy/controller.py”, line 468, in _get_session_cookies
form = {x.attrib[‘name’]: x.attrib[‘value’] for x in hidden_elements}
File “/srv/homeassistant/lib/python3.5/site-packages/mbwebapppy/controller.py”, line 468, in
form = {x.attrib[‘name’]: x.attrib[‘value’] for x in hidden_elements}
File “src/lxml/etree.pyx”, line 2466, in lxml.etree._Attrib.getitem
KeyError: ‘value’