Edit: Sorted now, used another browser.
Tesla API Access
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.
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
Hi iām looking to control heat seat. Iām unable to send parameter.
piston work for command without parameter.
thanks
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
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!
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.
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!
I imported nb2e and it worked normally for me, with no errors. What is the full text of error message youāre getting?
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!
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.
It appears you have multiple Tesla vehicles or products. I suspect the first piston is not parsing and setting @vehicleID correctly.
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!
Yes, I still suspect a parsing issue somewhere. Have to take a closer look when Iām back at my desktop.
Appreciate the assist @bthrock. Please let me know if you need me to try anything else. Thank you again for all your help!
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.
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!
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!