Closed davelegg83 closed 4 months ago
Good morning, also just wanted to open a ticket for the same reason. I stumbled upon incorrect data (car location was still 'home' but in fact my wife is using it). My log output is identical to the above. The Nissan App continues working normal, but maybe they changed something in the API?
Looks like the API has changed. Just having a look to see if its something simple. For reference the response that comes back includes:
error: {
description: "Client authentication failed",
message: "invalid_client"
}
Makes me think its just the client ID thats changed
I've had a play around with it but haven't got anywhere yet. Looks like I'll need to decompile the APK rather than just changing some constants. I won't have any time today but should get a chance to look at it tomorrow/over the weekend.
@Tobiaswk looks like this is affecting the My Leaf app too (I did base the API client here on dartnissanconnect after all). Have you had any luck with these API changes yet?
May be coincidence, but my Ohme android app hasn't been able to get my Nissan's soc for eight hours. I tried reconnecting my Ohme app to the Nissan system and the login to Nissan now fails. Perhaps Nissan didn't tell other suppliers of an API change or this is an 'unexpected event'.
Same here. Ariya not updating! Arggg
@dan-r Yes, I've been looking at it. They've changed the client_id
which is now a-ncb-nc-android-prod
and the client_secret
which is now 6GKIax7fGT5yPHuNmWNVOc4q5POBw1WRSW39ubRA8WPBmQ7MOxhm75EsmKMKENem
.
I've just pushed the changes to dartnissanconnect; https://github.com/Tobiaswk/dartnissanconnect/commit/e0301993e872a63c059c3afaa258b413d435fe0e
I'm not sure if other changes have been made. I haven't had time to look at it all but authentication works again.
Interestingly it seems that whoever is responsible for the NissanConnect app on Android has changed quite a lot in app. They've obfuscated some of the "secrets" so they cannot as easily be decompiled and read directly any longer. It's still fairly easy though ;)
Thanks @Tobiaswk I appreciate you sharing that - had a brief look at the strings from the apk earlier but couldn't get anything working.
I'll give it a go later on - I must admit my decompilation skills are a bit rusty! 🤣
For what it's worth I can confirm that changing the values in settings_map in kamereon.py to the ones provided by @Tobiaswk and restarting HA fixes the integration.
For what it's worth I can confirm that changing the values in settings_map in kamereon.py to the ones provided by @Tobiaswk and restarting HA fixes the integration.
Great idea, I did the same and it is also working for me.
And working now - this is the section I updated. In HA file editor - /homeassistant/custom_components/nissan_connect/kamereon.py Line 33... settings_map = { 'nissan': { 'EU': { 'client_id': 'a-ncb-nc-android-prod', 'client_secret': '6GKIax7fGT5yPHuNmWNVOc4q5POBw1WRSW39ubRA8WPBmQ7MOxhm75EsmKMKENem', 'scope': 'openid profile vehicles', 'auth_base_url': 'https://prod.eu2.auth.kamereon.org/kauth/', 'realm': 'a-ncb-prod', 'redirect_uri': 'org.kamereon.service.nci:/oauth2redirect', 'car_adapter_base_url': 'https://alliance-platform-caradapter-prod.apps.eu2.kamereon.io/car-adapter/', 'notifications_base_url': 'https://alliance-platform-notifications-prod.apps.eu2.kamereon.io/notifications/', 'user_adapter_base_url': 'https://alliance-platform-usersadapter-prod.apps.eu2.kamereon.io/user-adapter/', 'user_base_url': 'https://nci-bff-web-prod.apps.eu2.kamereon.io/bff-web/', },
Thanks all for the testing - I've just released v0.5.1 with these changes and everything is working again for me now.
What happened? Restarted HA and got the error that Nissan Connect was unable to setup. Had been working fine prior to this.
Log Output
Home Assistant Version 2024.5.3
Integration Version 1.0.0