Nissan Leaf Component(s)/Platform

Restart HASS and it should talk to the Leaf again - they merely changed the base URL

1 Like

Thank you! :smiley:

Anything that means I don’t have to open that godforsaken app Nissan made :kissing_heart:

Restart HASS and it should talk to the Leaf again - they merely changed the base URL

I’m afraid that didn’t work for me on hass.io. I am not getting any data from the car.
Can I make this change manually as well?

Sorry, I don’t use HASS.io so cannot advise.

Maybe you could enlighten me where (in which file) the API URL is stored and what the change was exactly?

I’ll try to make the change manually then.

Thanks!

I just upgraded to 0.84.6 and all values are now blank. But climate seems to work?!?

yup, I’m on 0.84.6 as well.

Not sure I’m afraid, the change is part of pycarwings2 not the actual component

I haven’t found any changes to pycardwings2 in the last 7 months though?!?

Am I looking at the wrong version of pycarwings2? Anyone know which one is being used in hass?

It uses my fork, as the original author hasn’t updated it in ages

95% … No 99% of the issues that we are experiencing are down to Nissans servers, I can log onto my account using my PC, but I can’t get any information (flash is enabled).

There are other Android Apps that you can use to connect to ‘your car’ for checking battery, other stats and also start the aircon, they can also be used to check the servers.

You will see that Nissans servers are down as often as they are working. Check the servers using an alternative and leave poor Ben alone :wink:

Nissan’s servers are intermittently down, when you try to pull battery info it goes into a loop of waiting for data. This isn’t something I was able to test against so I’m going to promptly update the code as it hangs HASS right now.

I would recommend you all to update it ASAP when I have done so.

Here we go people: https://github.com/BenWoodford/home-assistant/blob/nissanleaf/homeassistant/components/nissan_leaf.py

Update your core nissan_leaf.py and you should get HASS back. I’ve just made it so that it’ll not try more than 4 times during an interval to poll Nissan’s servers. What I should really do is start the request in the car update cycle (the 5/10/30 minute one) and then poll for the response in the check interval (which is every 10 seconds) so that it doesn’t hang HASS when Nissan’s servers are being rubbish. This is a hotfix though, I don’t really have time to redo how I’m handling things right now so best to just get something out quickly to fix things short-term.

1 Like

Even with these changes, it still won’t work.

configuration.yaml

nissan_leaf:
  username: "[email protected]"
  password: "XXXXXXX"
  nissan_connect: true
  region: 'NE'
  update_interval: 30
  update_interval_charging: 10
  update_interval_climate: 5
  force_miles: false

Base URL in pycarwings2:

BASE_URL = "https://gdcportalgw.its-mo.com/gworchest_160803EC/gdc/"

The airco switch and charge switch work and actually switch on the airco, but I am not getting any data.

Nissan have royally messed up (again), their dev team deployed at Christmas time which is never a good idea so now we’re stuck waiting.

It’s on their end, I can’t debug the library until Nissan actually fix their stuff. Even the official app is busted

1 Like

Yeah, I saw the crappy pop-up from their crappy app and I instantly thought: “This will break the Home Assistant component” lol. Gosh. Really happy with your help Ben as I’m planning to learn Python this year so I can contribute as well.

Hey @BenWoodford, I’ve already emailed Nissan the other day for what it’s worth, hopefully they will get it sorted soon.

Hi All,

I’ve absorbed all the excellent work that @BenWoodford and @kurol have done. It includes an updated URL that’s also used by dartcarwings and the awesome “My Leaf” mobile app.

I’ve updated pycarwings2 to include all the fixes I can find on the internet and released it to PyPi. I’ve extended the original pull request created by @BenWoodford to hopefully cater for the async.io changes that impacted HomeAssistant.

I’ve submitted pull request 19786 which still needs a lot of love, hence marked as WIP. Hopefully we can get this in shape to be included into HomeAssistant proper.

2 Likes

Probably great stuff @filcole … but what does any of that mean? :blush: