mirror of
https://github.com/Art-of-WiFi/UniFi-API-client.git
synced 2024-11-22 02:00:21 +01:00
re-added the upgrade_device() function/method
This commit is contained in:
parent
a238ced589
commit
ccea0eee99
@ -1916,6 +1916,24 @@ class Client
|
||||
return $this->process_response_boolean($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Upgrade a device to the latest firmware
|
||||
* ---------------------------------------
|
||||
* return true on success
|
||||
* required parameter <device_mac> = MAC address of the device to upgrade
|
||||
*
|
||||
* NOTES:
|
||||
* - updates the device to the latest firmware known to the controller
|
||||
*/
|
||||
public function upgrade_device($device_mac)
|
||||
{
|
||||
if (!$this->is_loggedin) return false;
|
||||
$json = ['mac' => $device_mac];
|
||||
$json = json_encode($json);
|
||||
$response = $this->exec_curl('/api/s/'.$this->site.'/cmd/devmgr/upgrade', 'json='.$json);
|
||||
return $this->process_response_boolean($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Upgrade a device to a specific firmware file
|
||||
* --------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user