diff --git a/org.openhab.binding.zigbee/src/main/java/org/openhab/binding/zigbee/ZigBeeBindingConstants.java b/org.openhab.binding.zigbee/src/main/java/org/openhab/binding/zigbee/ZigBeeBindingConstants.java index 30ee6ef6b..fa7e8ec3a 100644 --- a/org.openhab.binding.zigbee/src/main/java/org/openhab/binding/zigbee/ZigBeeBindingConstants.java +++ b/org.openhab.binding.zigbee/src/main/java/org/openhab/binding/zigbee/ZigBeeBindingConstants.java @@ -245,6 +245,7 @@ public class ZigBeeBindingConstants { public static final String OFFLINE_DISCOVERY_INCOMPLETE = "@text/zigbee.status.offline_discoveryincomplete"; public static final String FIRMWARE_FAILED = "@text/zigbee.firmware.failed"; + public static final String FIRMWARE_VERSION_HEX_PREFIX = "0x"; // List of channel state constants public static final String STATE_OPTION_BATTERY_MIN_THRESHOLD = "minThreshold"; diff --git a/org.openhab.binding.zigbee/src/main/java/org/openhab/binding/zigbee/discovery/ZigBeeNodePropertyDiscoverer.java b/org.openhab.binding.zigbee/src/main/java/org/openhab/binding/zigbee/discovery/ZigBeeNodePropertyDiscoverer.java index ef7c41292..a836af420 100644 --- a/org.openhab.binding.zigbee/src/main/java/org/openhab/binding/zigbee/discovery/ZigBeeNodePropertyDiscoverer.java +++ b/org.openhab.binding.zigbee/src/main/java/org/openhab/binding/zigbee/discovery/ZigBeeNodePropertyDiscoverer.java @@ -185,7 +185,8 @@ public Map getProperties(final ZigBeeNode node) { if (otaCluster != null) { Integer fileVersion = otaCluster.getCurrentFileVersion(Long.MAX_VALUE); if (fileVersion != null) { - properties.put(Thing.PROPERTY_FIRMWARE_VERSION, String.format("%08X", fileVersion)); + properties.put(Thing.PROPERTY_FIRMWARE_VERSION, + String.format("%s%08X", ZigBeeBindingConstants.FIRMWARE_VERSION_HEX_PREFIX, fileVersion)); } else { logger.debug("{}: OTA firmware failed", node.getIeeeAddress()); } diff --git a/org.openhab.binding.zigbee/src/main/java/org/openhab/binding/zigbee/handler/ZigBeeThingHandler.java b/org.openhab.binding.zigbee/src/main/java/org/openhab/binding/zigbee/handler/ZigBeeThingHandler.java index db049490b..211ede8dd 100644 --- a/org.openhab.binding.zigbee/src/main/java/org/openhab/binding/zigbee/handler/ZigBeeThingHandler.java +++ b/org.openhab.binding.zigbee/src/main/java/org/openhab/binding/zigbee/handler/ZigBeeThingHandler.java @@ -884,7 +884,8 @@ public void otaStatusUpdate(ZigBeeOtaServerStatus status, int percent) { for (int retry = 0; retry < 3; retry++) { Integer fileVersion = finalOtaServer.getCurrentFileVersion(); if (fileVersion != null) { - updateProperty(Thing.PROPERTY_FIRMWARE_VERSION, String.format("%08X", fileVersion)); + updateProperty(Thing.PROPERTY_FIRMWARE_VERSION, String.format("%s%08X", + ZigBeeBindingConstants.FIRMWARE_VERSION_HEX_PREFIX, fileVersion)); break; } else { logger.debug("{}: OTA firmware request timeout (retry {})", node.getIeeeAddress(), retry);