Integration for NissanConnect Services

Hi,

im on the Same Boat, only need the SOC From my new ze1 Leaf.

I tried to Log the Traffic From the Connect App to find some Hints where WE find the right Endpoint for the SOC without Success.

What can i provide to find the right Function ?

1 Like

Do you also see the endpoints from the PCAP? Can you share a full set of data for one request, maybe we can get onto something?

Hi,

unfortunately, the export doesn’t give much, I think the best way would be to search for the right function directly on the API using the login data of a Leaf user. I tried it once via Postman but had little success. Dart seems to be much more complex than the standard REST APIs. We need someone who has specialist knowledge of Dart and could then provide them with the access data so that they can view the API. Unfortunately, I can’t quite figure it out myself.

I tried to uninstall node-red completely → Reboot HA → ensure directories was deleted.
Re-Installed Node-Red and importet [NissanConnect-HomeAssistant
Changed credentials on Set Flow-Vars/Config and added credentials to mqtt

Same result…

I was thrilled and thankfull to find this thread, thanks to all who has contributed to it so far.

As kefjevl my first attempt was with leaf2mqtt (because I had a Leaf in HA until it was exchanged for an Ariya) that sort of worked, but did not gave me battery %

Now I am trying to get this to work with my Nissan Ariya, but … I am new to Node Red, I dont understand, if I import both flows from GitHub then Node Red complaints about already existing nodes:

Some of the nodes you are importing already exist in your workspace.

Whats the correct procedure?

If I ignore and import anyway and change username/password and MQTT settings/credentials as supposed and deploy, then push button marked 1 dont output any debug info, pushing 2 gives debug info as shown in image below and MQTT Explorer shows nothing at all.

Any ideas?

Eureka … Only did step 1 - 4 and 7, Node red was still complained about existing nodes, I just ignored and loaded them anyway. Geting data, missing sunroof status though. Thanks @celodnb and @kefjevl !!!

1 Like

I have a 2023 Ariya and it’s USA based. I assume that since most of the API urls in this flow refer to EU and Europe that I should change certain URLs? Anyone have this working for the US?

I’m getting this error after putting in my credentials and using my localhost MQTT broker:

TypeError: Cannot read properties of undefined (reading ‘split’)

(It doesn’t make it past the sign-in steps. There are multiple attempts before this error.)

It’s from this node and the resp is invalid. Here’s what the sign in attempts seem to be returning:

<html><body><h1>403 Forbidden</h1>
Request forbidden by administrative rules.
</body></html>

Which can’t by .split hence the error.

Maybe some misconfugration or change with more recent versions of NodeRED? I noticed there was a post earlier this year related to this function: Integration for NissanConnect Services - #77 by celodnb

  1. I checked and the changes referenced in @kefjevl 's video are already in the flow code.
  2. I double-checked my password.
  3. I restarted NodeRED.

@Krolykke @kefjevl @TobiasB is everything working for you all still? Are any of you in the USA?

Everything? No, but still working as described above. I am in Denmark (EU).

Has anyone got this working with a second-gen Leaf (2017+) in Europe? I just need the battery percentage. Ideally, also the pre-heat/climate control button, but battery % is most important for me to automate charging. This is what I have at the moment:

I did poke around a bit to find the differences between different APIs, but unfortunately I can’t find the time to contribute more to seeing it through to a working solution. More than happy to help with testing/experimenting, though,.

I understand now. The USA (NA) API is completely different than the EU API. I’m very sad about that, since we have zero access to all of these lovely NODE RED flows.

I am working on several workarounds for the NA crew, mostly based off notifications/alerts from the Android MyNissan app and/or spoken responses from the Alexa skill (both which cannot be permanently relied on either).

I’ll post more when I have it working better, but here is a sneak peek:

Hi everyone

Have got as far as the node red working and still to fire it into the HA.

Can I ask where people got the data output showing like

I can’t find that in Node Red.

Also getting “TypeError: Cannot read properties of undefined (reading ‘attributes’)”
when reading certain “premium pay” facilities such as lock status, climate control and last known location. I assume as I do not pay for these facilities they are blocked by account permissions related to my account and not an error in the scripts ?

Hi all

sorry it is great that this is finally here and i have found this thread however i am struggling to get MQTT explorer show my leaf data

is there any step by step video that i can refer to MQTT set up guide as i am lost from this point (cannot see leaf on the MQTT explorer)

Hi all

sorry i managed to fire up all the in the HA dashboard however, i am struggling to add the device tracker and comes up an error when added to config.yaml as follow

also can i also add to control the lock/unlock of my Nissan leaf?

Hey! Anyone managing to get battery state and such from their newer Leaf in EU?

Hi All, I have a 2020 Nissan Leaf & I have been trying to get it to work with this integration for a few days. I have finally got it to work.
In case this helps somebody else, all I had to do was replace v4/users with v5/users in the penultimate function node of the “NissanConnect - Session” subflow.

Any luck with making the North American API work? I appreciate you trying to do so.

Hey all, don’t mean to hijack this thread but have been working on an integration for NissanConnect (I have a 2022 Leaf and am in the UK, nothing else to test with!), based on a seemingly abandoned integration and the work done for the dartnissanconnect library.

I was previously using leaf2mqtt and had no issues with it but just wanted to tidy up things a bit!

1 Like

Hi, thanks for your work, unfortunately i’m not able to login! Any suggestion?