Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot log in to HA after repairing car to app #83

Open
newbuilder22 opened this issue Jan 4, 2025 · 5 comments
Open

Cannot log in to HA after repairing car to app #83

newbuilder22 opened this issue Jan 4, 2025 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@newbuilder22
Copy link

What happened?
Tried to add an add on to Nissan connect EV app for my 2020 EV
Didn’t work so was told to delete car from app, set NC in car to default,
Reload car and pair to app
This did not solve the add ons not appearing in app but also made no log in from HA to Nissan
To Reproduce
Steps to reproduce the behavior.
As above
Expected behavior
A clear and concise description of what you expected to happen.
To be able to log in
Log Output
Any relevant logs from Home Assistant.

2025-01-04 13:50:47.107 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry NissanConnect Account for nissan_connect
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 640, in __async_setup_with_context
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/nissan_connect/init.py", line 60, in async_setup_entry
await hass.async_add_executor_job(vehicle.fetch_all)
File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/nissan_connect/kamereon/kamereon.py", line 351, in fetch_all
self.fetch_cockpit()
~~~~~~~~~~~~~~~~~~^^
File "/config/custom_components/nissan_connect/kamereon/kamereon.py", line 860, in fetch_cockpit
raise ValueError(body['errors'])
ValueError: [{'status': 'Forbidden', 'code': '403', 'title': 'security.access', 'detail': 'Access is denied for this resource'}]

Home Assistant Version
Find this in Settings > About.
0.1.2025
Integration Version
Find this from HACS.
1.0.0
Additional context
Add any other context about the problem here.

@newbuilder22 newbuilder22 added the bug Something isn't working label Jan 4, 2025
@dan-r
Copy link
Owner

dan-r commented Jan 4, 2025

If you are using the NissanConnect EV app, this integration won't be supported, but the built in home assistant integration called "Nissan Leaf" should work for you. This app is only for vehicles that use the NissanConnect app.

@newbuilder22
Copy link
Author

newbuilder22 commented Jan 4, 2025 via email

@newbuilder22
Copy link
Author

Nissan had to intervene to recover the account.

The battery and battery status is not yet enabled - lNissan still working on it but the auto heat function is available. Is the battery issue stopping the log in?

Still cannot get this integration to log in

Logger: homeassistant.config_entries
Source: config_entries.py:640
First occurred: 16:43:19 (2 occurrences)
Last logged: 17:38:43

Error setting up entry [withdrawn] for nissan_connect
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 640, in __async_setup_with_context
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/nissan_connect/init.py", line 60, in async_setup_entry
await hass.async_add_executor_job(vehicle.fetch_all)
File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/nissan_connect/kamereon/kamereon.py", line 353, in fetch_all
self.fetch_battery_status()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/config/custom_components/nissan_connect/kamereon/kamereon.py", line 646, in fetch_battery_status
return self.fetch_battery_status_leaf()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/config/custom_components/nissan_connect/kamereon/kamereon.py", line 662, in fetch_battery_status_leaf
battery_data = body['data']['attributes']
~~~~^^^^^^^^
KeyError: 'data'

@newbuilder22
Copy link
Author

I can confirm that the user must have the battery management add on added to make this integration work. If you have other addons but not the battery then it will not load

@dan-r
Copy link
Owner

dan-r commented Jan 21, 2025

Just to confirm, the integration did not function correctly without the battery management addon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants