Mercedes Me Component

any progress to why I don’t get the device tracker?

not yet, I’ll add some more debug code…

okay I’ll be patient :slight_smile:

Hi, this weekend i got some time to rework my configuration which wasn’t working at all before I updated to the new variant.

Is there a way to directly use attributes in lovelace picture-element-cards? If no I would strongly recommend to go back to the single sensor elements. Not everybody is using attribute cards. If theres an other way please tell me. For now i will use template sensors and extract the attributes…

1 Like

How did you geth that gauge into the picture element? Would you mind to share your config?

1 Like

The gauge is coming from https://github.com/custom-cards/gauge-card

Edit: (Oh my, you are Manuel82, from which I copied from the start… Seems we did the same thing this weekend: reworking your original config to fit the new sensors/attributes… :wink:

Using template sensors is the way to go.

I have just finished my setup, based on the setup of @Manuel82. I’ll share my config very soon, just need to do some clean-up.

Here are my template sensors to get you started. I’ll try to post the rest of the config in another (decent) way:

    1rtf858_distance_since_start:
      value_template: "{{state_attr('sensor.1rtf858_odometer', 'distanceStart')| float}}"
      friendly_name: 'Distance Since Start'
      unit_of_measurement: 'km'
    1rtf858_average_speed_since_start:
      value_template: "{{state_attr('sensor.1rtf858_odometer', 'averageSpeedStart')| float}}"
      friendly_name: 'Average Speed Since Start'
      unit_of_measurement: 'km/u'
    1rtf858_drive_time_since_start:
       value_template: >-
         {% set time = state_attr('sensor.1rtf858_odometer', 'drivenTimeStart')| float %}
         {% set minutes = (time % 60) | int %}
         {% set hours = (time / 60) | int %}
         {% set days = (time / 86400) | int %}

         {%- if time < 60 -%}
           Less than a minute
         {%- else -%}
           {%- if hours > 0 -%}
             {%- if hours == 1 -%}
               1 hour
             {%- else -%}
               {{ hours }} hours
             {%- endif -%}
           {%- endif -%}
           {%- if minutes > 0 -%}
             {%- if hours > 0 -%}
               {{ ', ' }}
             {%- endif -%}
             {%- if minutes == 1 -%}
               1 minute
             {%- else -%}
               {{ minutes }} minutes
             {%- endif -%}
           {%- endif -%}
         {%- endif -%}
       friendly_name: 'Time Driven Since Start'
       unit_of_measurement: ''
    1rtf858_distance_since_reset:
       value_template: "{{state_attr('sensor.1rtf858_odometer', 'distanceReset')| float}}"
       friendly_name: 'Distance Since Reset'
       unit_of_measurement: 'km' 
    1rtf858_liquid_consumption_start:
       value_template: "{{state_attr('sensor.1rtf858_odometer', 'liquidconsumptionstart')| float}}"
       friendly_name: 'Consumption Since Start'
       unit_of_measurement: 'l/100km' 
    1rtf858_liquid_consumption_reset:
       value_template: "{{state_attr('sensor.1rtf858_odometer', 'liquidconsumptionreset')| float}}"
       friendly_name: 'Consumption Since Reset'
       unit_of_measurement: 'l/100km' 
    1rtf858_liquid_range:
       value_template: "{{state_attr('sensor.1rtf858_odometer', 'rangeliquid')| float}}"
       friendly_name: 'Range Liquid'
       unit_of_measurement: 'km' 
#    1rtf858_tank_level:
#       value_template: "{{state_attr('sensor.1rtf858_odometer', 'tanklevelpercent')| float}}"
#       friendly_name: 'Tank Level'
#       unit_of_measurement: '%'
    1rtf858_tire_pressurebar_front_left:
       value_template: "{{state_attr('binary_sensor.1rtf858_tire_warning', 'tirepressureFrontLeft')| float}}"
       friendly_name: 'Tire Pressure Front Left'
       unit_of_measurement: ''     
    1rtf858_tire_pressurebar_front_right:
       value_template: "{{state_attr('binary_sensor.1rtf858_tire_warning', 'tirepressureFrontRight')| float}}"
       friendly_name: 'Tire Pressure Front Right'
       unit_of_measurement: ''
    1rtf858_tire_pressurebar_rear_left:
       value_template: "{{state_attr('binary_sensor.1rtf858_tire_warning', 'tirepressureRearLeft')| float}}"
       friendly_name: 'Tire Pressure Rear Left'
       unit_of_measurement: ''
    1rtf858_tire_pressurebar_rear_right:
       value_template: "{{state_attr('binary_sensor.1rtf858_tire_warning', 'tirepressureRearRight')| float}}"
       friendly_name: 'Tire Pressure Rear Right'
       unit_of_measurement: ''
    1rtf858_door_front_right:
       value_template: >-
        {% if is_state_attr('sensor.1rtf858_lock', 'doorStateFrontRight', 'DOOR_CLOSED_AND_DOOR_LOCKED')%} 
           Closed
        {% else %}
           Open
        {% endif %}
       friendly_name: 'Door Status Front Right'
    1rtf858_door_front_left:
       value_template: >-
        {% if is_state_attr('sensor.1rtf858_lock', 'doorStateFrontLeft', 'DOOR_CLOSED_AND_DOOR_LOCKED')%} 
           Closed
        {% else %}
           Open
        {% endif %}
       friendly_name: 'Door Status Front Left'
    1rtf858_door_rear_right:
       value_template: >-
        {% if is_state_attr('sensor.1rtf858_lock', 'doorStateRearRight', 'DOOR_CLOSED_AND_DOOR_LOCKED')%} 
           Closed
        {% else %}
           Open
        {% endif %}
       friendly_name: 'Door Status Rear Right'
    1rtf858_door_rear_left:
       value_template: >-
        {% if is_state_attr('sensor.1rtf858_lock', 'doorStateRearLeft', 'DOOR_CLOSED_AND_DOOR_LOCKED')%} 
           Closed
        {% else %}
           Open
        {% endif %}
       friendly_name: 'Door Status Rear Left'
    1rtf858_trunk_status:
       value_template: >-
        {% if is_state_attr('sensor.1rtf858_lock', 'trunkStateRollup', 'CLOSED_AND_LOCKED')%} 
           Closed
        {% else %}
           Open
        {% endif %}
       friendly_name: 'Trunk Status'
    1rtf858_window_front_right:
       value_template: >-
        {% if is_state_attr('binary_sensor.1rtf858_windows_closed', 'windowstatusfrontright', 'CLOSED')%} 
           Closed
        {% else %}
           Open
        {% endif %}
       friendly_name: 'Window Status Front Right'
    1rtf858_window_front_left:
       value_template: >-
        {% if is_state_attr('binary_sensor.1rtf858_windows_closed', 'windowstatusfrontleft', 'CLOSED')%} 
           Closed
        {% else %}
           Open
        {% endif %}
       friendly_name: 'Window Status Front Left'
    1rtf858_window_rear_right:
       value_template: >-
        {% if is_state_attr('binary_sensor.1rtf858_windows_closed', 'windowstatusrearright', 'CLOSED')%} 
           Closed
        {% else %}
           Open
        {% endif %}
       friendly_name: 'Window Status Rear Right'
    1rtf858_window_rear_left:
       value_template: >-
        {% if is_state_attr('binary_sensor.1rtf858_windows_closed', 'windowstatusrearleft', 'CLOSED')%} 
           Closed
        {% else %}
           Open
        {% endif %}
       friendly_name: 'Window Status Rear Left'
    1rtf858_windows_allclosed:
        value_template: >-
         {% if is_state_attr('binary_sensor.1rtf858_windows_closed', 'windowstatusrearleft', 'CLOSED') and is_state_attr('binary_sensor.1rtf858_windows_closed', 'windowstatusrearright', 'CLOSED') and is_state_attr('binary_sensor.1rtf858_windows_closed', 'windowstatusfrontleft', 'CLOSED') and is_state_attr('binary_sensor.1rtf858_windows_closed', 'windowstatusfrontright', 'CLOSED') %} 
            Closed
         {% else %}
            Open
         {% endif %}
        friendly_name: 'All Windows Closed'          
    1rtf858_doors_allclosed:
        value_template: >-
         {% if is_state_attr('sensor.1rtf858_lock', 'doorsClosed', true)%} 
            Closed
         {% else %}
            Open
         {% endif %}
        friendly_name: 'All Doors Closed'  
    1rtf858_warning_washwater:
        value_template: >-
         {% if is_state_attr('binary_sensor.1rtf858_engine_light_warning', 'warningwashwater', false)%} 
            off
         {% else %}
            on
         {% endif %}
        friendly_name: 'Warning WashWater'        
    1rtf858_warning_breakfluid:
        value_template: >-
         {% if is_state_attr('binary_sensor.1rtf858_engine_light_warning', 'warningbrakefluid', false)%} 
            off
         {% else %}
            on
         {% endif %}
        friendly_name: 'Warning BreakFluid'

Sure, here is my config:
I’m using a high res main image to make the panel resizable without loosing the correct positioning of the elements even on 4k display ( https://i.imgur.com/rZLDq7b.png )

resources:
  - type: js
    url: /local/plugins/card-tools.js?v=1
  - type: js
    url: /local/plugins/card-modder.js?v=1
  - type: js
    url: /local/plugins/bar-card.js?v=1
  - type: js
    url: /local/plugins/bignumber-card.js?v=1
  - type: module
    url: /local/plugins/compact-custom-header.js?v=1.2.0
  - type: module
    url: /local/plugins/card-mod.js?v=0.0.1
  - url: /local/plugins/button-card.js?v=1.11.1
    type: module
cch:
  options: clock
  clock_format: 24
  clock_date: true  
title: Casa
views:


##############################################
#########  MACCHINA
##############################################
  - cards:
      - elements:
          - card:
              entity: sensor.livello_serbatoio
              title: Carburante
              type: gauge
              unit: '%'
            style:
              '--base-unit': 2.2vw
              '--paper-card-background-color': '#000000'
              left: 37%
              top: 17.5%
            type: 'custom:card-modder'
          - card:
              entity: sensor.fe270je_odometer
              scale: 1vw
              title: Chilometri percorsi
              type: 'custom:bignumber-card'
            style:
              '--paper-card-background-color': transparent
              left: 56.5%
              top: 19%
            type: 'custom:card-modder'
          - card:
              entity: sensor.consumo_recente
              scale: 1vw
              title: Consumo recente
              type: 'custom:bignumber-card'
            style:
              '--paper-card-background-color': transparent
              left: 45%
              top: 19%
            type: 'custom:card-modder'
          - card:
              entity: sensor.pressione_a_sx
              scale: 0.8vw
              type: 'custom:bignumber-card'
            style:
              '--paper-card-background-color': transparent
              left: 13%
              top: 59.3%
            type: 'custom:card-modder'
          - card:
              entity: sensor.pressione_a_dx
              scale: 0.8vw
              type: 'custom:bignumber-card'
            style:
              '--paper-card-background-color': transparent
              left: 27.2%
              top: 59.5%
            type: 'custom:card-modder'
          - card:
              entity: sensor.pressione_p_sx
              scale: 0.8vw
              type: 'custom:bignumber-card'
            style:
              '--paper-card-background-color': transparent
              left: 13%
              top: 80%
            type: 'custom:card-modder'
          - card:
              entity: sensor.pressione_p_dx
              scale: 0.8vw
              type: 'custom:bignumber-card'
            style:
              '--paper-card-background-color': transparent
              left: 27.2%
              top: 80.2%
            type: 'custom:card-modder'
          - entity: lock.fe270je_lock
            state_image:
              locked: /local/portiere_chiuse.png
              unlocked: /local/portiere_aperte.png
            style:
              left: 83%
              max-width: 3.4%
              top: 30.5%
            tap_action:
              action: none
            type: image
          - entity: sensor.stato_tettuccio
            state_image:
              TILT_SLIDE_SUNROOF_CLOSED: /local/portiere_chiuse.png
              TILT_SLIDE_SUNROOF_OPEN: /local/portiere_aperte.png
            style:
              left: 68.3%
              max-width: 2.5%
              top: 20.5%
            tap_action:
              action: none
            type: image
          - entity: sensor.liquido_freni
            state_image:
              'False': /local/check.png
              'True': /local/warning.png
            style:
              left: 76.8%
              max-width: 2.5%
              top: 20.5%
            tap_action:
              action: none
            type: image
          - entity: sensor.liquido_refrigerante
            state_image:
              'False': /local/check.png
              'True': /local/warning.png
            style:
              left: 81.3%
              max-width: 2.5%
              top: 20.5%
            tap_action:
              action: none
            type: image
          - entity: sensor.liquido_lavavetri
            state_image:
              'False': /local/check.png
              'True': /local/warning.png
            style:
              left: 85.7%
              max-width: 2.5%
              top: 20.5%
            tap_action:
              action: none
            type: image
        image: /local/macchina6.png
        style:
          transform: none
        type: picture-elements
    panel: true
    path: macchina
    title: Macchina
3 Likes

Hi,
I have now spent several hours, coffees and too many ciggies and still stuck.
The component seem to load correctly. HA does not complain. I have enabled the detailed log and messages show that I am connected and that I am getting responses. However, no sensors (binary and otherwise) show up in HA.

Question. Do I need to subscribe to any Mercedes dev API? Or is it a service on the Me-portal. for my MERCEDES-BENZ E-CLASS T-Model (S212) E 200 CDI (212.205) 2013 136Hk - there are no services available on the portal.

I am using the Me-bluetooth adapter connected to my phone. Based in Sweden. Data is visible in the portal.

state_WDXXXXXXXXXXXXX.json shows:

{"dynamic": {}, "aggregated": {"lastJourney": null}}

feat_WDXXXXXXXXXXXXX.json shows:

{"metadata": {"appSections": {"productsEnabled": false, "mobilityEnabled": true, "newsEnabled": true}
"featureEnablements": [{"name": "MYCAR_INFO_BUTTON", "enablement": "INVISIBLE"}, {"name": "EV_CHARGING_POINTS_TOGGLE", "enablement": "ACTIVATED"}, {"name": "CHARGING_CLIMA_CONTROL_DEPARTURETIME_TEMPERATURE_LINKOUT_TOGGLE", "enablement": "ACTIVATED"}, {"name": "CONNECT_SERVICE_MANAGEMENT_TOGGLE", "enablement": "INVISIBLE"}, {"name": "PARKING_OFF_STREET", "enablement": "INVISIBLE"}, {"name": "CHARGING_CLIMA_CONTROL_CHARGING_DEMAND_NOTIFICATION_TOGGLE", "enablement": "ACTIVATED"}, {"name": "ADD_VEHICLE", "enablement": "ACTIVATED"}, {"name": "EMOBILITY_SERVICE_PROVIDER", "enablement": "INVISIBLE"}, {"name": "ENERGIZING_COACH", "enablement": "INVISIBLE"}, {"name": "LEA_ASSISTANT", "enablement": "INVISIBLE"}, {"name": "REMOTE_STATUS_RANGE_CRITICAL_TOGGLE", "enablement": "INVISIBLE"}, {"name": "DOOR_TO_DOOR_NAVIGATION", "enablement": "INVISIBLE"}, {"name": "COLLISION_ALARM", "enablement": "INVISIBLE"}, {"name": "VEHICLE_AUTHORIZATION_CHANGE_EVENT_TOGGLE", "enablement": "INVISIBLE"}, {"name": "REMOTE_ENGINE_START", "enablement": "INVISIBLE"}, {"name": "AUX_HEAT", "enablement": "INVISIBLE"}, {"name": "S2C_MBA", "enablement": "INVISIBLE"}, {"name": "CHARGING_CLIMA_CONTROL_19B_TOGGLE", "enablement": "ACTIVATED"}, {"name": "VALET_PROTECT", "enablement": "INVISIBLE"}, {"name": "CONCIERGE", "enablement": "INVISIBLE"}, {"name": "VEHICLE_SERVICE_DASHBOARD", "enablement": "INVISIBLE"}, {"name": "MYCAR_PHASE_1", "enablement": "INVISIBLE"}, {"name": "PRIVATE_CAR_SHARING", "enablement": "INVISIBLE"}, {"name": "REMOTE_STATUS_RANGE_HIGHLIGHT_TOGGLE", "enablement": "INVISIBLE"}, {"name": "REMOTE_DOUBLE_DOOR_LOCK", "enablement": "INVISIBLE"}, {"name": "CHARGING_CLIMA_CONTROL", "enablement": "INVISIBLE"}, {"name": "REMOTE_STATUS", "enablement": "INVISIBLE"}, {"name": "S2C_RIF", "enablement": "INVISIBLE"}, {"name": "SMART_HOME", "enablement": "INVISIBLE"}, {"name": "CHARGING_CLIMA_CONTROL_TOGGLE", "enablement": "ACTIVATED"}, {"name": "VOICE_ADDRESS_SEARCH", "enablement": "ACTIVATED"}, {"name": "VEHICLE_LOCATOR", "enablement": "INVISIBLE"}, {"name": "REMOTE_STATUS_SUNROOF_LEAF_PAGE_TOGGLE", "enablement": "INVISIBLE"}, {"name": "REMOTE_CONFIGURATION", "enablement": "INVISIBLE"}, {"name": "FIND_VEHICLE", "enablement": "ACTIVATED"}, {"name": "COMMUTE_ALERT", "enablement": "INVISIBLE"}, {"name": "MAXSOC_CONFIGURATION", "enablement": "INVISIBLE"}, {"name": "CHARGING_CLIMA_CONTROL_PRECOND_NOTIFICATION_TOGGLE", "enablement": "ACTIVATED"}, {"name": "DESIGNATED_DRIVER", "enablement": "INVISIBLE"}, {"name": "CHARGING_CLIMA_CONTROL_BATTERY_ANIMATION_TOGGLE", "enablement": "ACTIVATED"}, {"name": "WEEKLY_PROFILE_CONFIGURATION", "enablement": "INVISIBLE"}, {"name": "DAYNIGHT_TARIFF_LINKOUT_TOGGLE", "enablement": "ACTIVATED"}, {"name": "S2C_INFO_TEXT", "enablement": "ACTIVATED"}, {"name": "EV_RANGE_ASSIST", "enablement": "INVISIBLE"}, {"name": "ONEWEB_LINKOUT_TOGGLE", "enablement": "ACTIVATED"}, {"name": "SPEED_ALERT", "enablement": "INVISIBLE"}, {"name": "INBOX", "enablement": "ACTIVATED"}, {"name": "PREDICTIVE_SUGGESTIONS", "enablement": "INVISIBLE"}, {"name": "PROFILE_PICTURE_TOGGLE", "enablement": "INVISIBLE"}, {"name": "PARKING_ON_STREET_PAYMENT", "enablement": "INVISIBLE"}, {"name": "VEHICLE_TRACKING", "enablement": "INVISIBLE"}, {"name": "TRIPS_TOGGLE", "enablement": "INVISIBLE"}, {"name": "EV_CORE_CHARGING_STATION_PROVIDER", "enablement": "INVISIBLE"}, {"name": "CAR_ALARM", "enablement": "INVISIBLE"}, {"name": "INSTANT_CHARGE_PROGRAM", "enablement": "INVISIBLE"}, {"name": "STARTER_BATTERY", "enablement": "INVISIBLE"}, {"name": "IN_CAR_DELIVERY", "enablement": "INVISIBLE"}, {"name": "PARKING_C2C", "enablement": "INVISIBLE"}, {"name": "RANGE_ON_MAP", "enablement": "INVISIBLE"}, {"name": "PARKING_ON_STREET", "enablement": "INVISIBLE"}, {"name": "TRAFFIC_VIOLATION_NOTIFICATION", "enablement": "INVISIBLE"}, {"name": "CHARGING_CLIMA_CONTROL_MAXSOC_TOGGLE", "enablement": "ACTIVATED"}, {"name": "LOCAL_PLATE_RESTRICTION_NOTIFICATION", "enablement": "INVISIBLE"}, {"name": "PARKING", "enablement": "INVISIBLE"}, {"name": "TEMPERATURE_SEAT_CLIMATE_CONTROL", "enablement": "INVISIBLE"}, {"name": "SERVICE_STATUS_CHANGE_EVENT_TOGGLE", "enablement": "INVISIBLE"}, {"name": "QR_CODE", "enablement": "ACTIVATED"}, {"name": "PARKING_REALTIME", "enablement": "INVISIBLE"}, {"name": "CHARGING_CLIMA_CONTROL_CHARGING_NOTIFICATION_TOGGLE", "enablement": "ACTIVATED"}, {"name": "DOOR_STATUS_DETAILS", "enablement": "INVISIBLE"}, {"name": "PARKING_OFF_STREET_BOOKING", "enablement": "INVISIBLE"}, {"name": "CHARGING_CLIMA_CONTROL_SELECTED_SOC_NOTIFICATION_TOGGLE", "enablement": "INVISIBLE"}, {"name": "REMOTE_DOOR_LOCK", "enablement": "INVISIBLE"}, {"name": "MARKET_DISABLED", "enablement": "INVISIBLE"}, {"name": "CONNECTED_CAR", "enablement": "INVISIBLE"}, {"name": "CHARGING_CLIMA_CONTROL_19B_NOTIFICATION_TOGGLE", "enablement": "INVISIBLE"}, {"name": "TRAFFIC_VIOLATION", "enablement": "INVISIBLE"}, {"name": "EV_CHARGING_POINTS", "enablement": "INVISIBLE"}, {"name": "WINDOW_LEAF_PAGE", "enablement": "INVISIBLE"}, {"name": "ANDROID_BLUETOOTH_FEATURES", "enablement": "INVISIBLE"}, {"name": "EV_CHARGING_POINTS_DASHBOARD_SHORTCUT", "enablement": "ACTIVATED"}, {"name": "MYCAR_PHASE_0", "enablement": "INVISIBLE"}, {"name": "LOCAL_PLATE_RESTRICTION", "enablement": "INVISIBLE"}, {"name": "NEWSFEED", "enablement": "ACTIVATED"}, {"name": "PRODUCT_TAB_MBRACE", "enablement": "INVISIBLE"}, {"name": "LIFESTYLE_CONFIGURATOR", "enablement": "INVISIBLE"}, {"name": "PRODUCTION_TRACKER", "enablement": "ACTIVATED"}, {"name": "ME_CLUB", "enablement": "INVISIBLE"}, {"name": "PERSONALIZED_NEWSFEED", "enablement": "ACTIVATED"}, {"name": "APPLY_CREDIT", "enablement": "INVISIBLE"}, {"name": "PHYD_INSURANCE", "enablement": "INVISIBLE"}, {"name": "PRODUCT_FINDER", "enablement": "INVISIBLE"}, {"name": "FINANCIAL_CALCULATOR", "enablement": "INVISIBLE"}, {"name": "MY_ACCOUNT", "enablement": "INVISIBLE"}, {"name": "FINACIAL_CONTRACT_MGMT", "enablement": "INVISIBLE"}, {"name": "ONLINE_OFFLINE_MODE", "enablement": "ACTIVATED"}, {"name": "ENABLED_CAR_IMAGE_CACHE", "enablement": "INVISIBLE"}, {"name": "DISPLAY_LOGIN_REGISTER", "enablement": "INVISIBLE"}, {"name": "UNLIMITED_CONSUMPTION_TOGGLE", "enablement": "ACTIVATED"}, {"name": "DAIVB_EMPTY_ERROR", "enablement": "INVISIBLE"}, {"name": "DISPLAY_SERVICEAGREEMENTS_PROMPT", "enablement": "INVISIBLE"}, {"name": "DISPLAY_ACTIVATE_SERVICE", "enablement": "ACTIVATED"}, {"name": "DISPLAY_EULA_DATA_PROTECTION", "enablement": "ACTIVATED"}, {"name": "VEHICLE_RULES_VALIDATION", "enablement": "INVISIBLE"}, {"name": "DISPLAY_APP_PROVIDER", "enablement": "ACTIVATED"}, {"name": "UNIT_SELECTION", "enablement": "ACTIVATED"}, {"name": "ASK_USER_RATING", "enablement": "INVISIBLE"}, {"name": "DISPLAY_SETTINGS_TOGGLE", "enablement": "ACTIVATED"}, {"name": "CAR2GO", "enablement": "INVISIBLE"}, {"name": "MOOVEL", "enablement": "INVISIBLE"}, {"name": "MYTAXI", "enablement": "ACTIVATED"}, {"name": "MOBILITY_SERVICES", "enablement": "ACTIVATED"}, {"name": "SHOP", "enablement": "INVISIBLE"}, {"name": "ONLINE_BOOKING_REQUEST", "enablement": "ACTIVATED"}, {"name": "DEALER_SEARCH", "enablement": "ACTIVATED"}, {"name": "HOW_TO_VIDEOS", "enablement": "ACTIVATED"}, {"name": "ACCIDENT_CLAIM", "enablement": "INVISIBLE"}, {"name": "DASHBOARD_HELP", "enablement": "ACTIVATED"}], "userVehicleState": "LEGACY"}, "staticVehicleData": {"vin": "WDXXXXXXXXXXXXX", "imageUrl": null, "model": "E 200 CDI BlueEFFICIENCY Estate", "licensePlate": "XYZ123", "initialRegistration": null, "color": "polar white", "equipmentLine": "Classic", "upholstery": "Black ARTICO man-made leather", "displacement": null, "output": "136 PS", "fuel": null, "transmission": "automatic transmission", "modelYear": null, "euroStandard": null, "baumuster": "212205", "specialEquipment": ["P:803"], "geoInfo": null, "unlimitedConsumption": false, "supportsDayNightTariff": false, "vehicleRules": {"overallRangeLiquidAndElectricPercent": "25", "locked": "true"}}}

Thanks for any assistance!! :slight_smile:
/Mikael

Hi @ThePapaMaan,

The Bluetooth adapter will not work with this integration.

The state_WDXXXXXXXXXXXXX.json Is empty, that means the api delivers no data.

Sorry, I can’t help here.

Rene

What a b.mmer. ok. Thanks for your quick response!

Hi @ReneNulschDE
I integrated your old project mercedesmebeta for simulator to HA, and see exception from log:

2019-07-26 10:24:03 ERROR (SyncWorker_3) [mercedesmejsonpy.controller] url: https://api.mercedes-benz.com/experimental/connectedvehicle/v1/vehicles, headers: {'content-type': 'application/json', 'Authorization': 'Bearer d0c68dd4-c939-4a0f-8cf8-xxxxxxxxxxxx'}, proxies: None
NoneType: None
2019-07-26 10:24:09 ERROR (SyncWorker_3) [mercedesmejsonpy.controller] res.json: [{'id': '6DE25C138CECE3B10B', 'licenseplate': 'S-GG-613', 'finorvin': '1HMA8C654H2B0B551'}]
NoneType: None
2019-07-26 10:24:09 ERROR (SyncWorker_3) [mercedesmejsonpy.controller] url: https://api.mercedes-benz.com/experimental/connectedvehicle/v1/vehicles/6DE25C138CECE3B10B, headers: {'content-type': 'application/json', 'Authorization': 'Bearer d0c68dd4-c939-4a0f-8cf8-xxxxxxxxxxxx'}, proxies: None
NoneType: None
2019-07-26 10:24:10 ERROR (SyncWorker_3) [mercedesmejsonpy.controller] res.json: {'id': '6DE25C138CECE3B10B', 'licenseplate': 'S-GG-613', 'salesdesignation': 'E 400 4MATIC Limousine', 'finorvin': '1HMA8C654H2B0B551', 'nickname': 'mmueller', 'modelyear': '2017', 'colorname': 'iridiumsilber metallic', 'fueltype': 'Benzin', 'powerhp': '333', 'powerkw': '245', 'numberofdoors': '5', 'numberofseats': '5'}
NoneType: None
2019-07-26 10:24:10 ERROR (SyncWorker_3) [mercedesmejsonpy.controller] getStateOfCharge for 6DE25C138CECE3B10B called
NoneType: None
2019-07-26 10:24:10 ERROR (SyncWorker_3) [mercedesmejsonpy.controller] API_ENDPOINT: https://api.mercedes-benz.com/experimental/connectedvehicle/v1, APT_VEHICLES: vehicles, car_id: 6DE25C138CECE3B10B, api: stateofcharge
NoneType: None
2019-07-26 10:24:10 ERROR (SyncWorker_3) [mercedesmejsonpy.controller] url: https://api.mercedes-benz.com/experimental/connectedvehicle/v1/vehicles/6DE25C138CECE3B10B/stateofcharge, headers: {'content-type': 'application/json', 'Authorization': 'Bearer d0c68dd4-c939-4a0f-8cf8-xxxxxxxxxxxx'}, proxies: None
NoneType: None
2019-07-26 10:24:12 ERROR (SyncWorker_3) [mercedesmejsonpy.controller] res.json: {'reason': 'Invalid response was retrieved from High Mobility. No state of charge information is available.', 'code': 500}
NoneType: None
2019-07-26 10:24:12 ERROR (SyncWorker_3) [mercedesmejsonpy.controller] Connection failed with http code 500
NoneType: None
2019-07-26 10:24:13 ERROR (MainThread) [homeassistant.setup] Error during setup of component mercedesmebeta
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/homeassistant/setup.py", line 156, in _async_setup_component
    component.setup, hass, processed_config)  # type: ignore
  File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/pi/.homeassistant/custom_components/mercedesmebeta/__init__.py", line 165, in setup
    mercedesme_api = Controller(auth_handler, scan_interval)
  File "/home/pi/.homeassistant/deps/lib/python3.7/site-packages/mercedesmejsonpy/controller.py", line 156, in __init__
    self.load_cars()
  File "/home/pi/.homeassistant/deps/lib/python3.7/site-packages/mercedesmejsonpy/controller.py", line 205, in load_cars
    car.stateofcharge = self.get_state_of_charge(car.id)
  File "/home/pi/.homeassistant/deps/lib/python3.7/site-packages/mercedesmejsonpy/controller.py", line 312, in get_state_of_charge
    result = stateofcharge.get("stateofcharge")
AttributeError: 'NoneType' object has no attribute 'get'

Then I query the data according to the connection API(https://developer.mercedes-benz.com/apis/connected_vehicle_experimental_api/docs), some api response is valid,

$ curl -X GET "https://api.mercedes-benz.com/experimental/connectedvehicle/v1/vehicles" \
>   -H "accept: application/json" \
>   -H "authorization: Bearer 20cf9050-2217-4a89-bcd6-xxxxxxxxxxxx"
[{"id":"6DE25C138CECE3B10B","licenseplate":"S-GG-613","finorvin":"1HMA8C654H2B0B551"}]

$ curl -X GET "https://api.mercedes-benz.com/experimental/connectedvehicle/v1/vehicles/6DE25C138CECE3B10B" \
>   -H "accept: application/json" \
>   -H "authorization: Bearer 20cf9050-2217-4a89-bcd6-xxxxxxxxxxxx"

{"id":"6DE25C138CECE3B10B","licenseplate":"S-GG-613","salesdesignation":"E 400 4MATIC Limousine","finorvin":"1HMA8C654H2B0B551","nickname":"mmueller","modelyear":"2017","colorname":"iridiumsilber metallic","fueltype":"Benzin","powerhp":"333","powerkw":"245","numberofdoors":"5","numberofseats":"5"}

and some api response was invalid, such as stateofcharge and doors, the response was following:

$ curl -X GET "https://api.mercedes-benz.com/experimental/connectedvehicle/v1/vehicles/6DE25C138CECE3B10B/stateofcharge" \
>   -H "accept: application/json" \
>   -H "authorization: Bearer 20cf9050-2217-4a89-bcd6-xxxxxxxxxxxx"
{"reason":"Invalid response was retrieved from High Mobility. No state of charge information is available.","code":500}

$ curl -X GET "https://api.mercedes-benz.com/experimental/connectedvehicle/v1/vehicles/6DE25C138CECE3B10B/doors" \
>   -H "accept: application/json" \
>   -H "authorization: Bearer 20cf9050-2217-4a89-bcd6-xxxxxxxxxxxx"
{"reason":"Invalid response was retrieved from High Mobility. No doors information is available.","code":500}

from the docs I know the code 500 means: An error occurred on the server side, e.g. a required service did not provide a valid response.

Do you know how to get the valid response?
Thanks very much!

Hi @rangerzhou,

Looks like a bug on the server side and you should ask the Mercedes dev team about this. You can find the email address on their developer website.

OK, I have already contact them through the link https://developer.mercedes-benz.com/support, hope they can give me the answer.

Thanks!

Thanks to all who share (part of) their config.

I’m too much of a novice to get it working though. Can someone post clear instructions from a to z on how to add something like this: Mercedes Me Component

I have the mercedesme component already working and the default sensors are present.

@ReneNulschDE

Is it possible to get some additonal attributes for:
supplybatteryvoltage, batteryState

Should be available according to this:

Also warninglowbattery does not appear for me under warningenginelight?

warning

Hi @plantoschka,

please excuse my late response… it’s vacation season :slight_smile:

supplybatteryvoltage and warninglowbattery are attributes of the ‘Range electric’ electric sensor.

I’ll add batteryState.

BR
Rene

2 Likes

Quick question @ReneNulschDE. I have taken a quick look but can’t find the answer

My daughter is in the US and has a Merc - does this component work over there?

No, don’t work.

Thank you.

I’ll just have to get her to move back to the UK :slight_smile: …Though she will probably want to borrow my car if she did that