finish06 / pyunifi

https://unifi-sdn.ubnt.com/
MIT License
223 stars 99 forks source link

update docs and possibly improve login #80

Open noafterglow opened 1 year ago

noafterglow commented 1 year ago

I had a very hard time getting this working.

At first I got an SSL _CERTIFICATE verification error, so apparently you need to add ssl_verify = False to the controller command line. This generates a warning when you run the script, but that apparently is a KNOWN 'feature'.

Next it would not connect and login. I got 404 no matter what I tried. Turns out that the port and version parameters ARE NOT OPTIONAL, and the library does not try to figure them out. so for the UDM Pro you also need to add port=443, version='UDMP-unifiOS'

Finally, the username and password worked with the values used for primary login to the device/cloud at ubiquity, in my case my username was my email address. using the "SSH" password DOES NOT work. that returns 403.

I RECOMMEND that the parameters be considered NOT OPTIONAL and that a note be added to that effect in the documentation. when parameters are "optional" the user expects that the library will figure out a reasonable value to use, unless you REALLY want something different.

kmcgaugh commented 1 year ago

Thank you so much for bringing this up. I spent about an hour trying to figure this out!

jhavens12 commented 2 months ago

Thank you!