Tesla API Access


#22

Edit: Sorted now, used another browser.


#23

Your piston works fine. Did you remember to create the three global variables (@accessToken, @tokenExpiration, and @vehicleID)? Make sure the names match exactly, including capitalization.


#24

Iā€™ve edited the green image now!

How do I create the global values? Iā€™m not sure I did I thought I only needed to add my e-mail and password.

Edit: Ahhh you need to add those to the ā€œglobal variablesā€ box in the top right. Now it makes sense! Thanks


#25

Hi iā€™m looking to control heat seat. Iā€™m unable to send parameter.

piston work for command without parameter.

thanks


#26

Although I havenā€™t tried that particular command, the request is pretty straightforward. When you create your web request, use POST and set variables for heater and level.

/api/1/vehicles/{id}/command/remote_seat_heater_request


#27

Hi @bthrock, sorry to bother you but I need some guidance on the execution of the second piston. I ran the first piston successfully since all global variables were populated but when running the second one, it seems that itā€™s returning an error (I was hopping it would log the charge state, battery level, etc). I took a screenshot of the log for your reference. Is there something I am doing wrong? Any help would be appreciated. Thanks again!


#28

Hard to tell from just that small section of the log. Have you modified the piston other than to enter your email and password? If so, provide the import code (after deleting your email and password, of course) and Iā€™ll take a look.


#29

Thanks again @bthrock. I didnā€™t make any extensive changes to the two pistons. I updated my username and password as well as created the three global variables. The first piston works flawlessly as I am able to see the accessToken, tokenExpiration, and vehicleID populate. The issue I am running into is from the second piston as it seems to be timing out when trying to obtain the state of the car. The two piston codes are as follows:
Populate Variable - 5i0o8
Obtain Car Status - nb2e

I can also send you the full log if that helps. Just let me know.

Thanks again!


#30

I imported nb2e and it worked normally for me, with no errors. What is the full text of error message youā€™re getting?


#31

Thanks again @bthrock. I deleted the log as you recommended. I copied the error log and the error is:
+1084ms ā•‘Error executing external web request: groovyx.net.http.HttpResponseException: Request Timeout

It looks like itā€™s returning a response of sorts since I can see my carā€™s name but it doesnā€™t anything regarding to the state of the car. I also see ā•‘[null, null, null] on the log as well but I believe this might be related to the timeout. If you want I can dm or email you the log.

Thanks again!


#32

And youā€™re getting the Timeout error every time you run the piston? If so, PM me the full log and Iā€™ll take look.


#33

Yes, it is every time I run the piston. Iā€™ll dm you the log.Thanks again!


#34

It appears you have multiple Tesla vehicles or products. I suspect the first piston is not parsing and setting @vehicleID correctly.


#35

Yes my friendā€™s model 3 is in my account as well. But looking at the log it is populating the 17 digit vehicle id (id_s) correctly. Is your @vehicleID 17 digit as well?

Thanks!


#36

Yes, I still suspect a parsing issue somewhere. Have to take a closer look when Iā€™m back at my desktop.


#37

Appreciate the assist @bthrock. Please let me know if you need me to try anything else. Thank you again for all your help!


#38

When I did the initial work, I only had the Model 3. We were getting ready to add the Model Y, then some bug starte going around messing with life. Hopefully when things settle down.

Somewhere, I suspect, I did not account for the possibility of multiple vehicles because I had no data to work from. I may need a temporary username/password to work from, if youā€™re comfortable with that. But let me look closer before we even discuss that possibility.


#39

Of course. Thanks again @bthrock. Just let me know if you need it. I can provide the info and just change it after you are done with the testing.

Thanks!


#40

Iā€™ve updated the example pistons at the top to work with multiple vehicles on a single Tesla account. Thanks for the assist so that I could work through this!


#41

@bthrock Hi Iā€™m trying to send climate command. like change the temperature to 25c. but it does not work.

cant you help