Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 8 additions & 26 deletions bundles/org.openhab.binding.mercedesme/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,6 @@

This binding provides access to your Mercedes Benz vehicle like _Mercedes Me_ Smartphone App.

## Installation Instructions

First time users shall follow the following sequence

1. Setup and configure [Bridge](#bridge-configuration)
1. [Discovery](#discovery) shall find now vehicles associated to your account
1. Add your vehicle from discovery and [configure](#thing-configuration) it with correct VIN
1. Connect your desired items in UI or [text-configuration](#full-example)
1. Optional: you can [Discover your Vehicle](#discover-your-vehicle) more deeply
1. In case of problems check [Troubleshooting](#troubleshooting) section

## Supported Things

| Type | ID | Description |
Expand All @@ -26,28 +15,21 @@ First time users shall follow the following sequence

The Mercedes Me binding is based on the API of the Smartphone App.
You have an account which is associated to one or more vehicles.
Setup the Mercedes Me Account Bridge with your email address.
Setup the Mercedes Me Account Bridge with your email address and password.
After successful authorization your associated vehicles are found automatically.
There's no manual discovery!

## Bridge Configuration

Bridge needs configuration in order to connect properly to your Mercedes Me account.

| Name | Type | Description | Default | Required |
|-----------------|---------|-------------------------------------------|-------------------------|----------|
| email | text | Mercedes Me registered email Address | N/A | yes |
| refreshToken | text | Refresh Token from MB Token Requester app | takeover previous token | yes |
| pin | text | Mercedes Me Smartphone App PIN | N/A | no |
| region | text | Your region | EU | yes |
| refreshInterval | integer | API refresh interval | 15 | yes |

`refreshToken` is needed to get access to your Mercedes Me account.
Users already running this binding can stay on default value `takeover previous token`.
New users need to generate `refreshToken` with [MB Token Requester app]( https://github.com/ReneNulschDE/mbapi2020/wiki/How%E2%80%90to:-create-the-access-and-refresh-token ).
It simulates the Mercedes Me application _only_ for authorization process on your computer, _not_ your openHAB system!
The generated _refresh token_ has to be pasted into the bridge configuration.
The generated _token_ can be ignored!
| Name | Type | Description | Default | Required |
|-------------------|---------|---------------------------------------------|---------------------------|----------|
| email | text | Email address for MercedesMe account | N/A | yes |
| password | text | Password for MercedesMe account | N/A | yes |
| pin | text | Mercedes Me Smartphone App PIN | N/A | no |
| region | text | Your region | EU | yes |
| refreshInterval | integer | API refresh interval | 15 | yes |

Set `region` to your location

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,13 +272,15 @@ public class Constants {
public static final String IMAGE_BASE_URL = "https://api.mercedes-benz.com/vehicle_images/v2";
public static final String IMAGE_EXTERIOR_RESOURCE_URL = IMAGE_BASE_URL + "/vehicles/%s";

public static final String STATUS_TEXT_PREFIX = "@text/mercedesme.";
public static final String STATUS_AUTH_NEEDED = ".status.authorization-needed";
public static final String STATUS_EMAIL_MISSING = ".status.email-missing";
public static final String STATUS_REGION_MISSING = ".status.region-missing";
public static final String STATUS_REFRESH_INVALID = ".status.refresh-invalid";
public static final String STATUS_REFRESH_TOKEN_MISSING = ".status.refresh-token-missing";
public static final String STATUS_BRIDGE_MISSING = ".status.bridge-missing";
public static final String STATUS_CONFIG_EMAIL_MISSING = "@text/mercedesme.account.status.config.email-missing";
public static final String STATUS_CONFIG_PASSWORD_MISSING = "@text/mercedesme.account.status.config.password-missing";
public static final String STATUS_CONFIG_REGION_MISSING = "@text/mercedesme.account.status.config.region-missing";
public static final String STATUS_CONFIG_REFRESH_LOW = "@text/mercedesme.account.status.config.refresh-invalid";
public static final String STATUS_AUTH_FAILURE = "@text/mercedesme.account.status.auth-failure";
public static final String STATUS_API_FAILURE = "@text/mercedesme.account.status.api-failure";
public static final String STATUS_BIDNING_ERROR = "@text/mercedesme.account.status.binding-error";
public static final String STATUS_WEBSOCKET_FAILURE = "@text/mercedesme.account.status.websocket-failure";
public static final String STATUS_BRIDGE_MISSING = "@text/mercedesme.vehicle.status.bridge-missing";

public static final String SPACE = " ";
public static final String EMPTY = "";
Expand Down Expand Up @@ -315,15 +317,19 @@ public class Constants {
public static final String WEBSOCKET_API_BASE_NA = "wss://websocket.amap-prod.mobilesdk.mercedes-benz.com/v2/ws";
public static final String WEBSOCKET_API_BASE_PA = "wss://websocket.amap-prod.mobilesdk.mercedes-benz.com/v2/ws";
public static final String WEBSOCKET_API_BASE_CN = "wss://websocket.cn-prod.mobilesdk.mercedes-benz.com/v2/ws";
public static final String WIDGET_API_BASE = "https://widget.emea-prod.mobilesdk.mercedes-benz.com";
public static final String WIDGET_API_BASE_NA = "https://widget.amap-prod.mobilesdk.mercedes-benz.com";
public static final String WIDGET_API_BASE_PA = "https://widget.amap-prod.mobilesdk.mercedes-benz.com";
public static final String WIDGET_API_BASE_CN = "https://widget.cn-prod.mobilesdk.mercedes-benz.com";
public static final String WEBSOCKET_USER_AGENT = "MyCar/1.30.1 (com.daimler.ris.mercedesme.ece.ios; build:1819; iOS 16.5.0) Alamofire/5.4.0";
public static final String WEBSOCKET_USER_AGENT_CN = "MyStarCN/1.27.0 (com.daimler.ris.mercedesme.cn.ios; build:1758; iOS 16.3.1) Alamofire/5.4.0";
public static final String WEBSOCKET_USER_AGENT_PA = "mycar-store-ap v1.27.0, android 8.0.0, SDK 2.84.3";

// version updates according to https://github.com/weymann/mbapi2020/commit/ede9ab60c1e18293b9436dab568b9195db6381b9
public static final String RIS_APPLICATION_VERSION_NA = "3.54.0";
public static final String RIS_APPLICATION_VERSION_CN = "1.54.0";
public static final String RIS_APPLICATION_VERSION_PA = "1.54.0";
public static final String RIS_APPLICATION_VERSION = "1.54.0";
public static final String RIS_APPLICATION_VERSION_NA = "3.57.0";
public static final String RIS_APPLICATION_VERSION_CN = "1.57.0";
public static final String RIS_APPLICATION_VERSION_PA = "1.57.0";
public static final String RIS_APPLICATION_VERSION = "1.57.0";
public static final String RIS_SDK_VERSION = "3.55.0";
public static final String RIS_SDK_VERSION_CN = "2.132.2";
public static final String RIS_OS_VERSION = "10";
Expand All @@ -334,16 +340,20 @@ public class Constants {
public static final String X_APPLICATIONNAME_US = "mycar-store-us";
public static final String X_APPLICATIONNAME_AP = "mycar-store-ap";

public static final String AUTH_USER_AGENT = "Mozilla/5.0 (iPhone; CPU iPhone OS 15_8_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.6.6 Mobile/15E148 Safari/604.1";
public static final String AUTH_LANGUAGE = "de-DE,de;q=0.9";
public static final String AUTH_CLIENT_ID = "62778dc4-1de3-44f4-af95-115f06a3a008";
public static final String AUTH_REDIRECT_URI = "rismycar://login-callback";
public static final String AUTH_SCOPE = "email profile ciam-uid phone openid offline_access";

public static final String REGION_EUROPE = "EU";
public static final String REGION_NORAM = "NA";
public static final String REGION_APAC = "AP";
public static final String REGION_CHINA = "CN";

public static final String SCOPE = "openid email phone profile offline_access ciam-uid";

public static final String MAX_SOC_KEY = "maxsoc";
public static final String AUTO_UNLOCK_KEY = "autolock";

public static final String JUNIT_TOKEN = "junitTestToken";
public static final String JUNIT_REFRESH_TOKEN = "junitRefreshToken";
public static final String FEATURE_APPENDIX = "-features";
public static final String COMMAND_APPENDIX = "-commands";
}
Loading