Deprecated Binding - Volkswagen We Connect

VW has closed down the VW We Connect portal the 27/4, therefor this binding is no longer working.
Thanks for all support in testing and nice comments! :slight_smile:

I’ve implemented a binding for the VW We Connect portal.

The binding is based on the excellent work made by Robin Ostlund but all API calls have been ported from Python to Java. The binding is using the Web API on https://www.portal.volkswagen-we.com to send request and receive responses, that API is different compared to the App API.

NOTE: Your car needs to have an installed eSIM for mobile communication and you need to subscribe to VW We Connect online services.
NOTE: We Connect Go is not supported!

The binding is based on the volvooncall binding so big thanks to Gaël L’hopital and it has also design concepts from the Verisure binding that I have implemented.

Since I own a VW Tiguan running on petrol I have not been able to test any functionality offered for hybrid/electrical cars, however thanks to @Chris_Thomsen and @thokroll I’ve managed to improve support for hybrid/electrical cars as well.

If you run into problems, please enable DEBUG logging for the binding, login to Karaf console and enter:

openhab> log:set DEBUG org.openhab.binding.vwweconnect

The built jar-file is based on 2.5.x branch and should be placed in the /usr/share/openhab2/addons folder.

[23:21:25] openhabian@openhab:/usr/share/openhab2/addons$ md5sum /usr/share/openhab2/addons/org.openhab.binding.vwweconnect-2.5.9.jar 
23dd80aad624cc1c8fc414d27faab2c2  /usr/share/openhab2/addons/org.openhab.binding.vwweconnect-2.5.9.jar

I’ve also built a jar file for the upcoming 3.1.0 version.

$ md5 target/org.openhab.binding.vwweconnect-3.1.0-SNAPSHOT.jar 
MD5 (target/org.openhab.binding.vwweconnect-3.1.0-SNAPSHOT.jar) = 50e2dc7e784f37d18e49ef89e2ce4a84

Please read the README and especially the disclaimer.

I’ve not been able to find the API endpoints for honking and blinking that exists for the App API.

Known issues:

  • The binding sometimes fails to reconnect to the API, the only thing that seems to solve it is to restart the binding or openHAB.
  • I’ve not found any API call for the WEB API to honk or blink
  • There seems to be no endpoint for lock/unlock of just the trunk, only lock/unlock for all door types

I’ve found out that the VW API is kind of fussy, too many attempts to lock/unlock will force you to switch on/off the egnition to be able to send more requests. I’ve added a Debug logging with text ‘Too many requests’ to catch this, also check with the VW We connect App, e.g. if it doesn’t work turning the heater on with the app, it wont work with the binding either.

I strongly recommend that you configure your OH to create separate log files for all the bindings that you are especially interested of, e.g. vwweconnect :slight_smile:

This documentation is really good.
Just c&p this to correct places in the file /var/lib/openhab2/etc/org.ops4j.pax.logging.cfg:

### Custom Loggers ###
# Logger - vwweconnect.log
log4j2.logger.vwweconnect.name = org.openhab.binding.vwweconnect
log4j2.logger.vwweconnect.level = DEBUG
log4j2.logger.vwweconnect.additivity = false
log4j2.logger.vwweconnect.appenderRefs = vwweconnect
log4j2.logger.vwweconnect.appenderRef.vwweconnect.ref = VWWECONNECT

# Audit file appender
log4j2.appender.vwweconnect.type = RollingRandomAccessFile
log4j2.appender.vwweconnect.name = VWWECONNECT
log4j2.appender.vwweconnect.fileName = /var/log/openhab2/vwweconnect.log
log4j2.appender.vwweconnect.filePattern = /var/log/openhab2/vwweconnect.log.%i
log4j2.appender.vwweconnect.append = true
log4j2.appender.vwweconnect.layout.type = PatternLayout
log4j2.appender.vwweconnect.layout.pattern = %d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n
log4j2.appender.vwweconnect.policies.type = Policies
log4j2.appender.vwweconnect.policies.size.type = SizeBasedTriggeringPolicy
log4j2.appender.vwweconnect.policies.size.size = 10MB
log4j2.appender.vwweconnect.strategy.type = DefaultRolloverStrategy
log4j2.appender.vwweconnect.strategy.max = 10

16 Likes

