sirkirby / ha-udm-rule-manager

Allows you to manage your UDM firewall and traffic rules in Home Assistant
https://chriskirby.net/automate-your-unifi-network-firewall-and-traffic-rules-with-home-assistant/
MIT License
9 stars 1 forks source link

Add Support for Dream Machine Pro #8

Open anthonysnyder opened 1 week ago

anthonysnyder commented 1 week ago

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 commented 6 days ago

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