Failed to retrieve refresh token

Dear all

Still the same issue as discribed in below topic (was closed without solution) even after updating to latest stable openhab release (3.4):
https://community.openhab.org/t/tesla-items-not-updated-after-some-time/138374/31

see log entries below:

20:49:27.675 [DEBUG] [.internal.handler.TeslaVehicleHandler] - The access token has expired, trying to get a new one.
20:49:27.680 [DEBUG] [.internal.handler.TeslaAccountHandler] - Current authentication time 2023-01-01 20:49:27
20:49:27.685 [DEBUG] [.internal.handler.TeslaAccountHandler] - Found a request token from 2023-01-01 12:49:08
20:49:27.689 [DEBUG] [.internal.handler.TeslaAccountHandler] - Access token expiration time 2023-01-01 20:49:08
20:49:27.694 [DEBUG] [.internal.handler.TeslaAccountHandler] - The access token has expired
20:49:27.698 [DEBUG] [esla.internal.handler.TeslaSSOHandler] - Exchanging SSO refresh token for API access token
20:49:27.748 [DEBUG] [esla.internal.handler.TeslaSSOHandler] - An exception occurred while invoking a HTTP request: 'java.io.EOFException: HttpConnectionOverHTTP@10a7249::DecryptedEndPoint@ed14bd{l=/192.xxx.xxx.xx:53442,r=auth.tesla.com/104.77.40.47:443,OPEN,fill=-,flush=-,to=28819595/0}'
20:49:27.752 [DEBUG] [esla.internal.handler.TeslaSSOHandler] - An error occurred during refresh of SSO token: no response
20:49:27.757 [DEBUG] [.internal.handler.TeslaVehicleHandler] - An error occurred while querying the vehicle

Only when I manually disable Tesla thing and enable it again, refresh token will be successfully generated, but gives the same error after expiry period of 8 hours again (see above):

10:38:00.872 [DEBUG] [.internal.handler.TeslaAccountHandler] - Setting up an authenticated connection to the Tesla back-end
10:38:00.893 [DEBUG] [.internal.handler.TeslaAccountHandler] - Current authentication time 2023-01-02 10:38:00
10:38:00.900 [DEBUG] [esla.internal.handler.TeslaSSOHandler] - Exchanging SSO refresh token for API access token
10:38:01.444 [DEBUG] [esla.internal.handler.TeslaSSOHandler] - Access token expires in 28800 seconds at 2023-01-02 18:38:01
10:38:02.276 [DEBUG] [.internal.handler.TeslaAccountHandler] - Querying the vehicle: Response: 200: OK

There were also other topics in a similar direction like the one I just described, but I haven’t found a solution anywhere.

Has anybody a hint how to resolve this?

Are you able to get an access token after 7 hours by manually restarting the binding? While it is working, before the token would expire after 8 hours (like after 7 hours maybe) go into karaf and type:

bundle:restart org.openhab.binding.tesla

That would help rule out any logic bugs in the refresh code and point more towards the Tesla WAF. If you restart the binding after 7 hours and 58 minutes and suddenly it works, then that would point to an issue with the binding.

In the above example you got the binding to work again at some point after the initial 8 hour timeout. It’s not clear if it is 14 hours later or longer, because the date is not shown.

Dear Bill

I have just restarted the bundle after initial timeout of 8h and it was able to retrieve the refresh token. I will try to restart the bundle in the next few hours, i.e. within the 8h time frame. Let’s see if also in this case a refresh token can be retrieved. I will revert to you soon…

Thanks a lot for this first hint

just of curiosity i restarted the bundle now again (i.e. shortly after start of 8h expiration period). And again the bundle could succesfully retrieve a refresh token with a new expiration time stamp. So I clearly assume that it will work also shortly before expiration e.g. at 7h 58min. Therefore I assume that ther is a bug in the binding code

One question: As a work around, how could I automate the karaf command in a rule, that restarts the bundle e.g. every 7h 58 min?

We are trying to figure out if the problem is in the binding or on the Tesla side. You might want to let the binding run the full 7 hours or so. By restarting it so soon you may not have triggered any API limits in their WAF or gateway. It could be that the frequency of polling is high enough that after 7 hours they mark your IP as suspect or limited. Or maybe your external IP is changing and they don’t like that.

