All Projects → xraver → mercedes_me_api

xraver / mercedes_me_api

Licence: MIT license
Script to use Mercedes Me APIs.

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to mercedes me api

sensor.avanza stock
Custom component to get stock data from Avanza for Home Assistant
Stars: ✭ 30 (-11.76%)
Mutual labels:  homeassistant, hacs
ha-config-ataraxis
My Home Assistant Configs. If you like what you see, please ⭐️my repo. It would encourage me a lot 🤘
Stars: ✭ 146 (+329.41%)
Mutual labels:  homeassistant, hacs
homeassistant-homeconnect
Custom component for Home Assistant to connect appliances supporting the Home Connect standard
Stars: ✭ 120 (+252.94%)
Mutual labels:  homeassistant, hacs
ad-alexatalkingclock
Alexa (or other Smart Speakers) tell you the time without asking every hour. Please ⭐️if you like my app :)
Stars: ✭ 30 (-11.76%)
Mutual labels:  homeassistant, hacs
Home-Assistant-custom-components-DPC-Alert
Italy Meteo-hydro alert and hydrogeological phenomena Civil Protection (Protezione Civile). In this custom component you can find the vigilance Bulletin and the Bulletin of national hydrogeological and hydraulic criticalities. They allow to check whether in your current location there will be criticalities/warnings related to weather-hydrogeolog…
Stars: ✭ 31 (-8.82%)
Mutual labels:  homeassistant, hacs
ha-lovelace-elapsed-time-card
Home Assistant Lovelace Custom Card to calculate time elapsed/left
Stars: ✭ 21 (-38.24%)
Mutual labels:  homeassistant, hacs
purifier-card
Air Purifier card for Home Assistant Lovelace UI
Stars: ✭ 155 (+355.88%)
Mutual labels:  homeassistant, hacs
plugwise-beta
Custom-component / development version of the Plugwise Home Assistant platform
Stars: ✭ 23 (-32.35%)
Mutual labels:  homeassistant, hacs
hass-pandora-cas
Home Assistant custom component for Pandora Car Alarm System
Stars: ✭ 15 (-55.88%)
Mutual labels:  homeassistant, hacs
home assistant adax
Integration for Adax heaters
Stars: ✭ 24 (-29.41%)
Mutual labels:  homeassistant, hacs
ocpp
Home Assistant integration for electric vehicle chargers that support the Open Charge Point Protocol (OCPP).
Stars: ✭ 82 (+141.18%)
Mutual labels:  homeassistant, hacs
hass-hue-icons
Additional vector icons for home assistant to model Philips Hue bulbs and fixtures.
Stars: ✭ 161 (+373.53%)
Mutual labels:  homeassistant, hacs
mega hacs
MegaD HomeAssistant integration
Stars: ✭ 87 (+155.88%)
Mutual labels:  homeassistant, hacs
homeassistant-aemet-sensor
AEMET integration for Home Assistant
Stars: ✭ 21 (-38.24%)
Mutual labels:  homeassistant, hacs
ps-date-countdown
A python script for Homeassistant that counts down the days to birthdays, anniversaries etc
Stars: ✭ 21 (-38.24%)
Mutual labels:  homeassistant, hacs
lovelace-valetudo-map-card
Draws the map available from a Xiaomi Vacuum cleaner flashed with Valetudo in a Home Assistant Lovelace card
Stars: ✭ 149 (+338.24%)
Mutual labels:  homeassistant, hacs
power-distribution-card
A Lovelace Card for visualizing power distributions.
Stars: ✭ 117 (+244.12%)
Mutual labels:  homeassistant, hacs
MeteoalarmCard
Meteoalarm, Météo-France and DWD severe weather warnings card for Home Assistant Lovelace UI ⛈️
Stars: ✭ 48 (+41.18%)
Mutual labels:  homeassistant, hacs
panasonic smart app
Panasonic Smart App integration for Home Assistant.
Stars: ✭ 22 (-35.29%)
Mutual labels:  homeassistant, hacs
slider-button-card
A button card with integrated slider
Stars: ✭ 319 (+838.24%)
Mutual labels:  homeassistant, hacs

mercedes_me_api

Releases Last Commit hacs License Status BuyMeCoffee

This repository contains a collection of scripts (including the Home Assistant Custom Component) in order to collect data from the sensors of a Mercedes-Benz car using Mercedes me API.

Pre-Requirements

  1. Own a Mercedes Benz Car with Mercedes me installed and working.
  2. Create an application in https://developer.mercedes-benz.com/
  3. Register to the following APIs (all of them):

Notes:

  1. the APIs described above do not require any subscription in case you use them with your own car associated with the Mercedes me Account.
  2. not all sensors may be available in your own car; if a sensor is not available the data request returns no data.
  3. only one car is supported for the moment.

