bassmaster187 / TeslaLogger

TeslaLogger is a self hosted data logger for your Tesla Model S/3/X/Y. Actually it supports RaspberryPi 3B, 3B+, 4B, Docker and Synology NAS.
https://www.teslalogger.de
GNU General Public License v3.0
518 stars 171 forks source link

since latest v1.58 update, car status shows offline instead of asleep #1300

Open rf23 opened 5 months ago

rf23 commented 5 months ago

wonder if this is one of the changes made in the latest version? see the screenshot #1 for status. the green is alseep state that was shown before the update.

and screenshot #2 shows part of the log when teslalogger was waiting for car to get into sleeping state.

tesla-status

tesla-offline

ostorezio commented 5 months ago

I also just updated to v1.58, and applied the token update procedure. My car shows as Offline and the nohup.log file shows these errors:

07.06.2024 10:43:35 : #1[Car_1:37]: IsDriving = NULL! 07.06.2024 10:43:45 : #1[Thread Pool Worker:26]: Result.Statuscode: 429 (429) cmd: vehicle_data?endpoints=drive_state&let_sleep=true Sleep: 37127ms 07.06.2024 10:43:48 : #1[:29]: Connect to Telemetry Server 07.06.2024 10:43:48 : #1[:29]: Login to Telemetry Server 07.06.2024 10:43:48 : #1[Thread Pool Worker:31]: Result.Statuscode: 429 (429) cmd: vehicle_data?endpoints=vehicle_config&let_sleep=true Sleep: 28191ms 07.06.2024 10:44:22 : #1[Car_1:37]: IsDriving = NULL!

As well as many others, such as this:

--- End of stack trace from previous location where exception was thrown ---

at System.Net.WebSockets.ManagedWebSocket.EnsureBufferContainsAsync (System.Int32 minimumRequiredBytes, System.Boolean throwOnPrematureClosure) [0x00136] in :0 at System.Net.WebSockets.ManagedWebSocket.ReceiveAsyncPrivate[TWebSocketReceiveResultGetter,TWebSocketReceiveResult] (System.Memory1[T] payloadBuffer, System.Threading.CancellationToken cancellationToken, TWebSocketReceiveResultGetter resultGetter) [0x00144] in <a9a08e39ba304bd0a84c49bd158dfc02>:0 at System.Net.WebSockets.ManagedWebSocket.ReceiveAsyncPrivate[TWebSocketReceiveResultGetter,TWebSocketReceiveResult] (System.Memory1[T] payloadBuffer, System.Threading.CancellationToken cancellationToken, TWebSocketReceiveResultGetter resultGetter) [0x00845] in :0 at TeslaLogger.TelemetryConnection.ReceiveAsync (System.Net.WebSockets.WebSocket socket) [0x000ac] in :0 <---

tommymann1982 commented 5 months ago

I am facing the same problem. Since this morning teslalogger says, the car is offline (well it isnt actually offline). Last Update was at 5:43h

ostorezio commented 5 months ago

Updated to 1.58.1.0, no remarkable errors in nohup.log, but Teslaloggger main page is kind of empty

Screen Shot 2024-06-10 at 5 02 15 PM
rowich commented 5 months ago

Try to wake up the car using the App. Then give it a few seconds and refresh the site. This was so far the usual way after manual enforced update.

ostorezio commented 5 months ago

The following picture was taken at 12:50, actual status was Charging and not Online, the shown range is wrong as well as the location.

Screen Shot 2024-06-11 at 1 10 12 PM

The charging session is not showing in the Grafana charts, as well as most recent trips.

TillMatthis commented 5 months ago

I'm also having issues sinnce 1.58.1.0 State is uüating very slowly, if at all. Takes hours. Currently, car is awake and charging - has been for 40 minutes. I restarted TL 15 minutes ago, and this is how it looks like:

Bildschirmfoto 2024-06-12 um 12 23 47

Edit: this is a section from the log after restart. There's a mono error that's new.

Bildschirmfoto 2024-06-12 um 12 27 51
ostorezio commented 4 months ago

In my case, token refresh did the job.

rf23 commented 4 months ago

it did not work for me even i tried token refresh (many times). over the last two weeks, it did show alseep 2-3 times but majority it's shown as offline.

ostorezio commented 4 months ago

@rf23: correct. Token refresh worked for a while but now we're back to missing/incorrect data. I'm currently running Teslalogger 1.58.7.0 but it is since 1.58.1 that the problem linger on.

ostorezio commented 4 months ago

Got it ... maybe. Had a look at Issue #1304 , and used Virtual Key instead of Fleet API

ostorezio commented 4 months ago

Got it ... maybe. Had a look at Issue #1304 , and used Virtual Key instead of Fleet API

