Update getDevice script