Firmware Management

Pre-requisite: The user has to be signed in to perform the following operations.


Get the latest firmware version for a device

To get the latest firmware version available for the device, The following method can be used:

  • spaceId (required): The space ID of the device.
  • deviceId (required): The device ID of the device.
Factory.deviceService.getLatestFirmwareVersion(spaceId: String, deviceId: String) -> IVPublisher<FirmwareVersionModel>

Initiate a firmware update of a device

To update the firmware of the device, The following method can be used:

  • spaceId (required): The space ID of the device.
  • deviceId (required): The device ID of the device.
  • request (required): The request object containing the firmware version to be updated.
Factory.deviceService.upgradeFirmware(spaceId: String, deviceId: String, wakeup: Bool, request: FirmwareUpdateRequest) -> IVPublisher<Void>

Get the status of the firmware update of a device

To get the status of the firmware update, The following method can be used:

  • spaceId (required): The space ID of the device.
  • deviceId (required): The device ID of the device.
Factory.deviceService.getFirmwareUpdatingStatus(spaceId: String, deviceId: String) -> IVPublisher<FirmwareStatusModel>

Get the latest firmware version for all devices in a space

To get the latest firmware available for the device, The following method can be used:

  • spaceId (required): The space ID of the device.
Factory.deviceService.getDevicesLatestFirmware(spaceId: String) -> IVPublisher<[LatestFirmwareVersionModel]>