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.
Changing Climate: Hey guys asking this again: This thread is so large and I did see some notes about it , but can't figure out what I am missing. I am calling the "set_temps" call in my mobile app and no matter what or how I pass the values the temp always just goes to "LO"

I have tried passing the driver_temp and passenger_temp as parameter.
I have tried passing in the body
I have tried hard coding the values
I have tried passing as characters and numbers.

I'm stumped. What am I missing here?

Thanks ahead of time for any suggestions.
 
Changing Climate: Hey guys asking this again: This thread is so large and I did see some notes about it , but can't figure out what I am missing. I am calling the "set_temps" call in my mobile app and no matter what or how I pass the values the temp always just goes to "LO"

I have tried passing the driver_temp and passenger_temp as parameter.
I have tried passing in the body
I have tried hard coding the values
I have tried passing as characters and numbers.

I'm stumped. What am I missing here?

Thanks ahead of time for any suggestions.

What parameters/headers are you sending? and you are sending them in C and not F right?
 
What parameters/headers are you sending? and you are sending them in C and not F right?
Use I am sending in C.

I am passing the access token in the header
here is a section of my code thatnI am using with the temp hard coded right now as 25.

HTML:
return this.httpService.postRequest(this.apiUrl + "/vehicles/" + vehicleId + "/command/set_temps?driver_temp=25.00&passenger_temp=25.00",null,this.userLoginDtls.accessToken)
      .map((response) => {
        console.log('after call', response);
        return response;
      })
      .catch((error) => {
        console.log(' ***ERROR**** ' + error);
        throw error;
      });
  }
 
Changing Climate: Hey guys asking this again: This thread is so large and I did see some notes about it , but can't figure out what I am missing. I am calling the "set_temps" call in my mobile app and no matter what or how I pass the values the temp always just goes to "LO"

I have tried passing the driver_temp and passenger_temp as parameter.
I have tried passing in the body
I have tried hard coding the values
I have tried passing as characters and numbers.

I'm stumped. What am I missing here?

Thanks ahead of time for any suggestions.


Make sure your sending the content type as
Code:
application/x-www-form-urlencoded
 
Does anyone on here have working code for Summon?

I have an update on this. Summon has been working and remained relatively unchanged for over a year until the latest car firmware update - 2018.6.1 641efac.

Now I'm seeing it start up, turn the wheel a bit but refuse to move as you've described. I haven't looked into it yet at all or tested and sniffed the official app and this might just be a fluke, but I did see a message that the car thought it was plugged in which is why it refused to move. I'll know more once I can dig into it later.
 
How to receive the information that a new software version is available (in the car)?
Tesla App shows a popup, how can I find it in the REST API?
There is no way to get the new software alert via REST API. That is done through push notification, and is a seperate service. @SG57 made a post about it. Essentially you need to register your device with Tesla's API, and it starts sending push notifications.
 
Sunroof Questions:
When calling the "vehicle state" api all I see for the sunroof are:
  1. sun_roof_percent_open:null
  2. sun_roof_state:"unknown"
I don't have a sunroof,but trying to code for it. From what I read here all you can do is "vent" and "close". How do I determine from the API if a sunroof exists? Can someone share from there car with a sunroof. I see in the docs this value ( "sun_roof_installed": false) , but it is not returned for me.
 
Sunroof Questions:
When calling the "vehicle state" api all I see for the sunroof are:
  1. sun_roof_percent_open:null
  2. sun_roof_state:"unknown"
I don't have a sunroof,but trying to code for it. From what I read here all you can do is "vent" and "close". How do I determine from the API if a sunroof exists? Can someone share from there car with a sunroof. I see in the docs this value ( "sun_roof_installed": false) , but it is not returned for me.
If roof color = none or glass then vehicle does not have sun roof
 
Hello,

Would anyone be able to provide payload from a
Code:
/api/1/vehicles/
request? I'm looking for two or more vehicles to test multi-vehicle support on my application.

Any help is greatly appreciated!
Am on mobile so can't provide much help, but essentially the api sends one json array for each vehicle. At the bottom of l the arrays is one more field called 'count' which holds the total number of vehicle arrays present
 
Am on mobile so can't provide much help, but essentially the api sends one json array for each vehicle. At the bottom of l the arrays is one more field called 'count' which holds the total number of vehicle arrays present

Thanks for the info. I'm guessing my problem is in the JSON array that's sent. I can get the number of vehicles with the count field, as you stated, but cannot seem to access the data from the second or third vehicles, only the first.
 
Thanks for the info. I'm guessing my problem is in the JSON array that's sent. I can get the number of vehicles with the count field, as you stated, but cannot seem to access the data from the second or third vehicles, only the first.
Then that is a problem with your json parsing library :)

If you PM me I can share my visual basic code which might steer you in the right direction if your own program language is object orientated.