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 Broken (Related to pycarwings2 Library) #117674

Open
remuslazar opened this issue May 18, 2024 · 15 comments
Open

nissan_leaf Integration Broken (Related to pycarwings2 Library) #117674

remuslazar opened this issue May 18, 2024 · 15 comments

Comments

@remuslazar
Copy link

The problem

The Nissan Leaf integration has stopped working since May 17, 2024. The integration is not being initialized correctly, causing all Nissan Leaf entities to remain in the "unavailable" state.

What version of Home Assistant Core has the issue?

core-2024.5.4

What was the last working version of Home Assistant Core?

core-2024.5.4

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

nissan_leaf

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

On init, the integration fails with this error message:

An unknown error occurred while connecting to Nissan: <class 'pycarwings2.pycarwings2.CarwingsError'>

Additional information

It is similar to the issue discussed in pycarwings2 Issue #46, suggesting that the bug is inherent to the pycarwings2 library rather than Home Assistant's integration of it.

@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!

Code owner commands

Code owners of nissan_leaf can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign nissan_leaf Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


nissan_leaf documentation
nissan_leaf source
(message by IssueLinks)

@RogMoe
Copy link

RogMoe commented May 18, 2024

I'm having the same issue.

@mihaicristianpetrescu
Copy link

Same problem over here as well.

@RogMoe
Copy link

RogMoe commented May 18, 2024

I think it has something to do with the latest HA update. I performed that update yesterday and only today I noticed that my Leaf was not (smart)charging. It needs the SoC to start charging. That's how I found out...
The app and their website do work as usual (slow but okay).

@josemi73
Copy link

Same problem, I updated tonight but I think that it was failing from before updating

@remuslazar
Copy link
Author

@RogMoe this issue affects older HA releases as well, not being related to HA itself but to the pycarwings2 library. I was able to fix the root cause by updating the API endpoint address, see filcole/pycarwings2#47.

@RogMoe
Copy link

RogMoe commented May 18, 2024

Yes, you're right. Just restored to HA core_2024.5.3 and that didn't solve the issue.

This may sound like a stupid question, but how is it going to be fixed? Do I need to do enything or stay put and wait for as long as it takes?

@remuslazar
Copy link
Author

@RogMoe, the fix requires a new release of pycarwings2, which will also need to be integrated into the upcoming patch-level release of Home Assistant.

In the meantime, you can update your existing Home Assistant instance by following the instructions provided in this comment: filcole/pycarwings2#46 (comment).

@Hairsy07
Copy link

I tried the fix and it did bring back the Nissan LEAF add-on but it seemed to break my GivTCP Add On. I guess I'll need to await the formal fix.

@Hairsy07
Copy link

Ignore my comment - bizarrely, at the same time that I was executing the suggestion, my router decided to change an IP address that it's never changed before.

@mihaicristianpetrescu
Copy link

mihaicristianpetrescu commented May 25, 2024

UPDATE:
This is caused by latest HA Core update which reverted the URL back to older API version, updated it again and it's working.
Please push the latest URL to HA Core so that it won't revert itself back on future HA Core updates.

Applied the patch, worked for a while, not its broken yet again.

Logger: pycarwings2.pycarwings2
Source: components/nissan_leaf/init.py:156
First occurred: 4:15:01 PM (1 occurrences)
Last logged: 4:15:01 PM

Invalid JSON returned

Logger: homeassistant.components.nissan_leaf
Source: components/nissan_leaf/init.py:164
integration: Nissan Leaf (documentation, issues)
First occurred: 4:15:01 PM (1 occurrences)
Last logged: 4:15:01 PM

An unknown error occurred while connecting to Nissan: <class 'pycarwings2.pycarwings2.CarwingsError'>

@epiniguin
Copy link

I applied the patch.
There is no a pycarwings2 error, but I still receive "An error occurred parsing response from server" from the Nissan Leaf component.
My car is Leaf 2016, the region is Bulgaria.

Env: Docker container

@epiniguin
Copy link

I applied the patch. There is no a pycarwings2 error, but I still receive "An error occurred parsing response from server" from the Nissan Leaf component. My car is Leaf 2016, the region is Bulgaria.

Env: Docker container

It works now. Maybe there was a Nissan server connection problem.

@remuslazar
Copy link
Author

Hi @filcole,

I have fixed the root cause by updating the BASE_URL, see PR #47. Could you please create a new pycarwings release? That would be really helpful! I'm also available to assist with creating a PR for the HA core if needed.

Thanks!

@michael-hermsen
Copy link

? Any update on this?
(Got the same problem)

But was waiting for a Patch.

looks like @filcole is not really Active anymore??

Is this gona be another Dead Repo and so a Dead integration?

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

No branches or pull requests

7 participants