Home Assistant Custom Component

The Home Assistant Custom Component is a component to be added in Home Assistant in order to integrate the sensors of a Mercedes-Benz car using Mercedes me API. This component is still in development.

Open Points & Issues

  • Complete OAUTH2 Authentication & Get the First Token
  • Get state after starts -> now it waits <scan_interval> seconds.
  • Config Flow for automatic configuration
  • Log Management
  • Bugfix & Software optimizations

For further details please refer to issues list.

Installation

To use this custom component it's necessary to perform the following instructions:

  1. clone the repository
  2. create make a symbolic link from git_repost/custom_components/mercedesmeapi to hass_folder/custom_components

Configuration

  1. Add in the configuration.yaml the following emelents:
mercedesmeapi:
  client_id: <**INSERT_YOUR_CLIENT_ID**>
  client_secret: <**INSERT_YOUR_CLIENT_SECRET**>
  vehicle_id: <**INSERT_YOUR_VEHICLE_ID**>
  enable_resources_file: <**ENABLE (true) OR DISABLE (false) RESOURCES - OPTIONAL (DEFAULT DISABLED)**>
  scan_interval: <** TIME PERIOD (NUMBER OF SECONDS) TO REFRESH RESOURCES - OPTIONAL**>
  1. Actually it's not possible to retrieve the token from scratch. Please use the other scripts to retrieve the first token and copy it (.mercedesme_token) into the homeassistant configuration folder, in the same path where configuration.yaml is located

Debug

To enable advanced log please expand the logger module configuration with the following lines:

logger:
  logs:
    custom_components.mercedesmeapi: debug

Shell Scripts

There are two shell script:

  1. Python Version
  2. Bash Version The installation is the same, the usage is different.

Installation

To use this script it's necessary to perform the following instructions:

  1. clone the repository
  2. create a config file (.mercedesme_config) with:
CLIENT_ID=<**INSERT_YOUR_CLIENT_ID**>
CLIENT_SECRET=<**INSERT_YOUR_CLIENT_SECRET**>
VEHICLE_ID=<**INSERT_YOUR_VEHICLE_ID**>
ENABLE_RESOURCES_FILE: <**ENABLE (true) OR DISABLE (false) RESOURCES - (DEFAULT DISABLED)**>

where CLIENT_ID and CLIENT_SECRET referring to the application information that can be found in Mercedes Developer Console and VEHICLE_ID is the VIN of your car.

First Token Creation

To create the first token it's necessary to perform the following steps:

  1. Create the APP and register it to all APIs as describe in the Pre-Requirements paragraph
  2. Logout in all browser from Mercedes Me (Developer site included)
  3. Execute the shell or python script with -t parameter to obrain the first token
  4. Open with a browser the link provided by the script: a login page will be shown
  5. Using your Mercedes Me credential log in: a new web-page will ask to authorize the APP created in the step 1 to access to the personal information associated to the APIs registered
  6. Enable all information and press Allow
  7. An error page will appear: check the URI: it's something like https://localhost/?code=DQ8htZSw4WtJ27r7sTrVJwszGWxrCx9emy5FDUFa
  8. Copy the part of the URI after code= (in this case DQ8htZSw4WtJ27r7sTrVJwszGWxrCx9emy5FDUFa) and paste into the running script

Python Usage

To execute the script read below:

usage: mercedes_me_api.py [-h] [-t] [-r] [-s] [-R] [-v]

optional arguments:
  -h, --help       show this help message and exit
  -t, --token      Procedure to obtatin the Access Token
  -r, --refresh    Procedure to refresh the Access Token
  -s, --status     Retrive the Status of your Vehicle
  -R, --resources  Retrive the list of available resources of your Vehicle
  -v, --version    show program's version number and exit

Bash Usage

To execute the script read below:

Usage:    mercedes_me_api.sh <arguments>

Example:  mercedes_me_api.sh --token --fuel
     or:  mercedes_me_api.sh -l

Arguments:
    -t, --token           Procedure to obtatin the Access Token (stored into .mercedesme_token)
    -r, --refresh         Procedure to refresh the Access Token (stored into .mercedesme_token)
    -f, --fuel            Retrieve the Fuel Status of your Vehicle
    -l, --lock            Retrieve the Lock Status of your Vehicle
    -s, --status          Retrieve the General Status of your Vehicle
    -e, --electric-status Retrieve the General Electric Status of your Vehicle
    -o, --odometer        Retrieve the Odometer reading of your Vehicle
    -R, --resources       Retrieve the list of available resources of your Vehicle

Change Log

You can find change log under releases

License

MIT © Giorgio Ravera

Donate

BuyMeCoffee


Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].