ok understood. I will restart the binding after 7h or so…

Dear Bill

Ok, after a little bit less than 8h I restarted the bundle again, and received an error, i.e. no refresh token generated. When restarting it a second time the refresh token was generated successfully, see log file with commands below. Do you have an idea?

Thank in advance for the help

openhab> bundle:restart org.openhab.binding.tesla
openhab> log:tail
15:13:05.501 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(441)] : Changed state from unsatisfiedReference to satisfied
15:13:05.507 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(441)] : registration change queue [registered]
15:13:05.517 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(441)] : Checking constructor public org.openhab.binding.tesla.internal.TeslaHandlerFactory(javax.ws.rs.client.ClientBuilder,org.openhab.core.io.net.http.HttpClientFactory,org.openhab.core.io.net.http.WebSocketFactory)
15:13:05.524 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(441)] : getReferenceClass: Looking for interface class javax.ws.rs.client.ClientBuilder through loader of org.openhab.binding.tesla.internal.TeslaHandlerFactory
15:13:05.529 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(441)] : getParameterClass: Found class javax.ws.rs.client.ClientBuilder
15:13:05.535 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(441)] : getReferenceClass: Looking for interface class org.openhab.core.io.net.http.HttpClientFactory through loader of org.openhab.binding.tesla.internal.TeslaHandlerFactory
15:13:05.541 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(441)] : getParameterClass: Found class org.openhab.core.io.net.http.HttpClientFactory
15:13:05.547 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(441)] : getReferenceClass: Looking for interface class org.openhab.core.io.net.http.WebSocketFactory through loader of org.openhab.binding.tesla.internal.TeslaHandlerFactory
15:13:05.553 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(441)] : getParameterClass: Found class org.openhab.core.io.net.http.WebSocketFactory
15:13:05.559 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(441)] : Found constructor with 3 arguments : public org.openhab.binding.tesla.internal.TeslaHandlerFactory(javax.ws.rs.client.ClientBuilder,org.openhab.core.io.net.http.HttpClientFactory,org.openhab.core.io.net.http.WebSocketFactory)
15:13:05.566 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(441)] : This thread collected dependencies
15:13:05.571 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(441)] : getService (single component manager) dependencies collected.
15:13:05.577 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(441)] : Querying state satisfied
15:13:05.583 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(441)] : Querying state satisfied
15:13:05.589 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(441)] : For dependency $000, optional: false; to bind: [[RefPair: ref: [{javax.ws.rs.client.ClientBuilder}={serviceloader.mediator=61, service.id=819, service.bundleid=60, service.scope=bundle, .org.apache.aries.spifly.provider.implclass=org.apache.aries.jax.rs.whiteboard.internal.client.ClientBuilderImpl, .org.apache.aries.spifly.provider.discovery.mode=SERVICELOADER_CAPABILITIES}] service: [null]]]
15:13:05.595 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(441)] : For dependency $001, optional: false; to bind: [[RefPair: ref: [{org.openhab.core.io.net.http.HttpClientFactory, org.openhab.core.io.net.http.WebSocketFactory}={service.id=279, service.bundleid=174, service.scope=bundle, component.name=org.openhab.core.io.net.http.internal.WebClientFactoryImpl, component.id=150}] service: [null]]]
15:13:05.601 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(441)] : For dependency $002, optional: false; to bind: [[RefPair: ref: [{org.openhab.core.io.net.http.HttpClientFactory, org.openhab.core.io.net.http.WebSocketFactory}={service.id=279, service.bundleid=174, service.scope=bundle, component.name=org.openhab.core.io.net.http.internal.WebClientFactoryImpl, component.id=150}] service: [null]]]
15:13:05.609 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(441)] : getting activate: activate
15:13:05.615 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(441)] : Locating method activate in class org.openhab.binding.tesla.internal.TeslaHandlerFactory
15:13:05.621 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(441)] : Declared Method org.openhab.binding.tesla.internal.TeslaHandlerFactory.activate([interface org.osgi.service.component.ComponentContext]) not found
15:13:05.627 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(441)] : Locating method activate in class org.openhab.core.thing.binding.BaseThingHandlerFactory
15:13:05.633 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(441)] : Found activate method: protected void org.openhab.core.thing.binding.BaseThingHandlerFactory.activate(org.osgi.service.component.ComponentContext)
15:13:05.639 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(441)] : invoking activate: activate: parameters [org.apache.felix.scr.impl.manager.ComponentContextImpl]
15:13:05.646 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(441)] : invoked activate: activate
15:13:05.652 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(441)] : Set implementation object for component
15:13:05.658 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(441)] : Changed state from satisfied to active
15:13:05.669 [DEBUG] [iscovery.TeslaVehicleDiscoveryService] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService] : Component created: DS=DS13, implementation=org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService, immediate=false, default-enabled=true, factory=null, configuration-policy=optional, activate=activate, deactivate=deactivate, modified=null configuration-pid=[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService]
15:13:05.675 [DEBUG] [iscovery.TeslaVehicleDiscoveryService] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService] : Component Services: scope=singleton, services=[org.openhab.core.thing.binding.ThingHandlerService]
15:13:05.683 [DEBUG] [iscovery.TeslaVehicleDiscoveryService] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService] : Component Properties: {}
15:13:05.691 [DEBUG] [iscovery.TeslaVehicleDiscoveryService] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService] : Querying state disabled
15:13:05.696 [DEBUG] [iscovery.TeslaVehicleDiscoveryService] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService] : Querying state disabled
15:13:05.702 [DEBUG] [iscovery.TeslaVehicleDiscoveryService] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService] : Component can not be activated since it is in state disabled
15:13:05.708 [DEBUG] [iscovery.TeslaVehicleDiscoveryService] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService] : Querying state disabled
15:13:05.713 [DEBUG] [iscovery.TeslaVehicleDiscoveryService] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService(442)] : Updating target filters
15:13:05.719 [DEBUG] [iscovery.TeslaVehicleDiscoveryService] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService(442)] : Changed state from disabled to unsatisfiedReference
15:13:05.725 [DEBUG] [iscovery.TeslaVehicleDiscoveryService] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService(442)] : Component enabled
15:13:05.730 [DEBUG] [iscovery.TeslaVehicleDiscoveryService] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService(442)] : ActivateInternal
15:13:05.738 [DEBUG] [iscovery.TeslaVehicleDiscoveryService] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService(442)] : Querying state unsatisfiedReference
15:13:05.743 [DEBUG] [iscovery.TeslaVehicleDiscoveryService] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService(442)] : Querying state unsatisfiedReference
15:13:05.749 [DEBUG] [iscovery.TeslaVehicleDiscoveryService] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService(442)] : Activating component from state unsatisfiedReference
15:13:05.755 [DEBUG] [iscovery.TeslaVehicleDiscoveryService] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService(442)] : Querying state unsatisfiedReference
15:13:05.760 [DEBUG] [iscovery.TeslaVehicleDiscoveryService] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService(442)] : Querying state unsatisfiedReference
15:13:05.766 [DEBUG] [iscovery.TeslaVehicleDiscoveryService] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService(442)] : Changed state from unsatisfiedReference to satisfied
15:13:05.773 [DEBUG] [iscovery.TeslaVehicleDiscoveryService] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService(442)] : registration change queue [registered]
15:13:06.790 [DEBUG] [.internal.handler.TeslaAccountHandler] - Initializing the Tesla account handler for myaccount
15:13:06.799 [DEBUG] [.internal.handler.TeslaAccountHandler] - Setting up an authenticated connection to the Tesla back-end
15:13:06.811 [DEBUG] [.internal.handler.TeslaAccountHandler] - Current authentication time 2023-01-05 15:13:06
15:13:06.819 [DEBUG] [esla.internal.handler.TeslaSSOHandler] - Exchanging SSO refresh token for API access token
15:13:06.862 [DEBUG] [esla.internal.handler.TeslaSSOHandler] - An exception occurred while invoking a HTTP request: 'java.io.EOFException: HttpConnectionOverHTTP@19497ac::DecryptedEndPoint@1d4af88{l=/192.xxx.xxx.xx:52850,r=auth.tesla.com/23.211.4.68:443,OPEN,fill=-,flush=-,to=28192736/0}'
15:13:06.868 [DEBUG] [esla.internal.handler.TeslaSSOHandler] - An error occurred during refresh of SSO token: no response
^C~                                                                                                                                                                                                                                          openhab>

