hobbyquaker / unifi2mqtt

Connect Ubiquiti UniFi controller to MQTT :satellite:
MIT License
73 stars 27 forks source link

force provision option for unreliable wifi ? #5

Open saket424 opened 6 years ago

saket424 commented 6 years ago

@hobbyquaker ,

unifi.post('upd/wlanconf/', {enabled: false}).then(console.log);

Is it possible to support a force_provision option for the case when the unifi controller fails to reliably enable/disable wifi on all devices that it controls. Some of the time, some of the AP devices, never receive the provisioning command from the unifi controller to enable/disable wifi. What fixes it is a force_provision on the device that failed to go in the PROVISIONING state. Have you seen this unreliable behavior in the controller not honoring the command for wifi on some of the APs in a multi-AP wan group scenario?

The turning on/off led seems much more reliable

The force_provision is on a per AP mac address basis and looks something like this

curl -X POST 'https://example:8443/api/s/default/cmd/devmgr' -H 'Content-Type: application/json' -H 'Accept: application/json' --data-binary '{"mac":"78:8a:20:4b:56:6d","cmd":"force-provision"}' --insecure

hobbyquaker commented 6 years ago

sure, no problem. will include that command in the next update.