Elevation recording stops during longer drives (?) #5532
|
First of all, I'm starting a discussion instead of opening an issue because I'm still investigating whether this is a common problem. In the past few weeks, my Teslamate stopped recording elevation values for several drives after about an hour. Looking at the database tables directly, all affected position rows are missing I found two similar observations ...: ... but no cause or explanation.
(My Teslamate is on v4.0.1, I'm still using the Owner API and always have.) |
Replies: 3 comments
|
Thanks for reporting. This is not indented design nor reproducible on my end. As you are not using Streaming API it doesn't seem to be a rate limit. But please check your logs. Without the logs, it's impossible to see more clearly into the crystal ball. |
|
Thanks for your reply and the reminder about the log. There's indeed a hiccup which coincides which the "switching" of recorded values, but I'm still not sure how all this comes together. I went through the database looking at several past drives and their corresponding position records:
Regarding my original problem, after looking at the logs:
Docker log (shortened)
TL;DR:
|
|
Thanks for the logs — with them the behavior is clear. Here is what happens: 1) TeslaMate records positions from two different sources:
So elevation only ever comes from the streamed rows. The SRTM backfill task doesn't fill the gaps either, as it only processes drives without any streamed positions. Your "combined" rows before June 2024 will have originated from exactly that backfill, i.e. drives where the stream wasn't delivering and the drive was treated as non-streamed. This also answers @swiffer's question from #5438. 2) The switch to "full rows only" after the car went offline mid-drive The repeated 408 timeouts from the Owner API tripped the internal circuit breaker — the vehicle was treated as offline while driving and the stream was disconnected. When the car comes back online mid-drive, the drive is resumed, but in this resume path the streaming websocket is currently not re-established. TeslaMate falls back to pure REST polling at the driving interval (default 2.5 s — your ~3 s observation) for the rest of the drive. Only when the state machine passes through the online state again (after your charging stop) is the stream reconnected, which is why the next drive was recorded normally. So nothing is lost except elevation — the higher-frequency full rows are the designed polling fallback. Point 2 is worth fixing: the stream should be reconnected when a drive resumes after an offline phase. I've opened #5534 to track this. 🤖 Comment drafted with Claude Code (Fable 5 extra) — sponsored by Claude for Open Source |
Thanks for the logs — with them the behavior is clear. Here is what happens:
1)
elevationvs. the "full" columns — by design (API limitation)TeslaMate records positions from two different sources:
elevation.vehicle_datapolling (REST): while driving with streaming active, TeslaMate additionally polls the full vehicle data every 15 s. Those rows contain ranges, temperatures, TPMS etc., but the REST endpoint does not provide altitude at all. With the streaming API enabled, TeslaMate leaveselevationempty on those rows instead of doing an SRTM l…