openhab> bundle:restart org.openhab.binding.tesla
openhab> log:tail
15:13:55.823 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(443)] : Checking constructor public org.openhab.binding.tesla.internal.TeslaHandlerFactory(javax.ws.rs.client.ClientBuilder,org.openhab.core.io.net.http.HttpClientFactory,org.openhab.core.io.net.http.WebSocketFactory)
15:13:55.829 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(443)] : getReferenceClass: Looking for interface class javax.ws.rs.client.ClientBuilder through loader of org.openhab.binding.tesla.internal.TeslaHandlerFactory
15:13:55.835 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(443)] : getParameterClass: Found class javax.ws.rs.client.ClientBuilder
15:13:55.841 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(443)] : getReferenceClass: Looking for interface class org.openhab.core.io.net.http.HttpClientFactory through loader of org.openhab.binding.tesla.internal.TeslaHandlerFactory
15:13:55.847 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(443)] : getParameterClass: Found class org.openhab.core.io.net.http.HttpClientFactory
15:13:55.852 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(443)] : getReferenceClass: Looking for interface class org.openhab.core.io.net.http.WebSocketFactory through loader of org.openhab.binding.tesla.internal.TeslaHandlerFactory
15:13:55.858 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(443)] : getParameterClass: Found class org.openhab.core.io.net.http.WebSocketFactory
15:13:55.865 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(443)] : Found constructor with 3 arguments : public org.openhab.binding.tesla.internal.TeslaHandlerFactory(javax.ws.rs.client.ClientBuilder,org.openhab.core.io.net.http.HttpClientFactory,org.openhab.core.io.net.http.WebSocketFactory)
15:13:55.870 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(443)] : This thread collected dependencies
15:13:55.876 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(443)] : getService (single component manager) dependencies collected.
15:13:55.882 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(443)] : Querying state satisfied
15:13:55.888 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(443)] : Querying state satisfied
15:13:55.894 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(443)] : For dependency $000, optional: false; to bind: [[RefPair: ref: [{javax.ws.rs.client.ClientBuilder}={serviceloader.mediator=61, service.id=819, service.bundleid=60, service.scope=bundle, .org.apache.aries.spifly.provider.implclass=org.apache.aries.jax.rs.whiteboard.internal.client.ClientBuilderImpl, .org.apache.aries.spifly.provider.discovery.mode=SERVICELOADER_CAPABILITIES}] service: [null]]]
15:13:55.900 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(443)] : For dependency $001, optional: false; to bind: [[RefPair: ref: [{org.openhab.core.io.net.http.HttpClientFactory, org.openhab.core.io.net.http.WebSocketFactory}={service.id=279, service.bundleid=174, service.scope=bundle, component.name=org.openhab.core.io.net.http.internal.WebClientFactoryImpl, component.id=150}] service: [null]]]
15:13:55.914 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(443)] : For dependency $002, optional: false; to bind: [[RefPair: ref: [{org.openhab.core.io.net.http.HttpClientFactory, org.openhab.core.io.net.http.WebSocketFactory}={service.id=279, service.bundleid=174, service.scope=bundle, component.name=org.openhab.core.io.net.http.internal.WebClientFactoryImpl, component.id=150}] service: [null]]]
15:13:55.922 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(443)] : getting activate: activate
15:13:55.954 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(443)] : Locating method activate in class org.openhab.binding.tesla.internal.TeslaHandlerFactory
15:13:55.962 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(443)] : Declared Method org.openhab.binding.tesla.internal.TeslaHandlerFactory.activate([interface org.osgi.service.component.ComponentContext]) not found
15:13:55.969 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(443)] : Locating method activate in class org.openhab.core.thing.binding.BaseThingHandlerFactory
15:13:55.977 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(443)] : Found activate method: protected void org.openhab.core.thing.binding.BaseThingHandlerFactory.activate(org.osgi.service.component.ComponentContext)
15:13:55.985 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(443)] : invoking activate: activate: parameters [org.apache.felix.scr.impl.manager.ComponentContextImpl]
15:13:55.996 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(443)] : invoked activate: activate
15:13:56.005 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(443)] : Set implementation object for component
15:13:56.016 [DEBUG] [ng.tesla.internal.TeslaHandlerFactory] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.TeslaHandlerFactory(443)] : Changed state from satisfied to active
15:13:56.032 [DEBUG] [iscovery.TeslaVehicleDiscoveryService] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService] : Component created: DS=DS13, implementation=org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService, immediate=false, default-enabled=true, factory=null, configuration-policy=optional, activate=activate, deactivate=deactivate, modified=null configuration-pid=[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService]
15:13:56.041 [DEBUG] [iscovery.TeslaVehicleDiscoveryService] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService] : Component Services: scope=singleton, services=[org.openhab.core.thing.binding.ThingHandlerService]
15:13:56.054 [DEBUG] [iscovery.TeslaVehicleDiscoveryService] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService] : Component Properties: {}
15:13:56.061 [DEBUG] [iscovery.TeslaVehicleDiscoveryService] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService] : Querying state disabled
15:13:56.067 [DEBUG] [iscovery.TeslaVehicleDiscoveryService] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService] : Querying state disabled
15:13:56.073 [DEBUG] [iscovery.TeslaVehicleDiscoveryService] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService] : Component can not be activated since it is in state disabled
15:13:56.079 [DEBUG] [iscovery.TeslaVehicleDiscoveryService] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService] : Querying state disabled
15:13:56.084 [DEBUG] [iscovery.TeslaVehicleDiscoveryService] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService(444)] : Updating target filters
15:13:56.090 [DEBUG] [iscovery.TeslaVehicleDiscoveryService] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService(444)] : Changed state from disabled to unsatisfiedReference
15:13:56.096 [DEBUG] [iscovery.TeslaVehicleDiscoveryService] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService(444)] : Component enabled
15:13:56.104 [DEBUG] [iscovery.TeslaVehicleDiscoveryService] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService(444)] : ActivateInternal
15:13:56.109 [DEBUG] [iscovery.TeslaVehicleDiscoveryService] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService(444)] : Querying state unsatisfiedReference
15:13:56.116 [DEBUG] [iscovery.TeslaVehicleDiscoveryService] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService(444)] : Querying state unsatisfiedReference
15:13:56.122 [DEBUG] [iscovery.TeslaVehicleDiscoveryService] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService(444)] : Activating component from state unsatisfiedReference
15:13:56.129 [DEBUG] [iscovery.TeslaVehicleDiscoveryService] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService(444)] : Querying state unsatisfiedReference
15:13:56.135 [DEBUG] [iscovery.TeslaVehicleDiscoveryService] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService(444)] : Querying state unsatisfiedReference
15:13:56.141 [DEBUG] [iscovery.TeslaVehicleDiscoveryService] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService(444)] : Changed state from unsatisfiedReference to satisfied
15:13:56.149 [DEBUG] [iscovery.TeslaVehicleDiscoveryService] - bundle org.openhab.binding.tesla:3.4.0 (271)[org.openhab.binding.tesla.internal.discovery.TeslaVehicleDiscoveryService(444)] : registration change queue [registered]
15:13:57.123 [DEBUG] [.internal.handler.TeslaAccountHandler] - Initializing the Tesla account handler for myaccount
15:13:57.147 [DEBUG] [.internal.handler.TeslaAccountHandler] - Setting up an authenticated connection to the Tesla back-end
15:13:57.157 [DEBUG] [.internal.handler.TeslaAccountHandler] - Current authentication time 2023-01-05 15:13:57
15:13:57.162 [DEBUG] [esla.internal.handler.TeslaSSOHandler] - Exchanging SSO refresh token for API access token
15:13:57.844 [DEBUG] [esla.internal.handler.TeslaSSOHandler] - Access token expires in 28800 seconds at 2023-01-05 23:13:57
15:13:58.564 [DEBUG] [.internal.handler.TeslaAccountHandler] - Querying the vehicle: Response: 200: OK