Hi there and thx for this binding so far.

I’ve downloaded and installed the binding and run into this problem:

2020-02-04 12:52:28.551 [DEBUG] [nal.handler.VWWeConnectBridgeHandler] - VerisureBridgeHandler - scheduleImmediateRefresh

2020-02-04 12:52:28.555 [DEBUG] [nal.handler.VWWeConnectBridgeHandler] - Initializing Verisure Binding

2020-02-04 12:52:28.565 [ERROR] [st.core.internal.thing.ThingResource] - Exception during HTTP PUT request for update config at 'things/vwweconnect:vwweconnectapi:1ee8007d/config'

java.lang.NullPointerException: null

	at org.openhab.binding.vwweconnect.internal.handler.VWWeConnectBridgeHandler.initialize(VWWeConnectBridgeHandler.java:115) ~[?:?]

	at org.openhab.binding.vwweconnect.internal.handler.VWWeConnectBridgeHandler.updateConfiguration(VWWeConnectBridgeHandler.java:65) ~[?:?]

	at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.handleConfigurationUpdate(BaseThingHandler.java:105) ~[?:?]

	at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.updateConfiguration(ThingRegistryImpl.java:93) ~[?:?]

	at org.eclipse.smarthome.io.rest.core.internal.thing.ThingResource.updateConfiguration(ThingResource.java:438) [bundleFile:?]

	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_222]

	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_222]

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_222]

	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_222]

	at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [bundleFile:?]

	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [bundleFile:?]

	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [bundleFile:?]

	at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [bundleFile:?]

	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [bundleFile:?]

	at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [bundleFile:?]

	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [bundleFile:?]

	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [bundleFile:?]

	at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [bundleFile:?]

	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [bundleFile:?]

	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [bundleFile:?]

	at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [bundleFile:?]

	at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [bundleFile:?]

	at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [bundleFile:?]

	at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [bundleFile:?]

	at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [bundleFile:?]

	at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [bundleFile:?]

	at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473) [bundleFile:?]

	at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427) [bundleFile:?]

	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388) [bundleFile:?]

	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341) [bundleFile:?]

	at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228) [bundleFile:?]

	at com.eclipsesource.jaxrs.publisher.internal.ServletContainerBridge.service(ServletContainerBridge.java:76) [bundleFile:?]

	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:852) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:544) [bundleFile:9.4.20.v20190813]

	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) [bundleFile:?]

	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:536) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1581) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1307) [bundleFile:9.4.20.v20190813]

	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293) [bundleFile:?]

	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:482) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1549) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1204) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [bundleFile:9.4.20.v20190813]

	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) [bundleFile:?]

	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.Server.handle(Server.java:494) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:374) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:268) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:367) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:782) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:918) [bundleFile:9.4.20.v20190813]

	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]

any ideas whats going on or whats wrong?

Credentials: checked
S-Pin: checked

I will check tonight, are you using a things-file for the bridge or do you create the bridge in PaperUi?

I created it in PaperUI

after a restart of openhab i got this:

2020-02-04 13:26:13.896 [hingStatusInfoChangedEvent] - 'vwweconnect:vwweconnectapi:1ee8007d' changed from INITIALIZING to OFFLINE (COMMUNICATION_ERROR)

==> /var/log/openhab2/openhab.log <==

2020-02-04 13:26:13.900 [DEBUG] [nal.handler.VWWeConnectBridgeHandler] - VerisureBridgeHandler Handle command REFRESH on channelUID: vwweconnect:vwweconnectapi:1ee8007d:status

2020-02-04 13:26:13.903 [DEBUG] [nal.handler.VWWeConnectBridgeHandler] - Refresh command on status channel vwweconnect:vwweconnectapi:1ee8007d:status will trigger instant refresh

2020-02-04 13:26:13.906 [DEBUG] [nal.handler.VWWeConnectBridgeHandler] - VerisureBridgeHandler - scheduleImmediateRefresh

2020-02-04 13:26:13.910 [DEBUG] [nal.handler.VWWeConnectBridgeHandler] - Current remaining delay 599 for refresh job java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@d73c03

2020-02-04 13:26:13.916 [WARN ] [nal.handler.VWWeConnectBridgeHandler] - VWWeConnectBridgeHandler - Refresh thread is up'n running!

