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

Unifi Network Controller - Unable to log in #131143

Open
geirola opened this issue Nov 21, 2024 · 4 comments
Open

Unifi Network Controller - Unable to log in #131143

geirola opened this issue Nov 21, 2024 · 4 comments

Comments

@geirola
Copy link

geirola commented Nov 21, 2024

The problem

I have been running Unifi Network Controller on my raspberry pi 4 for years, with no issues whatsoever. I do not need to login particularly often, but recently I am unable to login. I am not sure if my account is local or cloud. But I have only been logging in with a username(my own custom, not ubnt or root or other predefined) and password. All of a sudden it requires a one time code. I get this code in my email, but after I type it in I still get "invalid username/password".

But I am pretty sure my credentials are correct, because I can use them on ui.com. And if I do it there, the MFA part work.

Is there any way I can get back into my unifi control panel? Anything I could try? Since it is running as an addon on HAOS, I guess directly connecting to the mongodb to change credentials are out of the question?

Please let me know if I should add any logs or the like to the issue

image

What version of Home Assistant Core has the issue?

2024.11.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

unifi

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logs from unifi network application: (doesn't reveal much?)

Add-on: UniFi Network Application
 Manage your UniFi network using a web browser
-----------------------------------------------------------
 Add-on version: 3.5.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 13.2  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2024.11.1
 Home Assistant Supervisor: 2024.11.2
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-timezone: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
[04:15:00] INFO: Configuring timezone (Europe/Oslo)...
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service base-addon-timezone successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-unifi: starting
s6-rc: info: service init-unifi successfully started
s6-rc: info: service unifi: starting
s6-rc: info: service unifi successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[04:15:00] INFO: Now starting the UniFi Network Application...
[04:15:00] INFO: Note: No add-on specific logs beyond this point.

Additional information

No response

@gejr
Copy link

gejr commented Nov 21, 2024

This is probably related to the addon, and not the integration. Sorry if I have not tagged it right.

@GPSPerth
Copy link

Create another account on unifi with only local access, and use that for home assistant, that's what I had to do...

@geirola
Copy link
Author

geirola commented Nov 22, 2024

Create another account on unifi with only local access, and use that for home assistant, that's what I had to do...

Thanks, but I am not sure how I would go about doing that. I can login to the https://unifi.ui.com/, but I have no sites set up and I can't see any way of adding users there. This is because I have been running this addon locally I guess? It seems my account is the same on the ui.com-site and on my local installation of the network application though. Am I missing something?

@AbelLykens
Copy link

AbelLykens commented Nov 29, 2024

To add a local account, to fix the authentication problem for the Unifi controller integration:

  1. Login to your local instance (probably at IP:8443)
  2. Go to settings (cog icon on the left)
  3. At the top, click on Administration
  4. Click Add New Admin
  5. Do not enable Remote access
  6. Enter only a username, click "Set admin Password"
  7. I chose Site Admin as role, read only might work too

Then reconfigure your integration in HA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants