Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

ChargingState flipflops to Complete when car is disconnected or stopped

This site may earn commission on affiliate links.
What's the best way to report a bug to Tesla's connected car API folks?
I've got multiple Tesla's where the charging state coming back via the Tesla API changes from a reasonable value to Complete. This happens both when a car is plugged in but charging stopped, and when the car is disconnected. It shows up about 12% of the time I poll a car.

For example, see a series of events below. The Model S is plugged in, I've stopped charging remotely. Then, the car switches to Complete, even though the state-of-charge (63%) is well below the desired state-of-charge (80%). Complete used to mean the car was plugged in. Now it's unreliable.

NameValue
[472]Stopped SoC: 63% / 80% TAL: "2/3/22 5:16:7 -8" Odo: {45276.3 miles} Power: {0 W}
[473]Stopped SoC: 63% / 80% TAL: "2/3/22 5:18:7 -8" Odo: {45276.3 miles} Power: {0 W}
[474]Complete SoC: 63% / 80% TAL: "2/3/22 5:33:0 -8" Odo: {45276.3 miles} Power: {0 W}
[475]Complete SoC: 63% / 80% TAL: "2/3/22 5:45:53 -8" Odo: {45276.3 miles} Power: {0 W}
[476]Complete SoC: 63% / 80% TAL: "2/3/22 5:58:45 -8" Odo: {45276.3 miles} Power: {0 W}
[477]Stopped SoC: 63% / 80% TAL: "2/3/22 6:1:26 -8" Odo: {45276.3 miles} Power: {0 W}

Another example:

NameValue
[266]Disconnected SoC: 82% / 90% TAL: "2/1/22 13:24:38 -8" Odo: {45251.4 miles} Power: {0 W}
[267]Disconnected SoC: 82% / 90% TAL: "2/1/22 13:27:49 -8" Odo: {45251.4 miles} Power: {0 W}
[268]Complete SoC: 82% / 90% TAL: "2/1/22 13:42:43 -8" Odo: {45251.4 miles} Power: {0 W}
[269]Disconnected SoC: 82% / 90% TAL: "2/1/22 13:55:35 -8" Odo: {45251.4 miles} Power: {0 W}
[270]Disconnected SoC: 82% / 90% TAL: "2/1/22 13:57:50 -8" Odo: {45251.4 miles} Power: {0 W}

This regressed around January 2022, possibly a little earlier in December. Device firmware: 2021.24.27 3c1ff240f919
This happens for brief windows many times in a day, making it very tricky to analyze charging sessions.
I'm seeing this on cars in the US and Australia, so it's not a unique hardware problem with one vehicle. Feels like a software regression.
This state change did happen approximately at 3 AM, 4 AM, 5:30 AM, 4:30 PM, 9 PM, and 9:55 PM. But it also happened around 12:45 AM, ~14:30, 17:15, 17:43-17:57, 8:12 - 8:27 PM, 10:45 PM. The car may be woken up remotely at some of these times, but not all of them.
 
Last edited:
Tesla does not publish their API and they have LOTS of people that work there driving Teslas so those are likely the people that get to complain to the programmers. Even those of us in the Beta program don't really get to complain about things we want changed on the car. It's sort of a love it or lump it situation.

Perhaps there are people at Tesla that read the forums, and of course there is always posting to Elon's twitter you could try, but even the big Tesla news sites have been unable to get his attention.

Also, it could just be an issue with the way you are using the API, is this something that EVERYONE can see directly in their Tesla App? If so you might be able to get the news sites interested in covering the issue, but getting support on the app is difficult enough.
 
Upvote 0
I think the API in general seems a bit unreliable. When I looked at the detailed traces in TeslaFi, I've often seen entries that report the API didn't return in time, that sort of thing. Because of the way it's implemented technically, it's possible that sometimes the Tesla server is unable to fetch fresh data from the car and might return something stale or slightly wrong. It's also possible that what it returns depends on whether the car is awake or asleep. You might want to add that state information to your traces, in case you end up finding a correlation.
For fun, compare your findings with what TeslaFi gets for the same car. Maybe you'll find that TeslaFi has added some logic on top of the API calls to adjust for those flukes.
 
Upvote 0