That looks like the Tesla API is throttling. Try setting these advanced parameters in the Thing (requires 3.4).

useDriveState=true, useAdvancedStatesForPolling=true

Hi Bill

I set the advanced parameters as proposed by you.

Bridge tesla:account:myaccount "My Tesla Account" [ refreshToken="xxxxx" ] 
{
    models mycar "Tesla Model S" [ vin="xxxxx", allowWakeup=false, allowWakeupForCommands=true, useDriveState=true, useAdvancedStatesForPolling=true]
}

Unfortunately it still does not work:

03:50:56.481 [DEBUG] [.internal.handler.TeslaAccountHandler] - The access token has expired
03:50:56.489 [DEBUG] [esla.internal.handler.TeslaSSOHandler] - Exchanging SSO refresh token for API access token
03:50:56.883 [DEBUG] [esla.internal.handler.TeslaSSOHandler] - An exception occurred while invoking a HTTP request: 'java.io.EOFException: HttpConnectionOverHTTP@14e56e9::DecryptedEndPoint@14e7153{l=/192.xxx.xxx.xx:56338,r=auth.tesla.com/23.211.4.68:443,OPEN,fill=-,flush=-,to=28831613/0}'
03:50:56.891 [DEBUG] [esla.internal.handler.TeslaSSOHandler] - An error occurred during refresh of SSO token: no response
03:50:56.899 [DEBUG] [.internal.handler.TeslaVehicleHandler] - An error occurred while querying the vehicle

