jdhorne / pycarwings2

Apache License 2.0
66 stars 65 forks source link

Vehicle location request? #15

Closed rduivenvoorde closed 6 years ago

rduivenvoorde commented 7 years ago

In the official Nissan app I can search for the location of my vehicle (Leaf 2016, 30kWh, takes some time etc etc, but eventually the position appears on the map).

Is this an api call that can be added? Did/can you try? Would be cool to regularly update the position of the leaf on a map :-)

Thanks!

dedwards66 commented 7 years ago

I was hoping to add this. Leaf Manager can do this as well.

jdhorne commented 7 years ago

I don't see how to do this in the official app. Where is that "search" functionality?

I have a 2014 Leaf, so it could be that it was added in 2015 or 2016.

ralin3 commented 7 years ago

Leaf manager does this when your phone is paired with the car. Upon disconnect it uses the phone to get current location. This is not possible via the car alone.

On Sat, Jul 22, 2017, at 02:48, Jason Horne wrote:

I don't see how to do this in the official app. Where is that "search" functionality?> I have a 2014 Leaf, so it could be that it was added in 2015 or 2016.> — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub[1], or mute the thread[2]. >

Links:

  1. https://github.com/jdhorne/pycarwings2/issues/15#issuecomment-317148932
  2. https://github.com/notifications/unsubscribe-auth/ABssJtq-sLf3ksrSNywyPvI6rvtZYoqxks5sQWL8gaJpZM4M3_Gl
rduivenvoorde commented 7 years ago

@ralin3 you are right, my phone is paired (bluetooth) to the car.

BUT if my wife drives the car on the other side of the country I can (in Leaf Manager) see where she drives. So: it would be fine if it only would work for paired phones too... Or does this make it impossible to use the phone id to get the possition?

ralin3 commented 7 years ago

I also have leaf manager, and I dont have this functionality. Where is it?

On Sat, Jul 22, 2017, at 10:55, Richard Duivenvoorde wrote:

@ralin3[1] you are right, my phone is paired (bluetooth) to the car.> BUT if my wife drives the car on the other side of the country I can (in Leaf Manager) see where she drives. So: it would be fine if it only would work for paired phones too... Or does this make it impossible to use the phone id to get the possition?> — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub[2], or mute the thread[3]. >

Links:

  1. https://github.com/ralin3
  2. https://github.com/jdhorne/pycarwings2/issues/15#issuecomment-317175542
  3. https://github.com/notifications/unsubscribe-auth/ABssJrV86PlPCla_giWc6Smi-Drr5TMbks5sQdUcgaJpZM4M3_Gl
dedwards66 commented 7 years ago

It appears to be a a separate request in the official app. There is a search tab on the bottom of the screen that allows you to request the cars location. The Leaf Manager has a button on the bottom of the home page that says show last location. So it is probably a separate request being sent to Nissan.

dedwards66 commented 7 years ago

Also I can track the cars location when my wife drives the car and her phone is not paired to the car. 2016 Nissan Leaf SV 30 kWhr battery.

ralin3 commented 7 years ago

I dont have that button at all, anywhere in my app. This is either something that's specific to your car/modell that LM can detect, or I have misconfigured something somewhere.

On Sat, Jul 22, 2017, at 12:42, dedwards66 wrote:

Also I can track the cars location when my wife drives the car and her phone is not paired to the car.> 2016 Nissan Leaf SV 30 kWhr battery.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub[1], or mute the thread[2]. >

Links:

  1. https://github.com/jdhorne/pycarwings2/issues/15#issuecomment-317181152
  2. https://github.com/notifications/unsubscribe-auth/ABssJv5ReIa-j9OAxX4nv809z3mn6uZvks5sQe5PgaJpZM4M3_Gl
rduivenvoorde commented 7 years ago

For reference, the Nissan Connect Home page for me (also Nissan 30 kWh, 2016), most right bottom/tab:

nissanconnecthome

And the actual Search screen with current location:

nissanconnectwhere

dedwards66 commented 7 years ago

From the Nissan Connect website, it uses this link to request a location update https://www.ev.nissanconnect.com/EV/mycar/mycar_finder#

Looking at the javascript that link seems to submit a form like this (I replaced the token with 'x') action="/EV/mycar/mycar_finder_request">

I wonder if the phone app uses a different link or method.

I also found code that checks to see if the cars VIN number allows for google voice. If yes, it requests more to display on the web page.

glynhudson commented 7 years ago

I don't think this feature works for a 24Kwh 2014 leaf? Or at least I can't see the option to find the car in my app. I'm in the UK

On 29 July 2017 at 19:59, dedwards66 notifications@github.com wrote:

From the Nissan Connect website, it uses this link to request a location update https://www.ev.nissanconnect.com/EV/mycar/mycar_finder#

Looking at the javascript that link seems to submit a form like this (I replaced the token with 'x')

I wonder if the phone app uses a different link or method.

I also found code that checks to see if the cars VIN number allows for google voice. If yes, it requests more to display on the web page.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jdhorne/pycarwings2/issues/15#issuecomment-318851423, or mute the thread https://github.com/notifications/unsubscribe-auth/AAuUPJnipVz_wIqqShSvAcgNs9VcHwX6ks5sS4EBgaJpZM4M3_Gl .

-- Glyn Hudson

http://megni.co.uk http://adventuresplusnorthwales.blogspot.com

jdhorne commented 6 years ago

I've committed a change that provides this support, though it still doesn't seem to work with my 2014 model.