2020-02-04 13:26:13.918 [DEBUG] [econnect.internal.VWWeConnectSession] - VWWeConnectSession:refresh

2020-02-04 13:26:13.921 [DEBUG] [econnect.internal.VWWeConnectSession] - areWeLoggedIn() - Checking if we are logged in

2020-02-04 13:26:13.925 [DEBUG] [econnect.internal.VWWeConnectSession] - Check for login status, url: https://www.portal.volkswagen-we.com/portal/delegate/dashboard/WVG**************19/-/msgc/get-new-messages

2020-02-04 13:26:13.928 [DEBUG] [nal.handler.VWWeConnectBridgeHandler] - Scheduling new immediate refresh job java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@11e7946

2020-02-04 13:26:15.933 [DEBUG] [econnect.internal.VWWeConnectSession] - postJSONVWWeConnectAPI URL: https://www.portal.volkswagen-we.com/portal/delegate/dashboard/WVG**************19/-/msgc/get-new-messages Fields: null Referer: https://www.portal.volkswagen-we.com/portal/delegate/dashboard/WVG**************19 XCSRF:DTQGppSx

2020-02-04 13:26:15.938 [DEBUG] [econnect.internal.VWWeConnectSession] - HTTP POST Request HttpRequest[POST /portal/delegate/dashboard/WVG**************19/-/msgc/get-new-messages HTTP/1.1]@9b2a6b.

2020-02-04 13:26:15.968 [DEBUG] [econnect.internal.VWWeConnectSession] - ErrorCode: 0

2020-02-04 13:26:15.971 [DEBUG] [econnect.internal.VWWeConnectSession] - VWWeConnectSession:updateStatus

2020-02-04 13:26:17.973 [DEBUG] [econnect.internal.VWWeConnectSession] - postJSONVWWeConnectAPI URL: https://www.portal.volkswagen-we.com/portal/delegate/dashboard/WVG**************19/-/mainnavigation/get-fully-loaded-cars Fields: null Referer: https://www.portal.volkswagen-we.com/portal/delegate/dashboard/WVG**************19 XCSRF:DTQGppSx

2020-02-04 13:26:17.977 [DEBUG] [econnect.internal.VWWeConnectSession] - HTTP POST Request HttpRequest[POST /portal/delegate/dashboard/WVG**************19/-/mainnavigation/get-fully-loaded-cars HTTP/1.1]@1501a93.

2020-02-04 13:26:18.421 [DEBUG] [econnect.internal.VWWeConnectSession] - ErrorCode: 0

