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

UDM Pro seems to need a URL without a port number #227

Open
BobFrankston opened this issue Dec 22, 2023 · 2 comments
Open

UDM Pro seems to need a URL without a port number #227

BobFrankston opened this issue Dec 22, 2023 · 2 comments

Comments

@BobFrankston
Copy link

I'm running Unifi OS 3.2.7 and Unifi 8. I just switched from the USG. I found that in order to get node-unifi to work I had to modify the source code to change the URL to not have a port number. I tried ports 80, 443 and 8443 and all failed. I can't explain it -- is this a known problem

    //this._baseurl = new URL(`https://${options.host}:${options.port}`);
    this._baseurl = new URL(`https://${options.host}`);
@BobFrankston
Copy link
Author

Uh oh - -it worked but now has stopped working so I don't know what is happening:

(node:41208) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
index.js:5
2023-12-21 20:10:11 Upsnarf: Logging in 
upsnarf.ts:145
login Request failed with status code 429
upsnarf.ts:59
AxiosError: Request failed with status code 429 getting info DID THE CONTROLLER CHANGE ? 
upsnarf.ts:194
2023-12-21 20:10:12 ERROR AxiosError: Request failed with status code 429  
upsnarf.ts:145
Uncaught AxiosError AxiosError
    at loadESM (internal/process/esm_loader:34:33)
    at processTicksAndRejections (internal/process/task_queues:95:5)
    --- await ---
    at runMainESM (internal/modules/run_main:98:21)
    at executeUserEntryPoint (internal/modules/run_main:131:5)
    at <anonymous> (internal/main/run_main_module:28:49)
esm_loader:34
Process exited with code 1

Perhaps an example with sample credentials would help (user:username;password; https://unifi}?

@thib3113
Copy link

thib3113 commented Dec 22, 2023

@BobFrankston it seems that now there is a rate limit on login on unifi . So, 429 seems to say you just got rate limited . But, it seems you can configure this limit : https://community.ui.com/questions/Unifi-API-Rate-Limited/ba82a718-9418-46b0-8f2f-235bfc647f9b#answer/0761c014-a393-432c-a792-48defcef3f5e

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

2 participants