Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Leaf 2019 Protocol #29

Open
cedric222 opened this issue Aug 29, 2019 · 15 comments
Open

New Leaf 2019 Protocol #29

cedric222 opened this issue Aug 29, 2019 · 15 comments

Comments

@cedric222
Copy link
Contributor

Hi,

I replace my old leaf 2016, with a very new 2019, and the new apps is "Nissan Connect Services" and no more "Nissan Connect EV".
Unfortunately, I have now a http 408 error with nissan-connect-php... do you know if someone already try to reverse engineering this new apps ?

thanks

cedric

@Raiden38
Copy link
Contributor

Use the New API, I have a 2018 and it works fine!

@gboudreau
Copy link
Owner

@cedric222
Copy link
Contributor Author

I will try. @Raiden38 do your cars works with "Nissan Connect Services" ? ( and not "Nissan Connect EV" ) Since April 2019, and the new 8 inch screen, seems there is some change.

@Raiden38
Copy link
Contributor

It written Nissan Connect EV & Services lol. Should be the latest version. I have the 8 inch screen also. Try the new API and let us know

@howartp84
Copy link

2019 uses a new API from May onwards ("Nissan Connect Services"), which nobody has yet decoded and implemented yet to my knowledge. Tobias at MyLeaf is on with it, with my credentials for testing.

@cedric222
Copy link
Contributor Author

Sorry for the delay ! I don't have many time recently

Thanks @howartp84 for the info, let us know.

I test with the branch "new-api", and the result here is
[2019-09-29 00:09:39][DEBUG] : [NissanConnect] Request: POST https://gdcportalgw.its-mo.com/api_v190426_NE/gdc/InitialApp_v2.php {"custom_sessionid":"","initial_app_str":"9s5rfKVuMrT03RtzajWNcA","RegionCode":"NE","lg":"en-US","DCMID":"","VIN":"","tz":"Europe/Paris"}
[2019-09-29 00:09:49][DEBUG] : [NissanConnect] Response: {"status":200,"message":"success","baseprm":"88dSp7wWnV3xxxxxxxxxxx"}
[2019-09-29 00:09:49][DEBUG] : [NissanConnect] Request: POST https://gdcportalgw.its-mo.com/api_v190426_NE/gdc/UserLoginRequest.php {"UserId":"[email protected]","Password":"toto","custom_sessionid":"","initial_app_str":"9s5rfKVuMrT03RtzajWNcA","RegionCode":"NE","lg":"en-US","DCMID":"","VIN":"","tz":"Europe/Paris"}
[2019-09-29 00:09:53][DEBUG] : [NissanConnect] Found resultKey in response:
[2019-09-29 00:09:53][DEBUG] : [NissanConnect] Request for 'UserLoginRequest.php' failed. Response received: {"status":"-2010","message":"INVALID PARAMS","resultKey":""} Will retry.
[20

The good new is the 2019 official apps is now usable, you can start heater in less then 20 seconds.. ( was more than 2 minutes with the 2016 Leaf apps )

@gboudreau
Copy link
Owner

gboudreau commented Sep 30, 2020

I am myself using the new-api branch, which stopped working a while ago (see #32).
The master branch, I can't use for quite a while. Not sure if it is working for anyone.

@andig
Copy link

andig commented Oct 24, 2020

I'm developing a PV-controlled EV charger at https://github.com/andig/evcc and would like to support the newer Nissans. If I understand correctly the protocol has not been decoded yet? Are you aware of gboudreau/LEAF_Carwings_EasyAccess#8 (comment) and does that work? Also here is an explicit reference to Nissan Connect which seems to be the "new" api: https://github.com/Tobiaswk/dartnissanconnectna

@gboudreau
Copy link
Owner

gboudreau commented Oct 24, 2020

@andig The correct code to use to connect to the API might depend on region (EU, North America, Japan), and MY of the LEAF. I'm in Canada, have a 2011 MY, and was using the new-api branch until it stopped working a while ago. I didn't take the time to reverse engineer the Android app, to see what was wrong with my code.
I was recently told that the code available at https://gitlab.com/tobiaswkjeldsen/carwingsflutter is working. You might look there to get a working code example; I didn't yet take the time to look myself.

@gboudreau
Copy link
Owner

Follow up: so the new-api branch is working now; that branch should fix it for North America (it is working for my 2011 MY in Canada).
For 2019+, I think a completely different API is required, but I'm not sure if it applies worldwide, or only in specific regions.
Anyone has a 2019+ LEAF, and could test the new-api branch, and report if it works, and in which region they are?

@gboudreau
Copy link
Owner

OK, so I guess you'd need completely new code, something like this: https://github.com/Tobiaswk/dartnissanconnect/tree/master/lib/src
That code connects to Kamereon platform in EU.
If anyone wants to modify the code to replicate Tobiaswk's code, I'd be happy to review any PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@andig @gboudreau @Raiden38 @cedric222 @howartp84 and others