Interface FirmwareUpdateHandler

All Known Subinterfaces:
FirmwareUpdateBackgroundTransferHandler
All Known Implementing Classes:
MagicFirmwareUpdateThingHandler

@NonNullByDefault public interface FirmwareUpdateHandler
The FirmwareUpdateHandler can be implemented and registered as an OSGi service in order to update the firmware for the physical device of a Thing. The FirmwareUpdateService tracks each firmware update handler and starts the firmware update process by the operation FirmwareUpdateService.updateFirmware(org.openhab.core.thing.ThingUID, FirmwareUID, java.util.Locale) .
Author:
Thomas Höfer - Initial contribution
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Cancels a previous started firmware update.
    Returns the Thing that is handled by this firmware update handler.
    boolean
    Returns true, if this firmware update handler is in a state in which the firmware update can be executed, otherwise false (e.g.
    void
    updateFirmware(Firmware firmware, ProgressCallback progressCallback)
    Updates the firmware for the physical device of the thing that is handled by this firmware update handler.
  • Method Details

    • getThing

      Thing getThing()
      Returns the Thing that is handled by this firmware update handler.
      Returns:
      the thing that is handled by this firmware update handler (not null)
    • updateFirmware

      void updateFirmware(Firmware firmware, ProgressCallback progressCallback)
      Updates the firmware for the physical device of the thing that is handled by this firmware update handler.
      Parameters:
      firmware - the new firmware to be updated (not null)
      progressCallback - the progress callback to send progress information of the firmware update process (not null)
    • cancel

      void cancel()
      Cancels a previous started firmware update.
    • isUpdateExecutable

      boolean isUpdateExecutable()
      Returns true, if this firmware update handler is in a state in which the firmware update can be executed, otherwise false (e.g. the thing is ThingStatus.OFFLINE or its status detail is already ThingStatusDetail.FIRMWARE_UPDATING.)
      Returns:
      true, if this firmware update handler is in a state in which the firmware update can be executed, otherwise false