Nissan Leaf Component(s)/Platform

That’s great, easy to get them up and running.

I’m not using MQTT from node red though, I’m using the HA addons so I’m creating/updating the entities directly based on the payload in node red. What I found is that the order of the payloads are different from time to time, e.g hvac_status path is first time payload[0].payload but the next time it’s payload[2].payload which makes it hard to use in the entity node.

I can of course use the mqtt topics and then create the entities from there, but that’s an extra step and I’m trying to avoid that if possible.

ok, that’s not an issue when you’re using mqtt. But you could easily remove the split-Node in the subflow and edit the function (make an object instead of an array).

Yep, I’m fairly experienced in HA but Node red is new, I found the stuff yesterday and started to do the changes.

One last question, when setting up the SAML session, is that triggered every time anything else is triggered or is that something that is done only on regular intervals?

Authentication ist triggered every hour. See the timestamp-Node in the Session-Section.

Does this support (or will support) older CarWings non-USA Leaf?
The LEAF_TYPE value only has “newerThanMay2019, olderCanada or olderUSA”.

I have a 2014 UK built CarWings Leaf 24kWh. I use NE for region in the official integration.

This thread was started as a component for the 2011-2015 Carwings, however the thread has been taken over users of cars built after Carwings.

The Carwings version of the Nissan Leaf Component can be found here and is part of HA already.

I hope that answers your question.

@wyx087, not yet since I am missing an implemention for the password encryption in blowfish in Dart.

Meanwhile, you can use the official Leaf integration as @RoadkillUK mentionned.

Thanks, both. The official integration doesn’t update for me. Strangely it always works and pulls in new values when I restart HA. But all other times it would give me CarWings error, status 408. Climate and start charging works, only car status update doesn’t.

So I was hoping I can add this mqtt integration to get the % reading in addition to official one for everything else (disable updates on the official one).

Just picked up my new Leaf today. It’s a 2020 model Acenta. I have been told by Nissan Customer Services to use the new NissanConnect Services app rather than the older app. App works fine but I am getting a

 An unknown error occurred while connecting to Nissan: <class pycarwings2.pycarwings2.CarwingsError'> and carwings error INVALID PARAMS: -2010

in my logs when I restart Home Assistant. Is this integration compatible with my Leaf?

Hi,

I have 2 leafs 30kWh from 2016/2017 registered and working on NisannConnectEV but on homeassistant only 1 is showing.

Some one already try to configure 2 cars on same account?

Thanks

Unlikely I’m afraid, that’s probably on the new backend service which warrants a new integration

You’re in a bit of a niche there, as it requires someone with two cars on their account to develop and test it. I did build it out to work in theory but I guess it didn’t?

Are the cars named differently in the app?

Hi,

In the APP the cars have names “Leaf1nfra” and “Leaf2NFRA”.

Using the “pycarwings2” examples directly e see some info about the second car but not all of it.

If you or someone wants to try I can provide my account details for help on develop, no problem.

Do you want to try?

Don’t really have time to actively develop this right now I’m afraid.

If you know someone that can help fixing that please tell me.
I can help but I cannot do it myself alone unfortunately.

Is asking to much to you to open this “issue” on the HA development if some one are able to help fixing this?
I can try to do that but for sure you have a lot more good inputs to add on it.

Thanks

Just updated to 2021.4.3, and the Nissan Integration didn’t load. So I found this thread, and just followed @andbad 's advice. Reboot. Now it works again on 2021.4.3

Yes, sometimes happens. :slight_smile:

By(t)e

This was working fine for me until I decide to make my Cloudflare Access a bit more secure.

Is there a way to know what server Is used (Or the IP range or at least the geo?)

Otherwise, and that would be a better solution, Cloudflare Access allow to bypass based on the URL, just wondering if anybody already tried this?

For an AZE1 new-shape LEAF, you could try my solution or @Sriracha’s fork. Not a full integration, but works well here.

2 Likes

I have this problem again.
I resolve in the same way of previous time. I edited the file
homeassistant/lib/python3.8/site-packages/pycarwings2/pycarwings2.py

at line 125:
headers={"User-Agent": "pycarwings2/2.10"}

with this:
headers={"User-Agent": ""}

By(t)e

4 Likes