Closed mck165 closed 1 week ago
Hey there @kane610, mind taking a look at this issue as it has been labeled with an integration (unifi
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
unifi documentation unifi source (message by IssueLinks)
With what change did you experience this. What version of Unifi app and os are you running
With what change did you experience this
Unfortunately I am not sure when it happened as I do not rely on too many automations for Unifi
What version of Unifi app and os are you running
What version of Unifi app and os are you running
Unifi OS v3.12.12 and Network 8.1.127
Same here (HA Docker):
Logger: homeassistant.components.unifi Source: components/unifi/hub/api.py:76 Error connecting to the UniFi Network at 192.168.1.1:
Seems like the port is missing after IP when connecting.
Connecting should be: 192.168.1.1:443
I was / am having the same issue. Created new Local User on UDMSE after Early Access (I know, likely to break things!) install broke integration with needing new auth. New local account didn't solve after reboot of both devices.
Deleted integration, but on re-add using the new local account I receive "Unknown Error Occurred" or "Invalid Auth"
Network integration works perfect with same u/p.
Unifi OS: 4.0.3 Protect: 4.0.7 HA: 2024.5.3
Lets keep this issue to be about Network, protect has its own implementation
Based on this comment, does Network work for OP?
I was / am having the same issue. Created new Local User on UDMSE after Early Access (I know, likely to break things!) install broke integration with needing new auth. New local account didn't solve after reboot of both devices.
Deleted integration, but on re-add using the new local account I receive "Unknown Error Occurred" or "Invalid Auth"
Network integration works perfect with same u/p.
Lets keep this issue to be about Network, protect has its own implementation
Sorry about that! Jumped in wrong repo!
Based on this comment, does Network work for OP?
I was / am having the same issue. Created new Local User on UDMSE after Early Access (I know, likely to break things!) install broke integration with needing new auth. New local account didn't solve after reboot of both devices. Deleted integration, but on re-add using the new local account I receive "Unknown Error Occurred" or "Invalid Auth" Network integration works perfect with same u/p.
I have not upgraded to early access. Should I try deleting and then reinstalling the integration again?
Just a random thought I had as I continue to research...starting to think that the issue may have started when I enabled MFA...
Just a random thought I had as I continue to research...starting to think that the issue may have started when I enabled MFA...
The integrations expect local accounts which are not required to have 2FA enabled. See this thread https://community.home-assistant.io/t/2fa-added-to-the-unifi-ubiquiti-component/293031/10
Just a random thought I had as I continue to research...starting to think that the issue may have started when I enabled MFA...
The integrations expect local accounts which are not required to have 2FA enabled. See this thread https://community.home-assistant.io/t/2fa-added-to-the-unifi-ubiquiti-component/293031/10
Thanks. I just checked and I do have a local user setup for the integration
Hey @Kane610, did you check on this: https://github.com/home-assistant/core/issues/117158#issuecomment-2104938326?
I faced the same issue when creating a user for Home Assistant and found the following workaround:
I would assume provisioning users via SSH/CLI could be an alternate approach when the legacy interface is removed at some point.
Same here (HA Docker):
Logger: homeassistant.components.unifi Source: components/unifi/hub/api.py:76 Error connecting to the UniFi Network at 192.168.1.1:
Seems like the port is missing after IP when connecting.
Connecting should be: 192.168.1.1:443
Good observation, the log could be clearer, the format of the log is <host>: <error message>
so its not missing, only saying that the error message was empty
As most people have reported it is working on both 3 and 4 right now I would make sure to properly restart all equipment to make sure its back in a known state
As most people have reported it is working on both 3 and 4 right now I would make sure to properly restart all equipment to make sure its back in a known state
Done already: Pulled new HA Docker image, deactivated HACS and all its integrations. Restarted UDM Pro, deactivated any firewall rules. Same result:
ERROR (MainThread) [homeassistant.components.unifi] Error connecting to the UniFi Network at 192.168.1.1:
By the way: the same problem exists with @homeassistant/components/fritzbox
Having the same issue trying to set up the integration for the first time. Getting the following error message:
2024-05-16 09:36:38.035 ERROR (MainThread) [homeassistant.components.unifi] Error connecting to the UniFi Network at 192.168.36.1:
Running HA on a Raspberry Pi 4 Core 2024.5.3 Supervisor 2024.05.1 Operating System 12.3
Unifi Network is on 8.1.127 running on a UDM-Pro running OS version 3.2.12.
I have restarted the UDM-Pro, HA, and my Switch Pro 24 PoE and nothing changes. I can ping 192.168.36.1 from HA as well. Also tested the login credentials of the local admin I created and that works just fine.
By the way: the same problem exists with @homeassistant/components/fritzbox
Probably unrelated, but the issue is on your side as it can't connect to the address.
Having the same issue trying to set up the integration for the first time. Getting the following error message:
2024-05-16 09:36:38.035 ERROR (MainThread) [homeassistant.components.unifi] Error connecting to the UniFi Network at 192.168.36.1:
Running HA on a Raspberry Pi 4 Core 2024.5.3 Supervisor 2024.05.1 Operating System 12.3
Unifi Network is on 8.1.127 running on a UDM-Pro running OS version 3.2.12.
I have restarted the UDM-Pro, HA, and my Switch Pro 24 PoE and nothing changes. I can ping 192.168.36.1 from HA as well. Also tested the login credentials of the local admin I created and that works just fine.
Are you sure its the correct address, not too common using a high number as 36
Having the same issue trying to set up the integration for the first time. Getting the following error message: 2024-05-16 09:36:38.035 ERROR (MainThread) [homeassistant.components.unifi] Error connecting to the UniFi Network at 192.168.36.1: Running HA on a Raspberry Pi 4 Core 2024.5.3 Supervisor 2024.05.1 Operating System 12.3 Unifi Network is on 8.1.127 running on a UDM-Pro running OS version 3.2.12. I have restarted the UDM-Pro, HA, and my Switch Pro 24 PoE and nothing changes. I can ping 192.168.36.1 from HA as well. Also tested the login credentials of the local admin I created and that works just fine.
Are you sure its the correct address, not too common using a high number as 36
Yes, I use some odd numbers so I can tell what site is what and I don't end up accidentally making changes to the wrong site if I forget to switch between UDM consoles.
The error seemed to be related to QNAP Container Station (Docker), when running HA in Host mode docker (lxcbr0).
After the most recent firmware update, the connection can be re-established.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
I've been having this issue for about the same amount of time as others here. Getting 403 Forbidden upon login attempt. Agree it also appeared around the same time I setup MFA for my cloud users. I have a super admin
user setup with restrict to local access only
for HA access.
Here is the log for integration reload:
2024-06-12 07:40:26.989 WARNING (MainThread) [homeassistant.components.unifi] Exception on update Call https://192.168.1.1:443/api/auth/login received 403 Forbidden
2024-06-12 07:40:26.990 WARNING (MainThread) [homeassistant.components.unifi] Exception on update Call https://192.168.1.1:443/proxy/network/api/s/default/rest/user received 401 Unauthorized
2024-06-12 07:40:26.990 WARNING (MainThread) [homeassistant.components.unifi] Exception on update Call https://192.168.1.1:443/proxy/network/api/s/default/stat/device received 401 Unauthorized
2024-06-12 07:40:26.990 WARNING (MainThread) [homeassistant.components.unifi] Exception on update Call https://192.168.1.1:443/proxy/network/api/s/default/rest/dpiapp received 401 Unauthorized
2024-06-12 07:40:26.990 WARNING (MainThread) [homeassistant.components.unifi] Exception on update Call https://192.168.1.1:443/proxy/network/api/s/default/rest/dpigroup received 401 Unauthorized
2024-06-12 07:40:26.990 WARNING (MainThread) [homeassistant.components.unifi] Exception on update Call https://192.168.1.1:443/proxy/network/api/s/default/rest/portforward received 401 Unauthorized
2024-06-12 07:40:26.990 WARNING (MainThread) [homeassistant.components.unifi] Exception on update Call https://192.168.1.1:443/proxy/network/api/self/sites received 401 Unauthorized
2024-06-12 07:40:26.990 WARNING (MainThread) [homeassistant.components.unifi] Exception on update Call https://192.168.1.1:443/proxy/network/api/s/default/stat/sysinfo received 401 Unauthorized
2024-06-12 07:40:26.990 WARNING (MainThread) [homeassistant.components.unifi] Exception on update Call https://192.168.1.1:443/proxy/network/api/s/default/rest/wlanconf received 401 Unauthorized
2024-06-12 07:40:26.990 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Default for unifi
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/unifi/__init__.py", line 52, in async_setup_entry
await hub.initialize()
File "/usr/src/homeassistant/homeassistant/components/unifi/hub/hub.py", line 92, in initialize
self.is_admin = self.api.sites[self.config.entry.unique_id].role == "admin"
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiounifi/interfaces/api_handlers.py", line 167, in __getitem__
return self._items[obj_id]
~~~~~~~~~~~^^^^^^^^
KeyError: '629555bcb983050869acb2a6'
and the log for integration (re)setup:
2024-06-12 07:47:44.781 ERROR (MainThread) [homeassistant.components.unifi] Error connecting to the UniFi Network at 192.168.1.1: Call https://192.168.1.1:443/api/auth/login received 403 Forbidden
2024-06-12 07:48:02.357 ERROR (MainThread) [homeassistant.components.unifi] Error connecting to the UniFi Network at 192.168.1.1: Call https://192.168.1.1:443/api/auth/login received 403 Forbidden
I've been having this issue for about the same amount of time as others here. Getting 403 Forbidden upon login attempt. Agree it also appeared around the same time I setup MFA for my cloud users. I have a
super admin
user setup withrestrict to local access only
for HA access.
Accounts with MFA is not supported by the integration.
Thanks for the quick response! I've disabled MFA for my account and still getting the same error in my logs. I'll try to give it some time and reboot the UDMSE to see if it works.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
The problem
The integration has been working fine for over 2 years. Now I am not able to load the configuration even after creating a new local user in Unifi OS and using those login credentials
What version of Home Assistant Core has the issue?
2024.5.2
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 Network
Link to integration documentation on our website
https://www.home-assistant.io/integrations/unifi
Diagnostics information
home-assistant_unifi_2024-05-09T20-15-57.791Z.log
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response