The only idea left on my side is - as a work around - to automate the restart of the binding with a script and a rule tiggering the script every 8 h.

What do you think?

thanks in advance for the help

Ok, what I tried was to automate the restart of the binding with following shell script:

sudo nano /home/openhabian/Tesla.sh

with following content

#!/bin/bash
sudo openhab-cli console -p habopen bundle:restart org.openhab.binding.tesla

This works when I execute it in command line:

openhabian@openhabian:/etc $ /home/openhabian/Tesla.sh

Now I tried to automate the sript in a rule (as a test, execution is every minute):

rule "Refresh"
when
   	Time cron "0 * * * * ? *"
then
	executeCommandLine(Duration.ofSeconds(60), "/home/openhabian/Tesla.sh")
end

However the script is not executed anymore. What is wrong here?

Please help

  • executing your script from within OH now the script is executed as user openhab and not any more as user openhabian
  • does the user openhab have read, execute permission to the scrip ?
  • is the user openhab allowed and configured to run sudo ?
  • sudo may not be required as the process already is started with permissions of user openhab

Hi Wolfgang

Thank you very much. How can i check that (sorry for the beginner question )

Hi Wolfgang

What I did was following:

sudo chown openhab:openhab Tesla.sh
sudo chmod 777 Tesla.sh

