Nope, it's online
Model S here. No idea why it behaves differently on your model 3
You can install our site as a web app on your iOS device by utilizing the Add to Home Screen feature in Safari. Please see this thread for more details on this.
Note: This feature may not be available in some browsers.
Nope, it's online
Model S here. No idea why it behaves differently on your model 3
Anyone else having API access problems?
I haven't been able to connect to my car via the mobile app, Teslafi, my own API code, or my tampermonkey script (Edit Telsa API Safe Tools: Token Generator, API Query Tool, and Referral Info Retrieval | OpenUserJS) .
I just get Vehicle Communication Error. I sent an email to customer support, but not sure if/when I'll hear back.
Wait, I think I figured it out. There's a *third* ID in that list response called id_s which does work.
id_s is just a string representation of id. Do you see something different?
My id, id_s, and vehicle_id are all different.
Interestingly, id_s = str(id + 1)
Very strange. I just double-checked mine, and id_s == str(id).
First, many thanks to SG57 for posting the info on the new 'actuate_trunk' command for Model 3. For the life of me I could not figure out why 'trunk_open' would not work (error 400), and that new command did the trick.
Related, in the 'vehicle_state' query, is there a meaning for the 'ft' (front trunk) and 'rt' (rear trunk) numeric values? For my Model 3, these values are 0 when the trunks are closed. But when open, 'ft' = 16 and 'rt' = 32. Being both powers of 2, that looks like something perhaps bit-mapped. Not sure why the numbers are different for trunk and frunk. Does anyone have an idea of what the bits (or numbers) mean?
Related, in the 'vehicle_state' query, is there a meaning for the 'ft' (front trunk) and 'rt' (rear trunk) numeric values? For my Model 3, these values are 0 when the trunks are closed. But when open, 'ft' = 16 and 'rt' = 32. Being both powers of 2, that looks like something perhaps bit-mapped. Not sure why the numbers are different for trunk and frunk. Does anyone have an idea of what the bits (or numbers) mean?
My guess is internal flag bits 1-4 are the doors (1, 2, 4, 8) and bits 5 and 6 are the trunks (16, 32)
So I was able to test out the websocket streaming API on friend's Model 3 today, and it worked! (I've only seen one report about it up thread, where it did not work.)
Initially, I was getting a "client_error" when the car was asleep, but now I'm getting no error at all. Contrast that with my Model S (still running V8), which gives a "vehicle_disconnected" error when it's asleep. But either way, both cars report data when they are driving.
> subscribe
< client_error
> subscribe
< client_error
.
.
.
> subscribe
< connected
< data!
> subscribe
< silence!
Trying to figure out a reasonable strategy for a test app I'm working on for detailed logging of my 2018 x that doesn't keep the car awake.
I'd like to be able to retrieve data every 1min while the car is being driven. When it's not being driven I don't need that frequent details.
If it's asleep, I want it to stay asleep.
If it's online, I want to know if it's being driven. If it is, I want to get details for it.
The common problem is that while the "Vehicles" API call wont wake up a sleeping car, and it does tell you if the car is online or asleep, it doesn't give any indication as to whether it's being used or not. To find out if the car is being used, you need to make a "Details" call, and that will keep the car awake.
I think this was a problem about a year ago that others were also having. Are there any newer APIs yet that might give me the ability to get this status without waking the car?
For now you'll need to either work on a schedule of not polling at certain times, and risk losing drives. Or every so often stop polling for 15 minutes or so and check if that put the car to sleep. Then stop polling regularly until the car stops sleeping. Repeat.
What I do is use the streaming API to determine if the car is driving or charging. If it is, I poll the REST API once per minute until the car is idle, again. The streaming API does not keep the car from going to sleep.
I'm trying something out now that the guys at TeslaFi documented. It's a bit convoluted, but signs are that it may work.
Enabling sleep settings to limit vampire loss. / Knowledge base / TeslaFi
Basically, while it is "online" if I do a details call and see an indication that the drive_state.shift_state has switched to "null". This seems to be an indication that the car is "online" but it's attempting to sleep. Likely not an intentional behavior, but a useful "bug" on the car/API.
Once I see that, I pause the car details calls for up to 15min while still making the Vehicles call. This has allowed the car to go to sleep.
After that, the 1min interval calls for "Vehicles" I can use to restart the details calls once it goes "online" again.
Interesting idea, but ... couldn’t null shift_state also be BEFORE you are going to start a drive, and after when you want to back off to let it sleep?
... if it is online, check for pre_conditioning being on and then shorten up into a “pre-drive” state of more frequent polling. Or if the doors are unlocked also do this.
Then if vehicle_state.is_user_present, really get geared up even more into a “drive is imminent” state and you should be able to catch the start of the drive fairly well.
Then if you just get into the habit of preconditioning or unlocking your car 10 minutes early it will be like sending a signal to your logging service to “get ready for a drive”
Of course if you are manually doing this just to signal the service, then you could design a way to actually trigger your service to shift into pre-drive state directly