First reported by hiroshiy on the official Dashboard for Tesla thread on the TMC forum.

Recap:

  • Smart charging service is failing when the vehicle sleeps with the "always connected" car setting disabled

  • The error has been identified as: Unauthorized

  • The error occurs when the smart charging service is attempting to read the vehicle's location using the streaming API

  • This indicates Tesla servers see the streaming token being used is expired

  • Streaming tokens expire somewhere between 10 minutes - 30 minutes

  • The streaming token being used to retrieve the vehicle's location is retrieved from the vehicle summary right before attempting to connect to the streaming API

  • Given this, we expect the streaming token to never be expired

-

Some ideas why this might be happening are:

  • Most Likely - when the vehicle sleeps, it stops sending Tesla servers its updated streaming token explaining why the server is serving an expired streaming token

  • Less Likely -other services, such as TeslaFi, may be revoking tokens when detected that the vehicle is asleep

-

Some things to test:

  • Disable other services, such as TeslaFi or automatic behaviors or home-screen widgets, to better isolate the issue to being specific to Smart Charging and not the interference of different services or features

  • Enable the "always connected" setting in the car and see if the problem persists when the vehicle sleeps. Perhaps the always connected setting in the car means it continues to send its streaming token to the servers even when the vehicle sleeps.

-

Some things for me to look at:

  • The streaming tokens retrieved come in pairs with the first one being the only one that works, perhaps the second one is only valid once the vehicle sleeps? Should be able to dig thru the official app source to verify.

-

Worst case scenario, I will have to require Smart Charging users accept that their vehicle must have the "always connected" setting enabled.

Cord Rehn
CEO, Lead Developer
cord.rehn@sg57productions.com
SG57 Productions