2020-02-04 13:26:20.429 [INFO ] [io.openhabcloud.internal.CloudClient] - Connected to the openHAB Cloud service (UUID = d3cd4113-5979-4a9b-b8e7-56ce1d17b40a, base URL = http://localhost:8080)

2020-02-04 13:26:25.427 [DEBUG] [econnect.internal.VWWeConnectSession] - postJSONVWWeConnectAPI URL: https://www.portal.volkswagen-we.com/portal/delegate/dashboard/WVG**************19/-/mainnavigation/get-fully-loaded-cars Fields: null Referer: https://www.portal.volkswagen-we.com/portal/delegate/dashboard/WVG**************19 XCSRF:DTQGppSx

2020-02-04 13:26:25.430 [DEBUG] [econnect.internal.VWWeConnectSession] - HTTP POST Request HttpRequest[POST /portal/delegate/dashboard/WVG**************19/-/mainnavigation/get-fully-loaded-cars HTTP/1.1]@b65216.

2020-02-04 13:26:26.342 [DEBUG] [econnect.internal.VWWeConnectSession] - ErrorCode: 0

2020-02-04 13:26:28.348 [DEBUG] [econnect.internal.VWWeConnectSession] - postJSONVWWeConnectAPI URL: https://www.portal.volkswagen-we.com//portal/delegate/dashboard/WV**************19/-/vsr/get-request-status Fields: null Referer: https://www.portal.volkswagen-we.com/portal/delegate/dashboard/WVG**************19 XCSRF:DTQGppSx

2020-02-04 13:26:28.352 [DEBUG] [econnect.internal.VWWeConnectSession] - HTTP POST Request HttpRequest[POST //portal/delegate/dashboard/WVG**************19/-/vsr/get-request-status HTTP/1.1]@871a27.

2020-02-04 13:26:28.386 [DEBUG] [econnect.internal.VWWeConnectSession] - Request status: {"errorCode":"2"}

2020-02-04 13:26:28.388 [DEBUG] [econnect.internal.VWWeConnectSession] - ErrorCode: 2

2020-02-04 13:26:28.391 [WARN ] [econnect.internal.VWWeConnectSession] - Get request status, Error code: {"errorCode":"2"}

2020-02-04 13:26:30.394 [DEBUG] [econnect.internal.VWWeConnectSession] - postJSONVWWeConnectAPI URL: https://www.portal.volkswagen-we.com//portal/delegate/dashboard/WVG**************19/-/vsr/request-vsr Fields: null Referer: https://www.portal.volkswagen-we.com/portal/delegate/dashboard/WVG**************19 XCSRF:DTQGppSx

2020-02-04 13:26:30.398 [DEBUG] [econnect.internal.VWWeConnectSession] - HTTP POST Request HttpRequest[POST //portal/delegate/dashboard/WVG**************19/-/vsr/request-vsr HTTP/1.1]@176ab6e.

2020-02-04 13:26:31.341 [DEBUG] [econnect.internal.VWWeConnectSession] - ErrorCode: 0

2020-02-04 13:26:33.343 [DEBUG] [econnect.internal.VWWeConnectSession] - postJSONVWWeConnectAPI URL: https://www.portal.volkswagen-we.com//portal/delegate/dashboard/WVG**************19/-/vsr/get-vsr Fields: null Referer: https://www.portal.volkswagen-we.com/portal/delegate/dashboard/WVG**************19 XCSRF:DTQGppSx

2020-02-04 13:26:33.345 [DEBUG] [econnect.internal.VWWeConnectSession] - HTTP POST Request HttpRequest[POST //portal/delegate/dashboard/WVG**************19/-/vsr/get-vsr HTTP/1.1]@47a111.

2020-02-04 13:26:33.775 [DEBUG] [nal.handler.VWWeConnectBridgeHandler] - Exception occurred during execution: java.lang.NumberFormatException: For input string: "> 2400"

com.google.gson.JsonSyntaxException: java.lang.NumberFormatException: For input string: "> 2400"

	at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:227) ~[?:?]

	at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:217) ~[?:?]

	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:129) ~[?:?]

	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:220) ~[?:?]

	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:129) ~[?:?]

	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:220) ~[?:?]

	at com.google.gson.Gson.fromJson(Gson.java:888) ~[?:?]

	at com.google.gson.Gson.fromJson(Gson.java:853) ~[?:?]

	at com.google.gson.Gson.fromJson(Gson.java:802) ~[?:?]

	at com.google.gson.Gson.fromJson(Gson.java:774) ~[?:?]

	at org.openhab.binding.vwweconnect.internal.VWWeConnectSession.updateVehicleStatus(VWWeConnectSession.java:747) ~[?:?]

	at org.openhab.binding.vwweconnect.internal.VWWeConnectSession.updateStatus(VWWeConnectSession.java:629) ~[?:?]

	at org.openhab.binding.vwweconnect.internal.VWWeConnectSession.refresh(VWWeConnectSession.java:107) ~[?:?]

	at org.openhab.binding.vwweconnect.internal.handler.VWWeConnectBridgeHandler.refreshAndUpdateStatus(VWWeConnectBridgeHandler.java:171) ~[?:?]

	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_222]

	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_222]

	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_222]

	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_222]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]

	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]

Caused by: java.lang.NumberFormatException: For input string: "> 2400"

	at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043) ~[?:1.8.0_222]

	at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110) ~[?:1.8.0_222]

	at java.lang.Double.parseDouble(Double.java:538) ~[?:1.8.0_222]

	at com.google.gson.stream.JsonReader.nextInt(JsonReader.java:1201) ~[?:?]

	at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:225) ~[?:?]

	... 20 more

OK, restart of OH resolved first issue, now you get a NumberFormatException when doing the JSON conversion using gson for the get-vsr API request, unfortunately the complete JSON is then not logged.

If you have the time, you could use your web-browser’s developer tools to find out how the JSON looks for your vehicle using the get-vsr API request. If you use Chrome, just right-click and select Inspect and then log into https://www.portal.volkswagen-we.com/ and select the Network tab to be able to see all API request&responses. Then in the web GUI chose the Car-Net-Services tab:
image