With that owner should be openhab with read, write and execute rights. Right?
However it still does not execute the script

That’s a bit overkill but should work.
openhabian is member of group openhab. So read and execute for user and group should be sufficient. World does not need to have read and execute and not all all write permissions as this would open the possibility to all everyone to change the script and e.g. manipulate the script.

In your script read out the returned string result from execution like in

var ScriptResponse = executeCommandLine(Duration.ofSeconds(60), "path/to/my/script.sh");

Then log the content of the variable ( in this case ScriptResonse ) to the log file openhab.log.
After executing your script check the logfile for the error message.
Eiterh openhab is not allowed to run openhab-cli via sudo or it shows an entry that you need to manually allow the first run/execution for this command.

Did you try to remove sudo from your script ?

To check if the car is being denied API access due to frequent polling as opposed to other reasons, check the logs and verify that it is mostly asleep during the 8 hour period before it requests the token. You should see a set of log messages every minute, and not more frequently than once a minute, for example:

06-Jan-2023 07:51:51.285 [DEBUG] [binding.tesla.internal.handler.TeslaVehicleHandler] - Querying the vehicle, response : 200, OK
06-Jan-2023 07:51:51.288 [DEBUG] [binding.tesla.internal.handler.TeslaVehicleHandler] - Querying the vehicle: VIN xxx
06-Jan-2023 07:51:51.289 [DEBUG] [binding.tesla.internal.handler.TeslaVehicleHandler] - Vehicle state is asleep
06-Jan-2023 07:51:51.290 [DEBUG] [binding.tesla.internal.handler.TeslaVehicleHandler] - Vehicle is asleep.
06-Jan-2023 07:52:52.407 [DEBUG] [binding.tesla.internal.handler.TeslaVehicleHandler] - Querying the vehicle, response : 200, OK
06-Jan-2023 07:52:52.409 [DEBUG] [binding.tesla.internal.handler.TeslaVehicleHandler] - Querying the vehicle: VIN xxx
06-Jan-2023 07:52:52.411 [DEBUG] [binding.tesla.internal.handler.TeslaVehicleHandler] - Vehicle state is asleep
06-Jan-2023 07:52:52.412 [DEBUG] [binding.tesla.internal.handler.TeslaVehicleHandler] - Vehicle is asleep.

