Mercedes Me Component

Thanks @ReneNulschDE, I will have a look at the services.

I see this in the log. Do you know anything about it?

Could not connect to wss://websocket-prod.risingstars.daimler.com/ws, retry in 10 seconds...

8:31:49 AM – (ERROR) MercedesME 2020 (custom integration) - message first occurred at September 14, 2022 at 10:03:22 PM and shows up 2550527 times

does this work for cars in the US? If so, what do i need to put into the configuration for HA to recognize the sensors?
Thanks for your help!

@ReneNulschDE

just switched my car
I left the old one in HA but it was removed from Mercedes Me account of course.
I gave the new car the same “name”/“licenceplate” with just MB to see if maybe the same entities get used.

However now it looks like this:

the first entry is the old one
the second the new car… but it did not create entities for this car
the third entry was also newly created for the new car with the name VIN Parking Brake … and there it created the entities for the new card.

why it did create a 3rd device is unclear to me

What is your home country? US?

US cars are working if the car is from 2019 or newer. Just put in your username and select the US region. Sometimes the two cars are created in the US. You have option in the integration settings to filter out this phantom car.

I am DE (Germany)

@ReneNulschDE

[quote=“ReneNulschDE, post:1048, topic:41911”]

alias: Close SunRoof when entering home zone
action:
  - service: mbapi2020.sunroof_close
    data:
      vin: W1NXXXXX

Hello

I share totaly your point of view :wink:

Altough I put you automation in in my HA, I have to following issue when I come back to my house and the rooftop is not closing :

  • Car action: ROOFCLOSE failed. error_code: CMD_FAILED, error_message: Command failed. Normally, there should be additional business errors detailing what exactly went wrong
  • Car action: ROOFCLOSE failed. error_code: 6902, error_message: None
    Blockquote

I have checked in your repository bu I don’t find any information about this error code.

Did you encouter this error ?

Thank you for you help
Hervé

I am having issues integrating a card config on this forum

this template code
´´´

  • platform: template
    sensors:
    car_tire_pressure_rear_left:
    friendly_name: Tire pressure Rear Left
    value_template: ‘{{ states.binary_sensor.2cbu209_tire_warning.attributes.tirepressureRearLeft }}’
    car_tire_pressure_rear_right:
    friendly_name: Tire pressure Rear Right
    value_template: ‘{{ states.binary_sensor.2cbu209_tire_warning.attributes.tirepressureRearRight }}’
    car_tire_pressure_front_left:
    friendly_name: Tire pressure Front Left
    value_template: ‘{{ states.binary_sensor.2cbu209_tire_warning.attributes.tirepressureFrontLeft }}’
    car_tire_pressure_front_right:
    friendly_name: Tire pressure Front Right
    value_template: ‘{{ states.binary_sensor.2cbu209_tire_warning.attributes.tirepressureFrontRight }}’
    ´´´
    is giving me the following error

Invalid config for [sensor.template]: invalid template (TemplateSyntaxError: expected token ‘end of print statement’, got ‘cbu209_tire_warning’) for dictionary value @ data[‘sensors’][‘car_tire_pressure_front_left’][‘value_template’]. Got ‘{{ states.binary_sensor.2cbu209_tire_warning.attributes.tirepressureFrontLeft }}’
invalid template (TemplateSyntaxError: expected token ‘end of print statement’, got ‘cbu209_tire_warning’) for dictionary value @ data[‘sensors’][‘car_tire_pressure_front_right’][‘value_template’]. Got ‘{{ states.binary_sensor.2cbu209_tire_warning.attributes.tirepressureFrontRight }}’
invalid template (TemplateSyntaxError: expected token ‘end of print statement’, got ‘cbu209_tire_warning’) for dictionary value @ data[‘sensors’][‘car_tire_pressure_rear_left’][‘value_template’]. Got ‘{{ states.binary_sensor.2cbu209_tire_warning.attributes.tirepressureRearLeft }}’
invalid template (TemplateSyntaxError: expected token ‘end of print statement’, got ‘cbu209_tire_warning’) for dictionary value @ data[‘sensors’][‘car_tire_pressure_rear_right’][‘value_template’]. Got ‘{{ states.binary_sensor.2cbu209_tire_warning.attributes.tirepressureRearRight }}’. (See ?, line ?).

Does anyone have a tip tip to help me forward ?

Ok anche a me funziona dopo avere reinstallato, Grazie

Mine is a 2018 :frowning:

How can I add these attributes from the entity Lock
Schermafbeelding 2022-09-27 om 20.37.28

