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

Add Support for Dream Machine Pro #8

Open
anthonysnyder opened this issue Nov 26, 2024 · 7 comments
Open

Add Support for Dream Machine Pro #8

anthonysnyder opened this issue Nov 26, 2024 · 7 comments
Assignees
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@anthonysnyder
Copy link

Is your feature request related to a problem? Please describe.
When attempting to configure this plugin for use with my UDM Pro, I immediately get 401 Unauthorized, and eventually 429 Too Many Requests.

Describe the solution you'd like
Build out support for logging into a Dream Machine Pro

Describe alternatives you've considered

Additional context
I have a brand new LOCAL only SuperAdmin account that I am trying with this.

@Juror2372
Copy link

i have the same issue.

it used to work with my UDM Pro but i'm now getting the same error.

here's the log from HA

2024-11-27 19:30:33.775 WARNING (MainThread) [homeassistant.components.unifi] Exception on update Call https://10.16.10.1:443/proxy/network/v2/api/site/default/trafficrules received 401 Unauthorized
2024-11-27 19:30:43.775 WARNING (MainThread) [homeassistant.components.unifi] Exception on update Call https://10.16.10.1:443/proxy/network/v2/api/site/default/trafficrules received 401 Unauthorized
2024-11-27 19:30:53.775 WARNING (MainThread) [homeassistant.components.unifi] Exception on update Call https://10.16.10.1:443/proxy/network/v2/api/site/default/trafficrules received 401 Unauthorized
2024-11-27 19:31:03.775 WARNING (MainThread) [homeassistant.components.unifi] Exception on update Call https://10.16.10.1:443/proxy/network/v2/api/site/default/trafficrules received 401 Unauthorized
2024-11-27 19:31:12.850 INFO (MainThread) [custom_components.unifi_network_rules.udm_api] Successfully logged in to UDM
2024-11-27 19:31:13.151 INFO (MainThread) [custom_components.unifi_network_rules.udm_api] Successfully logged in to UDM
2024-11-27 19:31:13.164 WARNING (MainThread) [custom_components.unifi_network_rules.udm_api] Authentication failed, attempting to re-login (attempt 1)
2024-11-27 19:31:13.775 WARNING (MainThread) [homeassistant.components.unifi] Exception on update Call https://10.16.10.1:443/proxy/network/v2/api/site/default/trafficrules received 401 Unauthorized
2024-11-27 19:31:14.491 INFO (MainThread) [custom_components.unifi_network_rules.udm_api] Successfully logged in to UDM
2024-11-27 19:31:14.504 WARNING (MainThread) [custom_components.unifi_network_rules.udm_api] Authentication failed, attempting to re-login (attempt 2)
2024-11-27 19:31:15.788 INFO (MainThread) [custom_components.unifi_network_rules.udm_api] Successfully logged in to UDM
2024-11-27 19:31:15.800 ERROR (MainThread) [custom_components.unifi_network_rules.udm_api] Request failed. Status: 401, Response: {"error":{"code":401,"message":"Unauthorized"}}
2024-11-27 19:31:15.800 ERROR (MainThread) [custom_components.unifi_network_rules.udm_api] Failed to fetch traffic rules: Request failed. Status: 401, Response: {"error":{"code":401,"message":"Unauthorized"}}
2024-11-27 19:31:16.078 INFO (MainThread) [custom_components.unifi_network_rules.udm_api] Successfully logged in to UDM
2024-11-27 19:31:16.089 WARNING (MainThread) [custom_components.unifi_network_rules.udm_api] Authentication failed, attempting to re-login (attempt 1)
2024-11-27 19:31:17.251 ERROR (MainThread) [custom_components.unifi_network_rules.udm_api] Failed to log in to UDM. Status: 429
2024-11-27 19:31:17.252 ERROR (MainThread) [custom_components.unifi_network_rules.udm_api] Failed to log in: Failed to log in to UDM. Status: 429
2024-11-27 19:31:17.252 ERROR (MainThread) [custom_components.unifi_network_rules.udm_api] Failed to fetch firewall rules: Failed to login
2024-11-27 19:31:17.415 ERROR (MainThread) [custom_components.unifi_network_rules.udm_api] Failed to log in to UDM. Status: 429
2024-11-27 19:31:17.415 ERROR (MainThread) [custom_components.unifi_network_rules.udm_api] Failed to log in: Failed to log in to UDM. Status: 429
2024-11-27 19:31:17.415 ERROR (MainThread) [custom_components.unifi_network_rules.udm_api] Failed to fetch traffic routes: Failed to login
2024-11-27 19:31:17.415 ERROR (MainThread) [custom_components.unifi_network_rules] Error updating data: Failed to fetch traffic rules: Request failed. Status: 401, Response: {"error":{"code":401,"message":"Unauthorized"}}
2024-11-27 19:31:17.415 ERROR (MainThread) [custom_components.unifi_network_rules] Unexpected error fetching udm_rule_manager data

@Juror2372
Copy link

@anthonysnyder maybe the issue was with Home-Assistant, i'm running beta 2024.12.0b5 and the integration now works.

@anthonysnyder
Copy link
Author

@Juror2372 Interesting, I will need to give it another go. I wonder if it is due to the version of HA that I can run via Docker on the Synology.

@sirkirby
Copy link
Owner

sirkirby commented Dec 4, 2024

It could be the HA version and yes, definitely need a local super admin account to make things work smoothly. I've not been able to replicate, so if the issue persists, keep the info coming.

@sirkirby
Copy link
Owner

sirkirby commented Dec 4, 2024

@anthonysnyder I would also suggest trying my Bruno http project to just test the login and the api requests outside of HA. It's easy to set up and run locally. If that works, then you know the account is good and working. Then its likely HA itself, or an issue that I can help sort out with the integration.

@sirkirby sirkirby self-assigned this Dec 4, 2024
@sirkirby sirkirby added help wanted Extra attention is needed question Further information is requested labels Dec 4, 2024
@anthonysnyder
Copy link
Author

Oh awesome, I will test this out as soon as I am back home.

@olafhuerta97
Copy link

For my UCG it was failing on version 12.1 but working fine on 12.2!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants