Failed to retrieve refresh token

That is normal. What it means is that the binding is preventing polling to allow the car to go to sleep. It should repeat these messages for 20 minutes after which the car should go to sleep and show messages saying that the car is asleep. So the question is what happens 20 minutes later or if you just constantly get these messages.

Hi Bill

This afternoon I got several warnings. Do you have an idea, what it means. Could it be that my (advanced) settings are wrong?

2023-01-08 17:11:12.497 [DEBUG] [internal.handler.TeslaVehicleHandler] - Querying the vehicle, response : 200, OK
2023-01-08 17:11:12.511 [DEBUG] [internal.handler.TeslaVehicleHandler] - Querying the vehicle: VIN xxx
2023-01-08 17:11:12.519 [DEBUG] [internal.handler.TeslaVehicleHandler] - Vehicle state is online
2023-01-08 17:11:12.531 [DEBUG] [internal.handler.TeslaAccountHandler] - Invoking: charge_state
2023-01-08 17:11:12.535 [DEBUG] [internal.handler.TeslaAccountHandler] - Invoking: climate_state
2023-01-08 17:11:13.531 [DEBUG] [internal.handler.TeslaAccountHandler] - Invoking: gui_settings
2023-01-08 17:11:14.532 [DEBUG] [internal.handler.TeslaAccountHandler] - Invoking: mobile_enabled
2023-01-08 17:11:15.534 [DEBUG] [internal.handler.TeslaAccountHandler] - Invoking: drive_state
2023-01-08 17:11:16.535 [DEBUG] [internal.handler.TeslaAccountHandler] - Invoking: vehicle_state
2023-01-08 17:11:27.590 [DEBUG] [internal.handler.TeslaAccountHandler] - Invoking: drive_state
2023-01-08 17:11:28.591 [DEBUG] [internal.handler.TeslaAccountHandler] - Invoking: vehicle_state
2023-01-08 17:11:42.590 [DEBUG] [internal.handler.TeslaAccountHandler] - Invoking: drive_state
2023-01-08 17:11:43.591 [DEBUG] [internal.handler.TeslaAccountHandler] - Invoking: vehicle_state
2023-01-08 17:11:51.903 [WARN ] [internal.handler.TeslaAccountHandler] - Reached the maximum number of errors (3) for the current interval (15 seconds)
2023-01-08 17:11:51.915 [DEBUG] [internal.handler.TeslaAccountHandler] - An error occurred while communicating with the vehicle during request drive_state: 408: Request Timeout
2023-01-08 17:11:52.911 [WARN ] [internal.handler.TeslaAccountHandler] - Reached the maximum number of errors (3) for the current interval (15 seconds)
2023-01-08 17:11:52.919 [DEBUG] [internal.handler.TeslaAccountHandler] - An error occurred while communicating with the vehicle during request vehicle_state: 408: Request Timeout
2023-01-08 17:11:54.326 [DEBUG] [internal.handler.TeslaAccountHandler] - Setting up an authenticated connection to the Tesla back-end
2023-01-08 17:11:54.339 [DEBUG] [internal.handler.TeslaAccountHandler] - Current authentication time 2023-01-08 17:11:54
2023-01-08 17:11:54.346 [DEBUG] [internal.handler.TeslaAccountHandler] - Found a request token from 2023-01-08 16:00:41
2023-01-08 17:11:54.354 [DEBUG] [internal.handler.TeslaAccountHandler] - Access token expiration time 2023-01-09 00:00:41
2023-01-08 17:11:54.361 [DEBUG] [internal.handler.TeslaAccountHandler] - The access token has not expired yet
2023-01-08 17:11:54.922 [DEBUG] [internal.handler.TeslaAccountHandler] - Querying the vehicle: Response: 200: OK
2023-01-08 17:11:54.933 [DEBUG] [internal.handler.TeslaAccountHandler] - Invoking: vehicle_config
2023-01-08 17:11:57.591 [DEBUG] [internal.handler.TeslaAccountHandler] - Invoking: drive_state
2023-01-08 17:11:58.592 [DEBUG] [internal.handler.TeslaAccountHandler] - Invoking: vehicle_state
2023-01-08 17:12:04.399 [WARN ] [internal.handler.TeslaAccountHandler] - Reached the maximum number of errors (3) for the current interval (15 seconds)
2023-01-08 17:12:04.413 [DEBUG] [internal.handler.TeslaAccountHandler] - An error occurred while communicating with the vehicle during request vehicle_config: 408: Request Timeout
2023-01-08 17:12:06.953 [WARN ] [internal.handler.TeslaAccountHandler] - Reached the maximum number of errors (3) for the current interval (15 seconds)
2023-01-08 17:12:06.961 [DEBUG] [internal.handler.TeslaAccountHandler] - An error occurred while communicating with the vehicle during request drive_state: 408: Request Timeout
2023-01-08 17:12:09.036 [WARN ] [internal.handler.TeslaAccountHandler] - Reached the maximum number of errors (3) for the current interval (15 seconds)
2023-01-08 17:12:09.045 [DEBUG] [internal.handler.TeslaAccountHandler] - An error occurred while communicating with the vehicle during request vehicle_state: 408: Request Timeout
2023-01-08 17:12:12.878 [DEBUG] [internal.handler.TeslaVehicleHandler] - Querying the vehicle, response : 200, OK
2023-01-08 17:12:12.911 [DEBUG] [internal.handler.TeslaVehicleHandler] - Querying the vehicle: VIN xxx
2023-01-08 17:12:12.922 [DEBUG] [internal.handler.TeslaVehicleHandler] - Vehicle state is online
2023-01-08 17:12:19.421 [DEBUG] [internal.handler.TeslaAccountHandler] - Setting up an authenticated connection to the Tesla back-end
2023-01-08 17:12:19.433 [DEBUG] [internal.handler.TeslaAccountHandler] - Current authentication time 2023-01-08 17:12:19
2023-01-08 17:12:19.440 [DEBUG] [internal.handler.TeslaAccountHandler] - Found a request token from 2023-01-08 16:00:41
2023-01-08 17:12:19.448 [DEBUG] [internal.handler.TeslaAccountHandler] - Access token expiration time 2023-01-09 00:00:41
2023-01-08 17:12:19.455 [DEBUG] [internal.handler.TeslaAccountHandler] - The access token has not expired yet
2023-01-08 17:12:21.564 [DEBUG] [internal.handler.TeslaAccountHandler] - Querying the vehicle: Response: 200: OK
2023-01-08 17:12:21.573 [DEBUG] [internal.handler.TeslaAccountHandler] - Invoking: vehicle_config
2023-01-08 17:12:27.591 [DEBUG] [internal.handler.TeslaAccountHandler] - Invoking: drive_state
2023-01-08 17:12:28.592 [DEBUG] [internal.handler.TeslaAccountHandler] - Invoking: vehicle_state
2023-01-08 17:12:30.948 [WARN ] [internal.handler.TeslaAccountHandler] - Reached the maximum number of errors (3) for the current interval (15 seconds)
2023-01-08 17:12:30.985 [DEBUG] [internal.handler.TeslaAccountHandler] - An error occurred while communicating with the vehicle during request vehicle_config: 408: Request Timeout
2023-01-08 17:12:36.916 [WARN ] [internal.handler.TeslaAccountHandler] - Reached the maximum number of errors (3) for the current interval (15 seconds)
2023-01-08 17:12:36.954 [DEBUG] [internal.handler.TeslaAccountHandler] - An error occurred while communicating with the vehicle during request drive_state: 408: Request Timeout
2023-01-08 17:12:37.917 [WARN ] [internal.handler.TeslaAccountHandler] - Reached the maximum number of errors (3) for the current interval (15 seconds)
2023-01-08 17:12:37.925 [DEBUG] [internal.handler.TeslaAccountHandler] - An error occurred while communicating with the vehicle during request vehicle_state: 408: Request Timeout
2023-01-08 17:12:45.997 [DEBUG] [internal.handler.TeslaAccountHandler] - Setting up an authenticated connection to the Tesla back-end
2023-01-08 17:12:46.022 [DEBUG] [internal.handler.TeslaAccountHandler] - Current authentication time 2023-01-08 17:12:46
2023-01-08 17:12:46.032 [DEBUG] [internal.handler.TeslaAccountHandler] - Found a request token from 2023-01-08 16:00:41

It looks like that is the same problem getting the new access token. The Tesla API is just responding with empty or not responding at all.
Seems like something at Tesla doesn’t like your polling frequency. Perhaps somebody else owned the IP address at some point and was abusing it, or it belongs to a block of ips flagged for abuse. If you have other things that are polling the API constantly that could also be a cause. I would try releasing your WAN IP if possible and confirm you have a new one, and then try restarting the binding. The errors above are so close to the request token time that even if we put a setting to renew the token early I’m not sure it would help much.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.