diff --git a/src/Client.php b/src/Client.php index 3dbbeee..b394a72 100755 --- a/src/Client.php +++ b/src/Client.php @@ -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 = 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 * --------------------------------------------