andrewfang / blog

2 stars 0 forks source link

blog/how-to-control-tesla-with-siri/ #2

Open utterances-bot opened 1 year ago

utterances-bot commented 1 year ago

How to control Tesla with Siri | DIY with Andrew

Performing Tesla controls (such as opening the trunk) with Siri via Shortcuts

https://andrewbfang.com/blog/how-to-control-tesla-with-siri/

dhallager commented 1 year ago

Hi Andrew, thank you for the post and code! This is the first time a Tesla shortcut has ever worked for me. However, my wife and I both have a Tesla on the same account and I cannot seem to control which vehicle the shortcut works on. It is always the same. When I share a destination from Gmap it goes to whatever vehicle I interacted with on the Tesla app last. Can you think of s solution? BR Dennis

andrewfang commented 1 year ago

@dhallager seems like there's two things going on here.

First, having the shortcut work on one particular car, you can add a &id= parameter to your query. In order to get your ID, you'll have to use the Tesla-info website: https://tesla-info.com/tesla-token.php. Follow that link, step 1 will take you to Tesla OAuth page. Once you log in successfully, it should lead you to a page not found. That's okay, copy that URL, and paste it back in the Tesla-info page in step 3. Then, you should find the IDs of each of your vehicles. Then, you can do something like:

https://tesla-info.com/api/control_v2.php?token=qts-abcdefghijklmnopqrstuvwxyz&id=123456789&request=charge

Second, sharing a destination from Gmaps -- from what I've read on forums, the share action sends it to whichever car you have "in focus" for your Tesla app. Unfortunately, this means if you regularly use both cars from each phone, the only way to work around this is by going into the Tesla app first, choosing the car, and then sharing the address.

dhallager commented 1 year ago

Hi Andrew,Thank you so much for your response!I followed the first steps and got the token, ids and refresh token.Where do I add the ID information in the shortcut?I am a novice at this and I could not open the last link in your reply.BR, DennisDen 15. jan. 2023 kl. 02.07 skrev Andrew Fang @.***>: @dhallager seems like there's two things going on here. First, having the shortcut work on one particular car, you can add a &id= parameter to your query. In order to get your ID, you'll have to use the Tesla-info website: https://tesla-info.com/tesla-token.php. Follow that link, step 1 will take you to Tesla OAuth page. Once you log in successfully, it should lead you to a page not found. That's okay, copy that URL, and paste it back in the Tesla-info page in step 3. Then, you should find the IDs of each of your vehicles. Then, you can do something like: https://tesla-info.com/api/control_v2.php?token=qts-abcdefghijklmnopqrstuvwxyz&id=123456789&request=charge

Second, sharing a destination from Gmaps -- from what I've read on forums, the share action sends it to whichever car you have "in focus" for your Tesla app. Unfortunately, this means if you regularly use both cars from each phone, the only way to work around this is by going into the Tesla app first, choosing the car, and then sharing the address.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

andrewfang commented 1 year ago

@dhallager you'll need to go into the shortcut and find the place that has

https://tesla-info.com/api/control_v2.php?refresh={token}&request={command}&value={value}

and you should update it to

https://tesla-info.com/api/control_v2.php?refresh={token}&request={command}&value={value}&id={carId}

replacing {carId} with the ID you got from the page.

dhallager commented 1 year ago

Thank you so much!Den 15. jan. 2023 kl. 23.49 skrev Andrew Fang @.***>: @dhallager you'll need to go into the shortcut and find the place that has https://tesla-info.com/api/control_v2.php?refresh={token}&request={command}&value={value}

and you should update it to https://tesla-info.com/api/control_v2.php?refresh={token}&request={command}&value={value}&id={carId}

replacing {carId} with the ID you got from the page.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>