and look for API request that contains get-vsr in the Inspect window:

Then please send me the Response JSON in a PM! I guess that some item in that JSON has a value > 2400 that for some reason break the gson conversion.

If you do not have time to do that, I will post a new version of the binding that logs the reponse JSON.

And thanks for testing! :slight_smile:

Somehow, without do anything

The initializing on the car itself is now issue. I’ll wait till tomorrow to see what happens and check log

Car added manually. Nothing discovered

I’ve now built a new jar-file with more debug printouts, I will need the JSON response for the get-vsr request which now shall be present in the log using log level DEBUG.

It would be great if you could test new version of the jar-file, link is updated in the original post. I’m really eager to find out what is causing the gson parsing exception. :slight_smile:

NOTE: If setting log level to TRACE the log will contain all JSON responses.

I guess I have to uninstall the old binding before installing the new one.

I’ll get back with news hope before I go to work

Yes, you can follow my instructions in the original post for stopping/uninstalling the old version and installing the new version using the karaf console.

Once again, thanks for testing! :slight_smile:

P.s. If you don not want to post JSON in this thread, you can send them to me in a PM! D.s.

Dear @jannegpriv Thanks for the amazing work

I also have the problem of initializing the car.
I installed the binding yesterday. The VW We connect portal has come online without problems.

i would give you the json …if i find it


You have to click on the Car-Net-Services to get the web page to request get-vsr:

thats what i’ve done

Then you should be able to find it, you can click on Name to sort the requests:

If the API is the same in Germany.

i saw the first image from your inspect and saw that the link is not the same. by mine is the VIN the last element in the link, by your you have the

-/service-container/services/all

after the VIN

I clicked away from Car-Net and than back on and got now same after the VIN, but the inspect now shows this

no sign of JSON

Thanks for testing! :slight_smile:

To be able to know why the intialization goes wrong, I need to get hold of your DEBUG logs.
Set log level to DEBUG as instructed in the original post and then send me a PM with the logs.
Make sure to mask out private data.

The web page posts the get-new-messages API call as a kind of keep-alive procedure, but if you capture the whole login procedure you should be able to see many different types of requests sent to the webserver.

What I have seen, the get-vsr request is only sent when clicking on the Car-Net-services.


==> /var/log/openhab2/openhab.log <==

2020-02-04 20:36:25.829 [DEBUG] [econnect.internal.VWWeConnectSession] - postJSONVWWeConnectAPI URL: https://www.portal.volkswagen-we.com//portal/delegate/dashboard/WVGXXXXXXXXXXX719/-/vsr/get-vsr Fields: null Referer: https://www.portal.volkswagen-we.com/portal/delegate/dashboard/WVGXXXXXXXXXXX719 XCSRF:ecpoXetl