If however the car is being kept awake due to Sentry or some other mode and you see messages every 15 seconds, then you could be hitting some rate limit on the Tesla side. The messages look like this:

06-Jan-2023 15:23:31.994 [DEBUG] [binding.tesla.internal.handler.TeslaAccountHandler] - Invoking: vehicle_state
06-Jan-2023 15:23:45.993 [DEBUG] [binding.tesla.internal.handler.TeslaAccountHandler] - Invoking: drive_state

and are near constantly appearing. There is no way to lower the fastpoll currently other than for the car to be not moving or not reporting drive state. The usedAdvancedStates option will slow it down in some cases but not in all cases.

Hi Wolfgang

This is what I get when I log the ScriptResponse

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
sudo: a password is required

Do you have any idea what it means?

Thanks a lot for the help

Hi Bill

I will check and revert back to you

Thanks for the help

This is because of sudo in front of openhab-cli.

Per default user openhab is not configured to use sudo command.

First try if it works without a problem if you remove sudo from your shell script. Edit the file and remove sudo in front of openhab-cli.
Then check again.

Hi Wolfgang

I can report that now the script works.

Thank you very much for your help.

1 Like

Hi Bill

This is what I get in teh log. Does that satisfy the 1minute rule?

08:46:23.858 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Querying the vehicle, response : 200, OK
08:46:23.867 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Querying the vehicle: VIN xxx
08:46:23.875 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Vehicle state is online
08:46:23.882 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Car is at home. Movement or drive state threshold is 5 min.
08:46:23.889 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Drivestate has changed to null after interval 5 min and can now be put to sleep.
08:46:23.898 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Car is at home. Movement or drive state threshold is 5 min.
08:46:23.904 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Drivestate has changed to null after interval 5 min and can now be put to sleep.
08:46:23.911 [DEBUG] [.internal.handler.TeslaVehicleHandler] - slowpoll: Throttled to allow sleep, occupied/idle, or in a console mode
08:46:36.210 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Car is at home. Movement or drive state threshold is 5 min.
08:46:36.218 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Drivestate has changed to null after interval 5 min and can now be put to sleep.
08:46:36.225 [DEBUG] [.internal.handler.TeslaVehicleHandler] - fastpoll: Throttled to allow sleep, occupied/idle, or in a console mode
08:46:51.232 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Car is at home. Movement or drive state threshold is 5 min.
08:46:51.239 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Drivestate has changed to null after interval 5 min and can now be put to sleep.
08:46:51.246 [DEBUG] [.internal.handler.TeslaVehicleHandler] - fastpoll: Throttled to allow sleep, occupied/idle, or in a console mode
08:47:06.252 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Car is at home. Movement or drive state threshold is 5 min.
08:47:06.259 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Drivestate has changed to null after interval 5 min and can now be put to sleep.
08:47:06.266 [DEBUG] [.internal.handler.TeslaVehicleHandler] - fastpoll: Throttled to allow sleep, occupied/idle, or in a console mode
08:47:21.273 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Car is at home. Movement or drive state threshold is 5 min.
08:47:21.281 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Drivestate has changed to null after interval 5 min and can now be put to sleep.
08:47:21.287 [DEBUG] [.internal.handler.TeslaVehicleHandler] - fastpoll: Throttled to allow sleep, occupied/idle, or in a console mode
08:47:24.212 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Querying the vehicle, response : 200, OK
08:47:24.221 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Querying the vehicle: VIN xxx
08:47:24.230 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Vehicle state is online
08:47:24.237 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Car is at home. Movement or drive state threshold is 5 min.
08:47:24.247 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Drivestate has changed to null after interval 5 min and can now be put to sleep.
08:47:24.256 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Car is at home. Movement or drive state threshold is 5 min.
08:47:24.265 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Drivestate has changed to null after interval 5 min and can now be put to sleep.
08:47:24.272 [DEBUG] [.internal.handler.TeslaVehicleHandler] - slowpoll: Throttled to allow sleep, occupied/idle, or in a console mode
08:47:36.294 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Car is at home. Movement or drive state threshold is 5 min.
08:47:36.301 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Drivestate has changed to null after interval 5 min and can now be put to sleep.
08:47:36.308 [DEBUG] [.internal.handler.TeslaVehicleHandler] - fastpoll: Throttled to allow sleep, occupied/idle, or in a console mode
08:47:51.315 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Car is at home. Movement or drive state threshold is 5 min.
08:47:51.322 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Drivestate has changed to null after interval 5 min and can now be put to sleep.
08:47:51.329 [DEBUG] [.internal.handler.TeslaVehicleHandler] - fastpoll: Throttled to allow sleep, occupied/idle, or in a console mode
08:48:06.336 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Car is at home. Movement or drive state threshold is 5 min.
08:48:06.347 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Drivestate has changed to null after interval 5 min and can now be put to sleep.
08:48:06.356 [DEBUG] [.internal.handler.TeslaVehicleHandler] - fastpoll: Throttled to allow sleep, occupied/idle, or in a console mode
08:48:21.366 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Car is at home. Movement or drive state threshold is 5 min.
08:48:21.379 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Drivestate has changed to null after interval 5 min and can now be put to sleep.
08:48:21.389 [DEBUG] [.internal.handler.TeslaVehicleHandler] - fastpoll: Throttled to allow sleep, occupied/idle, or in a console mode
08:48:24.588 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Querying the vehicle, response : 200, OK
08:48:24.600 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Querying the vehicle: VIN xxx
08:48:24.611 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Vehicle state is online
08:48:24.621 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Car is at home. Movement or drive state threshold is 5 min.
08:48:24.631 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Drivestate has changed to null after interval 5 min and can now be put to sleep.
08:48:24.643 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Car is at home. Movement or drive state threshold is 5 min.
08:48:24.654 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Drivestate has changed to null after interval 5 min and can now be put to sleep.
08:48:24.665 [DEBUG] [.internal.handler.TeslaVehicleHandler] - slowpoll: Throttled to allow sleep, occupied/idle, or in a console mode
08:48:36.398 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Car is at home. Movement or drive state threshold is 5 min.
08:48:36.408 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Drivestate has changed to null after interval 5 min and can now be put to sleep.
08:48:36.417 [DEBUG] [.internal.handler.TeslaVehicleHandler] - fastpoll: Throttled to allow sleep, occupied/idle, or in a console mode
08:48:51.427 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Car is at home. Movement or drive state threshold is 5 min.
08:48:51.438 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Drivestate has changed to null after interval 5 min and can now be put to sleep.
08:48:51.448 [DEBUG] [.internal.handler.TeslaVehicleHandler] - fastpoll: Throttled to allow sleep, occupied/idle, or in a console mode
08:49:06.458 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Car is at home. Movement or drive state threshold is 5 min.
08:49:06.468 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Drivestate has changed to null after interval 5 min and can now be put to sleep.
08:49:06.478 [DEBUG] [.internal.handler.TeslaVehicleHandler] - fastpoll: Throttled to allow sleep, occupied/idle, or in a console mode
08:49:21.489 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Car is at home. Movement or drive state threshold is 5 min.
08:49:21.499 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Drivestate has changed to null after interval 5 min and can now be put to sleep.
08:49:21.508 [DEBUG] [.internal.handler.TeslaVehicleHandler] - fastpoll: Throttled to allow sleep, occupied/idle, or in a console mode
08:49:24.968 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Querying the vehicle, response : 200, OK
08:49:24.980 [DEBUG] [.internal.handler.TeslaVehicleHandler] - Querying the vehicle: VIN xxx

Thanks for the help