From ccea0eee99347fed52dec799765f634f53567059 Mon Sep 17 00:00:00 2001 From: malle-pietje Date: Wed, 11 Apr 2018 07:50:49 +0200 Subject: [PATCH] re-added the upgrade_device() function/method --- src/Client.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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 * --------------------------------------------