Mercedes Me Component

yes, I already have some zones defined in the MB App, at least “home” and “office”, but additionally I use the GPS data from the device_tracker of your Mercedes Me Component

{{ state_attr('device_tracker.eqa_device_tracker','latitude') }}
{{ state_attr('device_tracker.eqa_device_tracker','longitude') }}

and lookup the real address using geopy when subscribing the mqtt messages in a python daemon process running on my smarthome server. Thats for sure not the most lightweight solution :wink: - I would more appreciate to use the MB API directly, but its no more free for private use, as far as I know. Thanks anyway for your great Mercedes Me Component

from geopy.geocoders import Nominatim
...
geolocator = Nominatim(user_agent="geoapiExercises")
location = geolocator.reverse((latitude, longitude), exactly_one=True)    
if location and 'address' in location.raw:
    address = location.raw['address']
    road = address.get('road', 'Street not found')
    city = address.get('city', address.get('town', 'City not found'))
...

Thanks a lot VietNgoc - that did the trick

Thanks! Cant believe i missed this :slight_smile:

Hi @ReneNulschDE ,

I’m currently futzing around with the set temperature action.

I did realize that the parameters does not seem to work as expected.
One example:

action: mbapi2020.temperature_configure
data:
  vin: W1Kxxxxxx1xxxxxxx
  rear_right: 25

Result (All temperatures were set to 21°C prior to the command):

Also, rear_left seems to be the driver’s seat (front_left works also).
No idea how to change the rear right seat.

Also: The MercedesMe app has the option of “set all temperatur to the same value”. Do you know if that is a separate call, or just literally setting the same temperature on all seats?

Thanks,

Thomas

Hi Thomas,
thanks for your feedback. Looks like I have to check this again. Can I send some commands to your car? I don’t have a car with this feature anymore (but time now ;-))

In all my tests this was only only one call, the app is managing this somehow… (there are cars with only front-seat support and other cars like yours with four seat support) I would need more cars to check this in detail.

Sure, use my car. No problem.

1 Like

I have published a bugfix release v0.19.1.

Fixes:

  • Rear seats can’t be configured with HA action TemperatureConfigure
  • Error “startTimeMinute unknown” when using the HA action ChargeBreakWindowsConfigure

Improvements:

2 Likes

Thanks, the set Temperature works as expected.

1 Like

Hi @ReneNulschDE

Just to be annoying:

The Mercedes App allows setting the temperature to “Low” and “High” (in addition to the actual temperatures between 16 and 28°C):

This is coded in the attributes of the binary_sensor.XXX_preclimate_status sensor as 0 and 30:
Unbenannt

The action mbapi2020.temperature_configure does not allow this settings.

Is there an easy way to implement this also?
If not, it’s not a big deal, I’m happy with the way it is.

Thomas

1 Like

Hi Thomas,

thanks for the input. I overlooked this completely…

The next version will include this change:

BR
Rene

1 Like

Hi @ReneNulschDE ,

do you know what the “Datenfreigabe für unabhängige Service Dienstleister” within the Mercedes Dashboard is?
Is is something that could be used when/if Mercedes decides to revamp their MercedesMe API to such an extend that you are not able to reverse-engineer it anymore?

Thomas

I don’t see any value but I’m also not 100% sure - I tested it with my cars and the dataset of the API was the same. I assume that this is more GDPR related or when you use third party apps (B2B-API)

06:50pm: Does anyone here gets a “ERROR (MainThread) [custom_components.mbapi2020.websocket] Other error 429, message=‘Invalid response status’,…” error since 6:40pm CET?

07:05pm: mobile app is not working too (at least the relevant car api functions)

Nothing on my end, both the integration, and the app works fine (at least I could open/close windows, unlock/lock doors - both from the app and from HA).

1 Like

Update:
This morning, sensors and commands are not working on the integration, app works.

Only error I could see was:
ERROR (MainThread) [custom_components.mbapi2020.websocket] remote websocket connection closed: Cannot write to closing transport

The carsensor Last message received was 04:19:37 this morning.

Thx, my main account is working again. Could you reload the component (or restart HA)?

Restarted HA, works again.

1 Like

I have lost the connection too, but it did not help to restart Hass. I tried to update from HACS as well, the version info is v0.19.1. Is that the latest version, and is there anything else I could try? I don’t see anything in the logs except for the standard warning about using a custom integration. :grimacing:

Edit: Never mind, it suddenly came back, without me doing anything. :grin:

@ReneNulschDE: I have not received any updated GPS data via the device_tracker since 14.Nov.

{{ state_attr('device_tracker.eqa_device_tracker','latitude') }}
{{ state_attr('device_tracker.eqa_device_tracker','longitude') }}

At this point (approx.), the MB Fahrtenbuch Service (incl. iOS app) also expired and I had not extended it. Could there be a relation or any other reason?

@dirkcx: Check if the Digital Services License for Remote Services has expired. (is included for the first three years normally)