jsgoecke / tesla

Provides a wrapper around the API to easily query and command a Telsa car. As of now this has been used with a Model S, a Model X, and a Model 3.
MIT License
325 stars 73 forks source link

How can I abort summon #8

Closed gitbisect closed 8 years ago

gitbisect commented 8 years ago

Hi @jsgoecke

I was able to get the commands for autopark_forward and autopark_reverse from your repo. I forked timdorr's repo and added the functions for these two as shown below. It works fine. But I could not figure out how to abort/stop the summon. I dont know how to sniff the packets on the phone app. Do you know what command and parameters are sent when summon is stopped?

Thanks John

def autopark_forward ds = nil while ds.nil? do ds = drive_state end lat= ds['latitude'] lon = ds['longitude'] vid = id action = 'start_forward' command("autopark_request", body: {vehicle_id: id, lat: lat, lon: lon, action: action}) end

jsgoecke commented 8 years ago

Looks like you are using the Ruby library there. There is a way to do it, but I have not determined exactly how to do it or implemented on the library. I will take this as a feature request and see what we may do.

gitbisect commented 8 years ago

How did you discover the autopark_reverse and autopark_forward functions (along with the parameters?)

On May 23, 2016, at 6:40 AM, Jason Goecke notifications@github.com wrote:

Looks like you are using the Ruby library there. There is a way to do it, but I have not determined exactly how to do it or implemented on the library. I will take this as a feature request and see what we may do.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/jsgoecke/tesla/issues/8#issuecomment-220983049

jsgoecke commented 8 years ago

Googling and finding other libraries. I did try a man in the middle for the app, but Tesla started doing certificate pinning so that no longer works. So I believe those out in the community are de-compiling the Java app and and determining how it works that way.

gitbisect commented 8 years ago

Thanks Jason.

On May 23, 2016, at 11:46 AM, Jason Goecke notifications@github.com wrote:

Googling and finding other libraries. I did try a man in the middle for the app, but Tesla started doing certificate pinning so that no longer works. So I believe those out in the community are de-compiling the Java app and and determining how it works that way.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/jsgoecke/tesla/issues/8#issuecomment-221054161

gitbisect commented 8 years ago

Looks like the action is “abort”. It looks like timdorr himself has posted this here. https://teslamotorsclub.com/tmc/posts/1337610/

I’ll test it when I get home today.

Update: Yes, I was able to verify it. The action is indeed 'abort'

On May 23, 2016, at 11:46 AM, Jason Goecke notifications@github.com wrote:

Googling and finding other libraries. I did try a man in the middle for the app, but Tesla started doing certificate pinning so that no longer works. So I believe those out in the community are de-compiling the Java app and and determining how it works that way.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/jsgoecke/tesla/issues/8#issuecomment-221054161