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

Nissan Leaf integration fails #65464

Closed
drewzarn opened this issue Feb 2, 2022 · 5 comments
Closed

Nissan Leaf integration fails #65464

drewzarn opened this issue Feb 2, 2022 · 5 comments

Comments

@drewzarn
Copy link

drewzarn commented Feb 2, 2022

The problem

The Nissan Leaf integration fails with a CarwingsError

What version of Home Assistant Core has the issue?

core-2022.2.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Nissan Leaf

Link to integration documentation on our website

https://www.home-assistant.io/integrations/nissan_leaf/

Example YAML snippet

nissan_leaf:
  username: "REDACTED"
  password: "REDACTED"
  region: "NNA"
  update_interval:
    hours: 1
  update_interval_charging:
    minutes: 15
  update_interval_climate:
    minutes: 5
  force_miles: true

Anything in the logs that might be useful for us?

2022-02-02 16:13:29 DEBUG (SyncWorker_0) [homeassistant.components.nissan_leaf] Logging into You+Nissan
2022-02-02 16:13:29 DEBUG (SyncWorker_0) [pycarwings2.pycarwings2] invoking carwings API: https://gdcportalgw.its-mo.com/api_v210707_NE/gdc/InitialApp_v2.php
2022-02-02 16:13:29 DEBUG (SyncWorker_0) [pycarwings2.pycarwings2] params: {
   "RegionCode": "NNA",
   "custom_sessionid": "",
   "initial_app_str": "9s5rfKVuMrT03RtzajWNcA",
   "lg": "en-US"
}
2022-02-02 16:13:30 DEBUG (SyncWorker_0) [pycarwings2.pycarwings2] Response HTTP Status Code: 200
2022-02-02 16:13:30 DEBUG (SyncWorker_0) [pycarwings2.pycarwings2] Response HTTP Response Body: b'{"status":200,"message":"success","baseprm":"88dSp7wWnV3bvv9Z88zEwg"}'
2022-02-02 16:13:30 DEBUG (SyncWorker_0) [pycarwings2.pycarwings2] invoking carwings API: https://gdcportalgw.its-mo.com/api_v210707_NE/gdc/UserLoginRequest.php
2022-02-02 16:13:30 DEBUG (SyncWorker_0) [pycarwings2.pycarwings2] params: {
   "Password": "REDACTED",
   "RegionCode": "NNA",
   "UserId": "REDACTED",
   "custom_sessionid": "",
   "initial_app_str": "REDACTED"
}
2022-02-02 16:13:33 DEBUG (SyncWorker_0) [pycarwings2.pycarwings2] Response HTTP Status Code: 200
2022-02-02 16:13:33 DEBUG (SyncWorker_0) [pycarwings2.pycarwings2] Response HTTP Response Body: b'{"status":"-2010","message":"INVALID PARAMS"}'
2022-02-02 16:13:33 ERROR (SyncWorker_0) [pycarwings2.pycarwings2] carwings error INVALID PARAMS: -2010
2022-02-02 16:13:33 ERROR (SyncWorker_0) [homeassistant.components.nissan_leaf] An unknown error occurred while connecting to Nissan: <class 'pycarwings2.pycarwings2.CarwingsError'>

Additional information

No response

@probot-home-assistant
Copy link

nissan_leaf documentation
nissan_leaf source
(message by IssueLinks)

@probot-home-assistant
Copy link

Hey there @filcole, mind taking a look at this issue as it has been labeled with an integration (nissan_leaf) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@drewzarn
Copy link
Author

drewzarn commented Feb 3, 2022

Should've mentioned, both the Nissan EV&Services app and My Leaf app work fine with my credentials. I'm located in the US with a 2019 SV+

@hoverduck
Copy link

I went down a rabbit hole on this recently and came across this blog post - https://tobis.dk/blog/open-letter-nissan-resistance-is-futile/. Seems like NissanConnect in North America now uses a different authentication scheme than the rest of the world. I was able to use the dart script in his example repository (after adding a User Agent to the login function call), but I haven't been able to take the time to read through that code and see how it can be adapted to Python for HA. But in the meantime hopefully this will help point somebody else in the right direction 🤞

@github-actions
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label May 21, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jun 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants