It looks Legrand with Netatmo devices don't provide the firmware version during initialisation as expected.
It would be nice to gracefully cope with this behaviour, for exemple by adding the following provision in ZigBeeThingHandler.otaIncomingRequest(QueryNextImageCommand command)
@Override
public ZigBeeOtaFile otaIncomingRequest(QueryNextImageCommand command) {
// We simply store the requested firmware version information so that it's
// available for the firmware provider
lastFirmwareVersion = new ZigBeeFirmwareVersion(command.getManufacturerCode(), command.getImageType(),
command.getFileVersion());
// Some devices (e.g. Legrand) only report their firmware version in this request.
// We can use this to update the thing property.
String newFirmwareVersion = String.format("%s%08X", ZigBeeBindingConstants.FIRMWARE_VERSION_HEX_PREFIX,
command.getFileVersion());
if (!newFirmwareVersion.equals(getThing().getProperties().get(Thing.PROPERTY_FIRMWARE_VERSION))) {
updateProperty(Thing.PROPERTY_FIRMWARE_VERSION, newFirmwareVersion);
}
// We always return null as we don't want to automatically start the OTA
// Instead we should use the OH concept for firmware management which let's the
// user know there's a
// firmware waiting.
return null;
}
It looks Legrand with Netatmo devices don't provide the firmware version during initialisation as expected.
It would be nice to gracefully cope with this behaviour, for exemple by adding the following provision in
ZigBeeThingHandler.otaIncomingRequest(QueryNextImageCommand command)