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

Model S REST API

This site may earn commission on affiliate links.
Re: Model 3 streaming - even though the streaming.vn.teslamotors.com/command endpoint is giving lat/long, from what I can tell I can't see the orientation in the (limited) responses. Somehow the Tesla app is actually getting it. Are we missing an endpoint somewhere (or, more likely, am I not doing something right)?
 
Re: Model 3 streaming - even though the streaming.vn.teslamotors.com/command endpoint is giving lat/long, from what I can tell I can't see the orientation in the (limited) responses. Somehow the Tesla app is actually getting it. Are we missing an endpoint somewhere (or, more likely, am I not doing something right)?
Model 3 and Model S/X with new MCU can not use the stream API. is It a bug for new MCU, or tesla just closed the interface?
 
Hey everyone,

hvrPrAY1aXv2E6Gz5WK7oG0xspap_retina.png


I'm creating an open source Tesla API documentation site: Tesla API - Tesla API.

I'm working on an app for my Tesla and I wanted to have a place that is up to date with all of the latest documentation on the API's instead of digging through these forums. The API is not specific to Vehicles (since Tesla now has a product list API endpoint) but this seems to be the core of where the API discussion is.

If you want to help with updates and corrections, you can submit pull requests on GitHub or edit using GitBook directly on the site.

Cheers,
Joe
 
  • Like
Reactions: tornado
Wh
Hey everyone,

View attachment 325343

I'm creating an open source Tesla API documentation site: Tesla API - Tesla API.

I'm working on an app for my Tesla and I wanted to have a place that is up to date with all of the latest documentation on the API's instead of digging through these forums. The API is not specific to Vehicles (since Tesla now has a product list API endpoint) but this seems to be the core of where the API discussion is.

If you want to help with updates and corrections, you can submit pull requests on GitHub or edit using GitBook directly on the site.

Cheers,
Joe

Just curious as to why you don't spend your time updating the already existent docs by @timdorr instead if spinning your own??

Tims have more Google presence and have links to it scattered all over TMC and the web...

Having two API docs floating around is pointless. If you want documentation that is up to date, why not focus on what already exists?

However I'm happy to be proven wrong, have you attempted any PRs to Tims repo?
 
  • Like
Reactions: SeBsZ
Just curious as to why you don't spend your time updating the already existent docs by @timdorr instead if spinning your own??

Great question. I have 3 reasons.
  1. Development Speed - Im working on a side project to build my own app for my cars/powerwalls and I'm able to move faster without external dependencies.
  2. Branding - Tim's Documentation, like this thread, revolves around Model S branding. When he first released his documentation, that was apt because the X, 3, Powerwall and Energy Site APIs weren't available. I want documentation that supports all of Tesla's products, not just the Model S.
  3. Timeline - Tim has an open issue and discussion from November, 2016 (Updated as recently as May, 2018) describing a process to migrate off API Airy. If there is a migration plan, I don't really want to contribute to something that may need to be re-written. I already spent a few days searching for the best place to host open source docs.

Tims have more Google presence and have links to it scattered all over TMC and the web...

Having two API docs floating around is pointless. If you want documentation that is up to date, why not focus on what already exists?

That is your opinion which is fine.

As a side note, I've heard that exact same comment multiple times even up to recently on Hacker News about a website called gitignore.io that I started 5.5 years ago. They told me that github.com/github/gitignore already had a list of templates, it was ranked higher on Google, it had more GitHub stars, etc... Today my site hosts 60-80k MAU's and multiple open source plugins and IDE integrations built on top of it because while the origins of the project seemed to be the same initially, my project solves creating .gitignore files more efficiently than GitHub. I also have double the amount of templates because the project owners at GitHub/Microsoft have different requirements and rules for what they see as a valid pull request.

However I'm happy to be proven wrong, have you attempted any PRs to Tims repo?

I'm not really into "proving people wrong or right" because it's irrelevant. Once I get my docs ironed out over the next few weeks, I'll submit some PR's back to Tim's docs.

Overall if you don't want to use the docs, that's totally fine, I made them for myself and I'm sharing them to those that want to use them. There are multiple posts in this thread with people commenting about how there is no unified documentation and that you have to scroll through every post to figure out different API calls. This is for those users.
 
Hello everyone.

I am pulling from the /data API and I have noticed that some of the properties of climate_state come back null if the climate control hasn't been used in the car for a while. My code is waking the car up but incomplete climate data. If I go to the car and cause the HVAC to kick on then I get all of the data back. Or if I hit the Tesla app and turn it on. I get data. Any idea how to cause the climate control to report data without turning on the HVAC?

Code snippets if HVAC has been off for a while (I think an hour):
....
"climate_state": {
"inside_temp": null,
"outside_temp": null,
...

Now cause the HVAC to come on manually:
...
"climate_state": {
"inside_temp": 26.4,
"outside_temp": 24,
....

Anything I can do other than start and stop the HVAC in my code? The Tesla App gets the data back without all of the work.

Thanks


Shane
 
@shanescows - I think this is the way that it has always been. Climate returns no data for inside and outside temperatures unless you turn on the climate system. I wrote some code to have my car charging end at a specific time. I wanted to grab the car temperature as cold temperatures in the winter mean that you need to preheat and you can kind of figure out how long you need to preheat from the temp. So I toggled the climate system on, waited ten seconds, and then grabbed the temps.
 
@shanescows - I think this is the way that it has always been. Climate returns no data for inside and outside temperatures unless you turn on the climate system. I wrote some code to have my car charging end at a specific time. I wanted to grab the car temperature as cold temperatures in the winter mean that you need to preheat and you can kind of figure out how long you need to preheat from the temp. So I toggled the climate system on, waited ten seconds, and then grabbed the temps.

Thanks. I was hoping this wasn't the case but if it is then I will roll with it. :)

I am trying to be as lite weight as possible when it comes to extra calls to Tesla.
 
@shanescows - I think this is the way that it has always been. Climate returns no data for inside and outside temperatures unless you turn on the climate system. I wrote some code to have my car charging end at a specific time. I wanted to grab the car temperature as cold temperatures in the winter mean that you need to preheat and you can kind of figure out how long you need to preheat from the temp. So I toggled the climate system on, waited ten seconds, and then grabbed the temps.

I do get temperature when my car is off, sometimes. (HVAC system is not explicitly turned off, but it's not running.) It seems kind of random.

It sounds like @shanescows is saying its working in the app without turning on the HVAC, but not in the REST API. That would be strange. They should work the same.
 
I am also seeing a lot of errors today. Thought it was me. Glad to hear maybe it wasn't something i screwed up. :)

{"response":"authorization_required_for_txid_``}"}

This is when trying to get an auth token from https://owner-api.teslamotors.com/oauth/token

I don't recall ever seeing that error. Most of the errors were happening on Friday. I've only seen a handful of errors since then.