Integration for NissanConnect Services

Assuming this will only ever be for the UK/EU NissanConnect customer base, correct?

Which region are you in and with which car?

I’ve only tested it with in the UK but it should work with the US - I’m not sure if the API endpoints will need to be changed for it? It has a ‘Region’ option but currently US and EU have the same API details

I’m from Italy, the car is qashqai j12

I’m in the US. 2023 Ariya. From what I’ve read US uses a different api but I’d be happy to be proven wrong!

Hello, I’m receiving this error on Leaf - 2020

ValueError: [{‘status’: ‘403’, ‘code’: ‘gateway.processing’, ‘title’: ‘VNEXT’, ‘detail’: ‘403 Forbidden403 FORBIDDEN’}

The application that i use is NissanConnect.

What country are you in?

Europe/Romania

Could you share the code for the entity for the trip history?

Wow! It worked for me on the first try! It includes all the necessary info and much more. Thanks so much!

The ability to see the battery level will be the biggest contributing factor to making my car charging autlmations fully autonomous. So far I’ve had to check the battery level, look at the price and decide whether update the price threshold at which charging starts or leave it as is. Now I can specify a reserve charge, so that I have the minimum range needed for the daily commute and only top up above that level when the electricity price is cheap enough. Wonderful!

Let me know if I can contribute to the addon in any way. I am a software developer, but I have procrastinated on creating an addon due to busy times. Now that the ball is rolling, I could also contribute if needed.

Can you login to the app on the same network?

Do you have any unusual characters in your password? Maybe worth trying something just alphanumeric as a sanity check

Glad its all working for you! If theres anything more you want to see or come across any bugs, I’d appreciate any help in the development :slight_smile:

The trip history entity code is here and then instantiated up here.

I can log in to the same network without problems, I use the ios application

I have a generated password, quite complex, but I don’t think it’s the problem here, I tried with a wrong password and I get another error, wrong password.

I really don’t understand what the problem is

that’s it, I managed to make it work, the problem in my case was with the location variable, I commented the location update and now it works.

Interesting - do you have car tracking in the app?

that icon is disabled, i think you need a separate subscription for that?

So I wasn’t showing the device_tracker entity unless you had the subscription but was still trying to fetch the data. Would you mind trying v0.3.3-beta.1 (guide for beta installing)? This should be fixed in that version

nop, i have same error

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 406, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/nissan_connect/__init__.py", line 48, in async_setup_entry
    await hass.async_add_executor_job(vehicle.refresh)
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/nissan_connect/kamereon.py", line 874, in refresh
    self.fetch_all()
  File "/config/custom_components/nissan_connect/kamereon.py", line 878, in fetch_all
    self.fetch_location()
  File "/config/custom_components/nissan_connect/kamereon.py", line 909, in fetch_location
    raise ValueError(body['errors'])
ValueError: [{'status': '403', 'code': 'gateway.processing', 'title': 'VNEXT', 'detail': '403 Forbidden403 FORBIDDEN'}]

My bad, I messed up the check. v0.3.3-beta.2?