Skip to content

Commit 8e8bb06

Browse files
authored
[mercedesme] bugfix auth problem causing http 412 error (openhab#18208)
* version update * add catching JSONException Signed-off-by: Bernd Weymann <[email protected]>
1 parent 54bebb3 commit 8e8bb06

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

bundles/org.openhab.binding.mercedesme/src/main/java/org/openhab/binding/mercedesme/internal/Constants.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -322,12 +322,12 @@ public class Constants {
322322
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";
323323
public static final String WEBSOCKET_USER_AGENT_PA = "mycar-store-ap v1.27.0, android 8.0.0, SDK 2.84.3";
324324

325-
public static final String RIS_APPLICATION_VERSION_NA = "3.40.0";
326-
public static final String RIS_APPLICATION_VERSION_CN = "1.39.0";
327-
public static final String RIS_APPLICATION_VERSION_PA = "1.40.0";
328-
public static final String RIS_APPLICATION_VERSION = "1.42.0 (2168)";
329-
public static final String RIS_SDK_VERSION = "2.114.0";
330-
public static final String RIS_SDK_VERSION_CN = "2.109.2";
325+
public static final String RIS_APPLICATION_VERSION_NA = "3.51.0";
326+
public static final String RIS_APPLICATION_VERSION_CN = "1.51.0";
327+
public static final String RIS_APPLICATION_VERSION_PA = "1.51.0";
328+
public static final String RIS_APPLICATION_VERSION = "1.51.0";
329+
public static final String RIS_SDK_VERSION = "2.132.2";
330+
public static final String RIS_SDK_VERSION_CN = "2.132.2";
331331
public static final String RIS_OS_VERSION = "17.4.1";
332332
public static final String RIS_OS_NAME = "ios";
333333
public static final String X_APPLICATIONNAME = "mycar-store-ece";

bundles/org.openhab.binding.mercedesme/src/main/java/org/openhab/binding/mercedesme/internal/handler/AccountHandler.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import org.eclipse.jetty.http.HttpHeader;
3434
import org.eclipse.jetty.websocket.client.ClientUpgradeRequest;
3535
import org.json.JSONArray;
36+
import org.json.JSONException;
3637
import org.json.JSONObject;
3738
import org.openhab.binding.mercedesme.internal.Constants;
3839
import org.openhab.binding.mercedesme.internal.config.AccountConfiguration;
@@ -521,7 +522,7 @@ private Map<String, Object> getCapabilities(String vin) {
521522
// store in cache
522523
capabilitiesMap.put(vin, featureMap);
523524
return featureMap;
524-
} catch (InterruptedException | TimeoutException | ExecutionException e) {
525+
} catch (InterruptedException | TimeoutException | ExecutionException | JSONException e) {
525526
logger.trace("Error retrieving capabilities: {}", e.getMessage());
526527
featureMap.clear();
527528
}

0 commit comments

Comments
 (0)