Has someone managed to get the aux heatin on with the departure time using a time picker component linked to an alarmclock? my very limited skills are holding me back. i managed to link it to my alarmclock but with a fixed value. the alarm is set to 06:10 and the heating will always start at 06:30 even if i move my alarmtime to 07:00.
i^m using node red.
somehow, the time set for the alarm must be formatted to minutes after midnight and then added at the time_1 position.

my current flow:

[{"id":"8871c13fe72d03e6","type":"api-current-state","z":"89d8ab4fc1b6f98d","name":"Alarm Clock ON?","server":"8ac3cd7f.58d3e","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.status_alarmclock","state_type":"str","blockInputOverrides":false,"outputProperties":[],"for":0,"forType":"num","forUnits":"minutes","x":670,"y":180,"wires":[["51eff1ba3109598f"],[]]},{"id":"09b346ccd0059a95","type":"api-current-state","z":"89d8ab4fc1b6f98d","name":"Bewohner Home","server":"8ac3cd7f.58d3e","version":3,"outputs":2,"halt_if":"home","halt_if_type":"str","halt_if_compare":"is","entity_id":"group.gruppe_bewohner","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":430,"y":180,"wires":[["8871c13fe72d03e6"],[]]},{"id":"0638235f967a97ef","type":"inject","z":"89d8ab4fc1b6f98d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 02 * * 1,2,3,4,5","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":230,"y":180,"wires":[["09b346ccd0059a95"]]},{"id":"51eff1ba3109598f","type":"api-call-service","z":"89d8ab4fc1b6f98d","name":"Heizung Mercedes 06:30","server":"8ac3cd7f.58d3e","version":5,"debugenabled":false,"domain":"mbapi2020","service":"auxheat_configure","areaId":[],"deviceId":[],"entityId":[],"data":"{\"vin\":\"WXXXXXXXXXXX\",\"time_selection\":\"1\",\"time_1\":\"390\",\"time_2\":\"420\",\"time_3\":\"450\"}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":970,"y":220,"wires":[[]]},{"id":"8ac3cd7f.58d3e","type":"server","name":"Home Assistant","version":4,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m"}] 

UPDATED (I Made a mistake & corrected): Try this, replace the upper part by this:

- platform: template
  sensors:
    car_tire_pressure_rear_left:
      friendly_name: Tire pressure Rear Left
      value_template: "{{ (state_attr('binary_sensor.2cbu209_tire_warning', 'tirepressureRearRight')) }}"
    car_tire_pressure_rear_right:
      friendly_name: Tire pressure Rear Right
      value_template: "{{ (state_attr('binary_sensor.2cbu209_tire_warning', 'tirepressureRearRight')) }}"
    car_tire_pressure_front_left:
      friendly_name: Tire pressure Front Left
      value_template: "{{ (state_attr('binary_sensor.2cbu209_tire_warning', 'tirepressureFrontLeft')) }}"
    car_tire_pressure_front_right:
      friendly_name: Tire pressure Front Right
      value_template: "{{ (state_attr('binary_sensor.2cbu209_tire_warning', 'tirepressureFrontRight')) }}"
    car_rangeliquid:
      friendly_name: Car liquid range
      value_template: "{{ (state_attr('sensor.2cbu209_odometer', 'rangeliquid')) }}"
    car_service_days:
      friendly_name: Car service days
      value_template: "{{ (state_attr('sensor.2cbu209_odometer', 'serviceintervaldays')) }}"

It’s compatible with Mercedes Me Adapter ? W246 of 2012, mercedes me adapter installed. I can see my own data on app “Adapter”, but nothing in Home Assistant.

Hi @giuseppeborrelli ,

No, the Adapter is not supported.

BR
Rene

Hi guys, I’m trying to setup mbapi2020 in my Home Assistant. I get all my info about the car but I can’t lock/unlock the door. I get the following error:


Where can I find the “code”? What is this anyway?
Thank you.

Did you set one up in your MB app?

If so you need to go to integrations and then Configure the MB integration. It has a place for the pin.

1 Like

Thank you @rmertz3282. I solved the problem.
Another question. Is there any way to see Lock/Unlock button in Apple Home App via HomeBridge? - I would like to ask Siri “Hey Siri, lock my car” :slight_smile:

If you installed the HomeBridge integration did you configure it to include the Mercedes lock? My Home app shows the Mercedes lock and works as expected. Including with Siri. If I’m not mistaken it may not unlock the device due to security concerns.

Hi. I enabled everything in HomeBridge (included all domains) and I still can’t see the lock option. I have only:


Any more ideas?
Lock/Unlock works from HA.