2020-02-04 20:36:25.833 [DEBUG] [econnect.internal.VWWeConnectSession] - HTTP POST Request HttpRequest[POST //portal/delegate/dashboard/WVGXXXXXXXXXXX719/-/vsr/get-vsr HTTP/1.1]@125b128.

2020-02-04 20:36:25.862 [DEBUG] [econnect.internal.VWWeConnectSession] - {"errorCode":"0","vehicleStatusData":{"windowStatusSupported":true,"carRenderData":{"parkingLights":2,"hood":3,"doors":{"left_front":3,"right_front":3,"left_back":3,"right_back":3,"trunk":3,"number_of_doors":4},"windows":{"left_front":3,"right_front":3,"left_back":3,"right_back":3},"sunroof":0,"roof":0},"lockData":{"left_front":2,"right_front":2,"left_back":2,"right_back":2,"trunk":2},"headerData":null,"requestStatus":null,"lockDisabled":false,"unlockDisabled":false,"rluDisabled":true,"hideCngFuelLevel":false,"adBlueEnabled":true,"adBlueLevel":"> 2400","showAdBlueNotification":false,"rluMibDeactivated":false,"totalRange":400,"primaryEngineRange":400,"fuelRange":400,"cngRange":null,"batteryRange":null,"fuelLevel":56,"cngFuelLevel":null,"batteryLevel":null,"sliceRootPath":"https://images.portal.volkswagen-we.com/slices/tiguan_nf/tiguan_nf"}}

2020-02-04 20:36:25.866 [WARN ] [econnect.internal.VWWeConnectSession] - Exception caught java.lang.NumberFormatException: For input string: "> 2400" while parsing JSON response {"errorCode":"0","vehicleStatusData":{"windowStatusSupported":true,"carRenderData":{"parkingLights":2,"hood":3,"doors":{"left_front":3,"right_front":3,"left_back":3,"right_back":3,"trunk":3,"number_of_doors":4},"windows":{"left_front":3,"right_front":3,"left_back":3,"right_back":3},"sunroof":0,"roof":0},"lockData":{"left_front":2,"right_front":2,"left_back":2,"right_back":2,"trunk":2},"headerData":null,"requestStatus":null,"lockDisabled":false,"unlockDisabled":false,"rluDisabled":true,"hideCngFuelLevel":false,"adBlueEnabled":true,"adBlueLevel":"> 2400","showAdBlueNotification":false,"rluMibDeactivated":false,"totalRange":400,"primaryEngineRange":400,"fuelRange":400,"cngRange":null,"batteryRange":null,"fuelLevel":56,"cngFuelLevel":null,"batteryLevel":null,"sliceRootPath":"https://images.portal.volkswagen-we.com/slices/tiguan_nf/tiguan_nf"}} for request https://www.portal.volkswagen-we.com//portal/delegate/dashboard/WVGXXXXXXXXXXX719/-/vsr/get-vsr

2020-02-04 20:36:25.869 [DEBUG] [econnect.internal.VWWeConnectSession] - postJSONVWWeConnectAPI URL: https://www.portal.volkswagen-we.com//portal/delegate/dashboard/WVGXXXXXXXXXXX719/-/mainnavigation/load-car-details/WVGXXXXXXXXXXX719 Fields: null

2020-02-04 20:36:25.874 [DEBUG] [econnect.internal.VWWeConnectSession] - HTTP POST Request HttpRequest[POST //portal/delegate/dashboard/WVGXXXXXXXXXXX719/-/mainnavigation/load-car-details/WVGXXXXXXXXXXX719 HTTP/1.1]@13ee4af.

2020-02-04 20:36:25.907 [DEBUG] [econnect.internal.VWWeConnectSession] - ErrorCode: 0

2020-02-04 20:36:25.916 [DEBUG] [econnect.internal.VWWeConnectSession] - API Response (org.openhab.binding.vwweconnect.internal.model.Vehicle@105bc3c[errorCode=0,completeVehicleJson=org.openhab.binding.vwweconnect.internal.model.Vehicle$CompleteVehicleJson@3b44e5[vin=WVGXXXXXXXXXXX719,name=Tiguan ALLSPACE,expired=false,model=Tiguan,modelCode=BW246T,modelYear=2018,imageUrl=https://media.volkswagen.com/Vilma/V/BW2/2018/Front_Right/8dfb11bdaa30deb462339bd7ff761f1745bc9b777de0936ed6dcc4fe802061e2.png,vehicleSpecificFallbackImageUrl=<null>,modelSpecificFallbackImageUrl=<null>,defaultImageUrl=/portal/delegate/vehicle-image/WVGXXXXXXXXXXX719,vehicleBrand=v,enrollmentDate=20171109,deviceOCU1=false,deviceOCU2=true,deviceMIB=true,engineTypeCombustian=true,engineTypeHybridOCU1=false,engineTypeHybridOCU2=false,engineTypeElectric=false,engineTypeCNG=false,engineTypeDefault=false,stpStatus=DISABLED,windowstateSupported=true,dashboardUrl=/portal/delegate/dashboard/WVGXXXXXXXXXXX719,vhrRequested=false,vsrRequested=false,vhrConfigAvailable=true,verifiedByDealer=false,vhr2=false,roleEnabled=true,isEL2Vehicle=false,workshopMode=false,hiddenUserProfiles=false,mobileKeyActivated=<null>,enrollmentType=PIN,ocu3Low=false,packageServices=[org.openhab.binding.vwweconnect.internal.model.Vehicle$PackageService@3097b[packageServiceId=NET.500.013.L,propertyKeyReference=NET.500.013,packageServiceName=Notruf-Service,trackingName=Notruf-Service,activationDate=09.11.2017,expirationDate=09.11.2027,expired=false,expireInAMonth=false,packageType=ss,enrollmentPackageType=ec], org.openhab.binding.vwweconnect.internal.model.Vehicle$PackageService@3e8c88[packageServiceId=NET.500.011.L,propertyKeyReference=NET.500.011,packageServiceName=Security & Service Basic,trackingName=Security & Service Basic,activationDate=09.11.2017,expirationDate=09.11.2027,expired=false,expireInAMonth=false,packageType=ss,enrollmentPackageType=ss], org.openhab.binding.vwweconnect.internal.model.Vehicle$PackageService@fc32ef[packageServiceId=NET.500.002.C,propertyKeyReference=NET.500.002,packageServiceName=Guide & Inform Basic,trackingName=Guide & Inform Basic,activationDate=09.11.2017,expirationDate=09.11.2020,expired=false,expireInAMonth=false,packageType=gi,enrollmentPackageType=gi], org.openhab.binding.vwweconnect.internal.model.Vehicle$PackageService@b840b9[packageServiceId=NET.500.012.C,propertyKeyReference=NET.500.012,packageServiceName=Security & Service Plus,trackingName=Security & Service Plus,activationDate=09.11.2017,expirationDate=09.11.2020,expired=false,expireInAMonth=false,packageType=ss,enrollmentPackageType=ss]],fullyEnrolled=true,secondaryUser=false,fleet=false,touareg=false,iceSupported=true,flightMode=false,esimCompatible=false,dkyenabled=false,smartCardKeyActivated=<null>,selected=true,defaultCar=true,vwConnectPowerLayerAvailable=false]])

2020-02-04 20:36:25.919 [DEBUG] [econnect.internal.VWWeConnectSession] - postJSONVWWeConnectAPI URL: https://www.portal.volkswagen-we.com//portal/delegate/dashboard/WVGXXXXXXXXXXX719/-/vehicle-info/get-vehicle-details Fields: null

2020-02-04 20:36:25.922 [DEBUG] [econnect.internal.VWWeConnectSession] - HTTP POST Request HttpRequest[POST //portal/delegate/dashboard/WVGXXXXXXXXXXX719/-/vehicle-info/get-vehicle-details HTTP/1.1]@fed0c4.

2020-02-04 20:36:25.948 [DEBUG] [econnect.internal.VWWeConnectSession] - ErrorCode: 0

2020-02-04 20:36:25.950 [DEBUG] [econnect.internal.VWWeConnectSession] - API Response (org.openhab.binding.vwweconnect.internal.model.Details@604e9f[vehicleDetails=org.openhab.binding.vwweconnect.internal.model.Details$VehicleDetails@1fc7fb6[lastConnectionTimeStamp=[04.02.2020, 15:09],distanceCovered=49.975,range=400,serviceInspectionData=282 Tag(e) / 26.700 km,oilInspectionData=647 Tag(e) / 26.700 km,showOil=true,showService=true,flightMode=false],errorCode=0])

2020-02-04 20:36:25.952 [DEBUG] [econnect.internal.VWWeConnectSession] - postJSONVWWeConnectAPI URL: https://www.portal.volkswagen-we.com//portal/delegate/dashboard/WVGXXXXXXXXXXX719/-/rts/get-latest-trip-statistics Fields: null

2020-02-04 20:36:25.954 [DEBUG] [econnect.internal.VWWeConnectSession] - HTTP POST Request HttpRequest[POST //portal/delegate/dashboard/WVGXXXXXXXXXXX719/-/rts/get-latest-trip-statistics HTTP/1.1]@1cd44f8.

2020-02-04 20:36:26.579 [DEBUG] [econnect.internal.VWWeConnectSession] - ErrorCode: 0

2020-02-04 20:36:26.584 [DEBUG] [econnect.internal.VWWeConnectSession] - postJSONVWWeConnectAPI URL: https://www.portal.volkswagen-we.com//portal/delegate/dashboard/WVGXXXXXXXXXXX719/-/cf/get-location Fields: null

2020-02-04 20:36:26.587 [DEBUG] [econnect.internal.VWWeConnectSession] - HTTP POST Request HttpRequest[POST //portal/delegate/dashboard/WVGXXXXXXXXXXX719/-/cf/get-location HTTP/1.1]@103d335.

2020-02-04 20:36:26.792 [DEBUG] [econnect.internal.VWWeConnectSession] - ErrorCode: 0

2020-02-04 20:36:26.798 [DEBUG] [econnect.internal.VWWeConnectSession] - API Response (org.openhab.binding.vwweconnect.internal.model.Location@191783c[errorCode=0,position=org.openhab.binding.vwweconnect.internal.model.Location$Position@100afb7[lat=49.688347,lng=6.98048]])

2020-02-04 20:36:26.802 [DEBUG] [econnect.internal.VWWeConnectSession] - postJSONVWWeConnectAPI URL: https://www.portal.volkswagen-we.com//portal/delegate/dashboard/WVGXXXXXXXXXXX719/-/vsr/get-vsr Fields: null

2020-02-04 20:36:26.806 [DEBUG] [econnect.internal.VWWeConnectSession] - HTTP POST Request HttpRequest[POST //portal/delegate/dashboard/WVGXXXXXXXXXXX719/-/vsr/get-vsr HTTP/1.1]@7fca2b.

2020-02-04 20:36:26.837 [DEBUG] [econnect.internal.VWWeConnectSession] - ErrorCode: 0

2020-02-04 20:36:26.841 [WARN ] [econnect.internal.VWWeConnectSession] - Exception caught java.lang.NumberFormatException: For input string: "> 2400" while parsing JSON response {"errorCode":"0","vehicleStatusData":{"windowStatusSupported":true,"carRenderData":{"parkingLights":2,"hood":3,"doors":{"left_front":3,"right_front":3,"left_back":3,"right_back":3,"trunk":3,"number_of_doors":4},"windows":{"left_front":3,"right_front":3,"left_back":3,"right_back":3},"sunroof":0,"roof":0},"lockData":{"left_front":2,"right_front":2,"left_back":2,"right_back":2,"trunk":2},"headerData":null,"requestStatus":null,"lockDisabled":false,"unlockDisabled":false,"rluDisabled":true,"hideCngFuelLevel":false,"adBlueEnabled":true,"adBlueLevel":"> 2400","showAdBlueNotification":false,"rluMibDeactivated":false,"totalRange":400,"primaryEngineRange":400,"fuelRange":400,"cngRange":null,"batteryRange":null,"fuelLevel":56,"cngFuelLevel":null,"batteryLevel":null,"sliceRootPath":"https://images.portal.volkswagen-we.com/slices/tiguan_nf/tiguan_nf"}} for request https://www.portal.volkswagen-we.com//portal/delegate/dashboard/WVGXXXXXXXXXXX719/-/vsr/get-vsr

2020-02-04 20:36:26.844 [DEBUG] [econnect.internal.VWWeConnectSession] - API Response (null)

2020-02-04 20:36:26.848 [DEBUG] [econnect.internal.VWWeConnectSession] - postJSONVWWeConnectAPI URL: https://www.portal.volkswagen-we.com//portal/delegate/dashboard/WVGXXXXXXXXXXX719/-/rah/get-status Fields: null

2020-02-04 20:36:26.852 [DEBUG] [econnect.internal.VWWeConnectSession] - HTTP POST Request HttpRequest[POST //portal/delegate/dashboard/WVGXXXXXXXXXXX719/-/rah/get-status HTTP/1.1]@1b2322a.

2020-02-04 20:36:26.982 [DEBUG] [econnect.internal.VWWeConnectSession] - ErrorCode: 2

2020-02-04 20:36:26.986 [WARN ] [econnect.internal.VWWeConnectSession] - Error code on POST: {"errorCode":"2","timerCount":3}

2020-02-04 20:36:26.989 [DEBUG] [econnect.internal.VWWeConnectSession] - API Response (null)

2020-02-04 20:36:26.993 [WARN ] [econnect.internal.VWWeConnectSession] - Failed to update vehicle details for VIN: WVGXXXXXXXXXXX719

2020-02-04 20:36:27.003 [WARN ] [nal.handler.VWWeConnectBridgeHandler] - Refresh success!

log after restart.

Bridge online

Super! :slight_smile:

"adBlueLevel":"> 2400",

That is something I don’t get in my JSON response. Is that fluid level for window wipers?