Closed christianmalek closed 8 years ago
@Phisherman I haven't checked yet if that would work, but you will need to first access the API with the list_wlanconf()
function/method anyway to get the wlan_id.
@malle-pietje I already have the wlan_id. I only store the wlan_id in the database because the other data like the name could change.
Ah, I see. Let me check whether that would work. If so, I'll update the class and publish on github. I also have some other updates that need to be added so I'll try and combine these.
@malle-pietje I appreciate it!
@Phisherman I just tried my modified class and it works; $name
is now an optional parameter for the set_wlansettings
function/method. I will update the class on github in a few minutes so please test API class version 1.0.6 when you have the opportunity, and please let me know here what the results are.
@malle-pietje Works like a charm.
Glad to hear!
Hi,
There is already the
set_wlansettings($wlan_id, $name, $x_passphrase)
function. But it would be nice to have also anset_psk
function if you only want to change the psk and cannot provide the wlan's name without accessing the unifi api to get the corresponding wlan name.