finish06 / pyunifi

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

add set_wlan_conf #45

Open tertius opened 4 years ago

tertius commented 4 years ago

Adds the ability to change/set the WLAN config.

finish06 commented 4 years ago

Please include README documentation. Thanks!

tertius commented 4 years ago

Please include README documentation. Thanks!

Done.

maxirus commented 4 years ago

This seems like a very specific, personal use case; to update the password and SSID. This method should be fully fleshed out IMO to be able to set all wlan configurations (ie. enabled, security, wpa_mode, etc.).

Or an alternative, create specific methods such as set_wlan_conf_password() & set_wlan_conf_ssid()

Also, partially duplicate of https://github.com/finish06/pyunifi/pull/34

finish06 commented 4 years ago

@maxirus That is a great recommendation and I agree. @tertius Are you interested in pursuing this or not?

tertius commented 4 years ago

@maxirus I was modeling this after the basic settings on the sloofmaster PHP API client. I.e. basic WLAN settings. And name and password definitely fit into the "basic settings" nomenclature.

@finish06 I'm happy to, if you want me to incorporate everything into one function that may be too much and we may want more specialized functions for certain things. An example would be disable, delete, mac_filter etc. Let me know the requirements and I'll update this one to add more.

Alternatively, let me know if you just want me to go through all the settings a propose what should be in a main function and what is probably better broken out.

I'm committed to this as I'm running a product in production that relies on this library.

finish06 commented 4 years ago

@tertius I am comfortable with either approach, i.e. a function to rule all WLAN configuration or functions calls that specify what is being accomplished. Depending on your Python exposure, I think the latter would be easier without resulting in any regressions or issues, etc.

tbowmo commented 4 years ago

Is there any progress on this one? Or do we need another one to pick up on it, and finish it? In particular I need a function for changing the passphrase of the network.

If needed, I would be happy to join in on the development..

tbowmo commented 2 years ago

@finish06 Any news on this (rather old) PR? Should I do a refactoring of it, so it can be merged? (since there are conflicts)

tertius commented 2 years ago

@finish06 Any news on this (rather old) PR? Should I do a refactoring of it, so it can be merged? (since there are conflicts)

Feel free to take over.