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

Please add the possibility to specify a Site ID #4

Closed
scheelings opened this issue Sep 25, 2018 · 7 comments
Closed

Please add the possibility to specify a Site ID #4

scheelings opened this issue Sep 25, 2018 · 7 comments
Assignees

Comments

@scheelings
Copy link

I just tested this API and the device list and client list were empty. I noticed that the URL's are hard coded and all point to the Default Site in the Unifi controller. Because I am using another Site than the Default Site, the list with devices/clients is empty.
Can you add a Site parameter in the constructor of the API (with perhaps a default value of "default") and use this parameter in the URL's (by replacing /default/ with /{SiteId}/) or some other kind of solution?

Thanks,
Danny

@scheelings scheelings changed the title Please add the possibility to specify a site Please add the possibility to specify a Site ID Sep 25, 2018
@KoenZomers KoenZomers self-assigned this Sep 25, 2018
@KoenZomers
Copy link
Owner

Good one. I'll have a look at this.

@KoenZomers
Copy link
Owner

KoenZomers commented Sep 26, 2018

@scheelings, I don't have a second site to test this against. If I just create a new site in UniFi, it seems to randomly generate a combination of letters and digits as the site ID. Is that correct? In that case it would suffice to accept a string somewhere to provide the correct site identifier. Do you agree?

@KoenZomers
Copy link
Owner

I've pushed version 1.0.2.0 in which you can provide the site ID through the constructor. Can you test if this works well on your multi site setup?

@scheelings
Copy link
Author

Yes, I agree to use some kind of SiteID. I downloaded your code and implemented this in my downloaded code, so I could continue my development. I’ll check your code tomorrow and will leave a comment here!

@KoenZomers
Copy link
Owner

Perfect, thanks!

@scheelings
Copy link
Author

I just checked your code and it looks the same as my code, so this should work fine!

@KoenZomers
Copy link
Owner

Thanks for confirming and addressing! Will close this issue.

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

No branches or pull requests

2 participants