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!