Nope! Here we go again, Teslalogger 1.58.9.0 again reports wrong/missing data, even after token refresh:

Screen Shot 2024-07-10 at 1 54 22 PM
ostorezio commented 4 months ago

Fixed with 1.59.1

rf23 commented 4 months ago

updated to latest 1.59.2 and everything seems to be working as expected, except the car status still shows as offline instead of asleep. the raw log is attached below. In the log at 16:51:41, teslalogger claimed to be waiting for car to go to sleep, and then the next second, it logged "car is offline now". not sure if this is normal.

23.07.2024 16:51:41 : #1[Car_1:27]: Waiting for car to go to sleep 0 23.07.2024 16:51:42 : #1[Car_1:27]: Car is offline now

-- 23.07.2024 16:51:16 : #1[Thread Pool Worker:9]: Command: vehicle_data?endpoints=drive_state%3Blocation_data%3Bclimate_state%3Bvehicle_state%3Bcharge_state%3Bvehicle_config&let_sleep=true [25] 23.07.2024 16:51:16 : #1[Thread Pool Worker:9]: Result.Statuscode: 408 (RequestTimeout) cmd: vehicle_data?endpoints=drive_state%3Blocation_data%3Bclimate_state%3Bvehicle_state%3Bcharge_state%3Bvehicle_config&let_sleep=true 23.07.2024 16:51:17 : #1[Thread Pool Worker:46]: Command: vehicle_data?endpoints=drive_state%3Blocation_data%3Bclimate_state%3Bvehicle_state%3Bcharge_state%3Bvehicle_config&let_sleep=true [25] 23.07.2024 16:51:17 : #1[Thread Pool Worker:46]: Result.Statuscode: 408 (RequestTimeout) cmd: vehicle_data?endpoints=drive_state%3Blocation_data%3Bclimate_state%3Bvehicle_state%3Bcharge_state%3Bvehicle_config&let_sleep=true 23.07.2024 16:51:18 : #1[Car_1:27]: GetOutsideTempAsync: NULL

23.07.2024 16:51:18 : #1[Car_1:27]: isCharging = NULL

23.07.2024 16:51:28 : #1[Thread Pool Worker:37]: Command: vehicle_data?endpoints=drive_state%3Blocation_data%3Bclimate_state%3Bvehicle_state%3Bcharge_state%3Bvehicle_config&let_sleep=true [25] 23.07.2024 16:51:28 : #1[Thread Pool Worker:37]: Result.Statuscode: 408 (RequestTimeout) cmd: vehicle_data?endpoints=drive_state%3Blocation_data%3Bclimate_state%3Bvehicle_state%3Bcharge_state%3Bvehicle_config&let_sleep=true 23.07.2024 16:51:29 : #1[Car_1:27]: change TeslaLogger state: Online -> Start

23.07.2024 16:51:30 : #1[Thread Pool Worker:11]: Command: vehicle_data?endpoints=drive_state%3Blocation_data%3Bclimate_state%3Bvehicle_state%3Bcharge_state%3Bvehicle_config&let_sleep=true [25] 23.07.2024 16:51:30 : #1[Thread Pool Worker:11]: Result.Statuscode: 408 (RequestTimeout) cmd: vehicle_data?endpoints=drive_state%3Blocation_data%3Bclimate_state%3Bvehicle_state%3Bcharge_state%3Bvehicle_config&let_sleep=true 23.07.2024 16:51:31 : #1[Car_1:27]: IsDriving = NULL!

23.07.2024 16:51:41 : #1[Car_1:27]: STOP communication with Tesla Server to enter sleep Mode! https://teslalogger.de/faq-1.php 23.07.2024 16:51:41 : #1[Car_1:27]: Waiting for car to go to sleep 0 23.07.2024 16:51:42 : #1[Car_1:27]: Car is offline now 23.07.2024 16:51:42 : #1[Car_1:27]: Restart communication with Tesla Server! 3 23.07.2024 16:51:42 : #1[Car_1:27]: Restart communication with Tesla Server! 2 23.07.2024 16:51:42 : #1[StreamAPIThread_1:29]: Stream Data Error: Vehicle is offline

23.07.2024 16:52:12 : #1[Car_1:27]: ScanMyTesla FastMode: False 23.07.2024 16:52:12 : #1[Car_1:27]: CloseDriveState EndDate: 2024-07-23 16:34:56 23.07.2024 16:52:12 : Distance: 5.64627264865898 - Radius: 27 - 🏠 Home 23.07.2024 16:52:12 : Reverse geocoding by Geofence 23.07.2024 16:52:12 : Distance: 5.64627264865898 - Radius: 27 - 🏠 Home 23.07.2024 16:52:12 : Reverse geocoding by Geofence 23.07.2024 16:52:12 : #1[Car_1:27]: state: offline