I finally got around to writing this up this afternoon. The following shows how to use the OTA Firmware Provider - this is for ZigBee, but ought to work for other bindings supporting the OTA features as well.
The first thing you need to do is to install the Firmware Provider. This is a simple provider that allows users to drop firmware files into the userdata
folder along with the required metadata. The firmware provider can be downloaded here, and should be installed into the addons
folder as with any other extension.
To create a firmware file for use with the provider, you first need the firmware itself. For ZigBee, this must be the standard ZigBee OTA file format from the device manufacturer. In the example below, I will upgrade an OSRAM RGBW A60 bulb - the firmware was downloaded from here.
You need to create a file called directory.xml
with the following format -:
<Directory>
<DirectoryEntry>
<filename>ZLL_MK_0x01020510_CLA60_RGBW_OSRAM.ota</filename>
<thingTypeUid>zigbee:device</thingTypeUid>
<version>0x01020510</version>
<vendor>OSRAM</vendor>
<model>CLA60 RGBW OSRAM</model>
<description></description>
<hash></hash>
<prerequisiteVersion></prerequisiteVersion>
</DirectoryEntry>
</Directory>
The values here are obviously important. The filename
is the name of the OTA file, the vendor
and model
are values the bulb reports - you can see these in the properties -:
These MUST be the same values for the firmware provider to match the firmware. Note that the thingTypeUid
will normally be zigbee:device
for ZigBee - unless there is a specific device type (but there are only a few of these which are required to work around manufacturer specific features).
The version
is binding dependant, but for ZigBee will be a hexadecimal number (so starting with 0x
). If you don’t know the file version, you can find it from the console with the command -:
> otaupgrade file ZLL_MK_0x01020510_CLA60_RGBW_OSRAM.ota
OTA File: ZigBeeOtaFile [headerVersion=256, manufacturerCode=4364, imageType=0062, fileVersion=01020510, stackVersion=ZIGBEE_PRO, headerString=NULL, imageSize=142972]
This shows the version is 01020510
, so we use 0x01020510
in the XML file.
You must then ZIP up the OTA file along with the directory.xml
file. You can call the resulting file whatever you like, but it must have the extension fwp
. This file must be placed into a folder called userdata\firmware
.
It’s worth noting that you can add multiple OTA files into a single FWP file simply by adding more <Directory>
entries in the XML and ZIPing up all the OTA files. This allows (for example) all OSRAM firmware files to be distributed in a single FWP file.
Now to update the firmware…
In PaperUI, go to the Thing Configuration. If the firmware file is not in the firmware folder, or the firmware provider isn’t running, or there is no match with the device information, then the firmware state will be UNKNOWN
-:
If new firmware is available, you will have the option to install it -:
Click the install button and grab a coffee (well, maybe just an expresso - it doesn’t take too long) -:
Once the transfer completes, the bulb will restart (it will normally flash) and after maybe 30 to 60 seconds the bulb should come back online in PaperUI -:
You bulbs firmware is now Up to date
.