Closed BeneReuthlinger closed 2 years ago
We don't use this method ourselves. Have you looked at the payload that is sent to the API using your browser's developer tool/console when you create a WLAN through the web interface?
If I create wlan with vlan with webbrowser I also see no vlan-properties, but the vlan is set anyhow. I currently modify an existing wlan, so I don't need to create a wlan. But i wanted to inform you about the problem
OK, I had a quick look and it turns out the API route now requires passing the _id of the VLAN instead of the tag number. I've added a change for this to be included with the next release. Thanks for reporting!
If I create a new wlan in a specific vlan (in my case 150), the wlan is created, but the vlan is not set. If I debug up to the curl_exec-function the response even contains no vlan-properties. In older Controller-Versions (< 6) did it still works.
My Api-Call:
$r = $unifi->create_wlan($cwlan, $randomPW, $usergroupid, $wlangroupid, true, false, false, 'wpapsk', 'wpa2', 'ccmp', true, 150, false, false, [], $ap_group_ids);