Seems like zigbee_datecode is the best indicator for the installed firmware. Looking at a Busch-Jaeger RM01, zigbee_datecode is 20161209, which corresponds with the OTA file of the installed firmware: 112E_0001_1.2.0_20161209_RockerMains.zigbee.
Some of my devices also have a firmwareVersion attribute, which doesn’t make much sense to me (eg. 0x11040002, 0x11115720). Seems to be too high a value for a build number.
The best one is firmwareVersion this is the one I mentioned that PaperUI displays, and this is the one that is used within OH to compare versions (it’s a system property). It’s also the one that comes from the OTA cluster and is therefore used during the OTA Upgrade process to check if it worked.
Which the files provided by IKEA are not unfortunately. I tried them and got the following error: Error executing command: java.lang.IllegalArgumentException: ZigBee OTA file is not a valid format
Did a little digging and found the following info on github:
“The firmware files of IKEA are raw data, not packet into an standard OTA file format. So in order to use them the .zigbee format binary header must be put before the data payload as described in the spec.”
If someone has a valid OTA zigbee file and wants to give this a try, here are some details of the process:
put the OTA file in the same folder as ZigbeeConsole.jar
stop openhab
start ZigbeeConsole.jar (example for my network/coordintaor: sudo java -jar ZigBeeConsole.jar -dongle EMBER -port /dev/ttyEM3588 -baud 115200 -flow hardware -c 21
wait for startup and discovery to finish and execute the nodes command
You’ll get a list of devices with entries like this one:
Network Addr IEEE Address Logical Type EP Profile Device Type
16972 424C 000B57FFFEB1BAB5 ROUTER 1 ZIGBEE_HOME_AUTOMATION COLOR_TEMPERATURE_LIGHT
Then you should be able to update the firmware like this:
ota 16972/1 filename.zigbee
ota 16972/1 complete
@chris an unrelated question: is it possible to stop all the debug output of the ZigbeeConsole? It’s quite difficult to follow command execution with all the debug output that is generated.
Also I found that the IKEA files can be converted to regular OTA files with deconz.
So I did that and executed the commands:
> ota 16972/1 10035514-TRADFRI-bulb-ws-1.2.221.ota
OTA File: ZigBeeOtaFile [headerVersion=256, manufacturerCode=4476, imageType=2201, fileVersion=12221572, stackVersion=ZIGBEE_PRO, headerString=EBL tradfri_light , imageSize=172734]
> ota 16972/1 complete
Doesn’t look like anything happened though. I know the update takes a long time, like 20 minutes. Is there some kind of feedback to be expected or can I somehow check the progress of the update?
It means the device didn’t respond to the request. It might be something that has been introduced recently (although that’s unlikely as you’re using quite an old console) or it could be that the endpoint doesn’t exist or can’t be contacted.
I think it’s a lot more common that with ZWave - I’ve certainly got a lot of them here, although I’m not 100% sure if they are publicly available.
Ok, thanks for the explanation. The console is indeed quite old, but I guess it won’t make much difference since you said the ota code is quite old either?
I think the endpoint is ok, looks like the device is sending stuff if I’m not mistaken:
Yes, there have’t been any changes in it for a long time, but I know it is being used by DT so I believe it should work still.
This isn’t coming from the device - this is a notification from the coordinator.
Ok, but it would be good to get going in OH. If you like, please open an issue on GH and I will look at it when I get time (maybe over Christmas). I will only implement it as a console option in OH though since getting it working though PaperUI is a lot more hassle (although it is possible - I’d need to create more software to handle file system issues as per OH interfaces and it’s not worth the effort).
I tried again with a recent version of the ZigbeeConsole, but the result is the same.
I made sure the endpoint is responding. I can turn it on/off and info works as well:
Node Info Value
APPVERSION 17
DATE 20160927
HWVERSION 1
MANUFACTURER IKEA of Sweden
MODEL TRADFRI bulb E27 WS�opal 980lm
STKVERSION 87
ZCLVERSION 1
> off 16972/1
Success response received.
> on 16972/1
Success response received.
Unfortunately the only other devices I have OTA files for, are all on the most recent version already. I think I have another Ikea 600lm bulb somewhere, I’ll try with that one too, but I expect the result to be the same.
What “recent version” do you mean? Are you compiling it yourself? If not then it will likely be the same version.
I don’t really have time to look over this at the moment. I have a lot of Osram bulbs that have been used for OTA testing in the past, and some Bitron devices, but at the moment I need to focus on other issues.
The error simply looks like the device is not responding to the request. Can you also provide me the XML for this device? Also, can you provide the full log from the sending of the command to the reception of this error.
Can you also try the cmdsupported command - I think it should be cmdsupported endpoint 25 to get the list of commands that this bulb supports in the OTA cluster. Even if something isn’t supported, the device should really still respond, but who knows…
Interesting - it doesn’t seem to support any received commands. Strange. If it doesn’t support the notify received command that might explain things, although it is meant to respond with a “command not supported” response, and not just ignore it.
Yes, it should do - I’ve tested this with other devices. It won’t know this until the transfer starts though, and the transfer doesn’t start in your log.
I think somewhere I have a Tradfri bulb so when I get a chance I will try this.
Great, thanks. Let me know if you need some firmware files. The files from the IKEA feed are somehow packaged but can be converted to regular zigbee files with deconz.