teslamotors / vehicle-command

Apache License 2.0
428 stars 93 forks source link

`vehicle_data` endpoint does not return the cached data if the car is asleep #178

Open rawmean opened 7 months ago

rawmean commented 7 months ago

New problem today: vehicle_data endpoint does not return the cached data if the car is asleep

Optional(https://fleet-api.prd.na.vn.cloud.tesla.com/api/1/vehicles/<vid>/vehicle_data?endpoints=climate_state3Bcharge_state3Blocation_data3Bgui_settings3Bvehicle_config3Bvehicle_state3Bdrive_state)
STATUS CODE: 408

RESPONSE BODY ERROR: {"response":null,"error":"vehicle unavailable: vehicle is offline or asleep","error_description":""}
DeLN0 commented 7 months ago

Seeing the same behaviour. The workaround for now is call vehicle_data only when car is online. If car is not online, you can wake the car up first, then vehicle_data will work.

Tesla documentation says this about vehicle_data:

Makes a live call to the vehicle. This may return cached data if the vehicle is offline. For vehicles running firmware versions 2023.38+, location_data is required to fetch vehicle location. This will result in a location sharing icon to show on the vehicle UI.

Not sure if this is a temporary problem that will get reverted or it's a permanent change. @sethterashima

rawmean commented 7 months ago

Being able to retrieve the data without waking the car is an important feature. This happened about a month ago also but was fixed after one day. I hope this is a temporary glitch.

rawmean commented 7 months ago

@derekargueta , @sethterashima can you please indicate if this is a bug or cached data won't be returned anymore? I wish there was more heads up wrt to changes like this so that developers can handle it more gracefully. No response from the fleet support email either.

ThomasAlxDmy commented 5 months ago

This is a documentation issue. We should fix.

rawmean commented 5 months ago

This is a documentation issue. We should fix.

The server used to return the cached data just like the documentation says. So, I don't think this is a documentation issue. Are you saying that the behavior has changed and cached data is no longer returned?

Urkman commented 3 months ago

This is problem still exists...