Closed ISO-B closed 5 years ago
That would be awesome. But where can we get the firmware?
Envoyé de mon iPhone
Le 28 nov. 2018 à 17:37, Vesa notifications@github.com a écrit :
Should zigate be able to work as OTA server? I am using firmware 3.0e. I have been trying to get Ikea trådfri lamp to fetch ota updates from zigate. For me it seems that 0x0505 command doesn't do anything.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
https://www.reddit.com/r/tradfri/comments/79vycn/ikea_just_updated_releasenotes_for_ikea_bridge/
It s talking about the gateway, but you can find firmware link for bulbs in a json. But 1 Years old, IDK if there is more in date link.
At the moment you can update Ikea stuff using deCONZ using their conbee or rasbee sticks. Their rest api repo has python script that show how to download latest ota files from Ikea. Those ota files contain some extra stuff that can be easily removed and after that you have standard ota image.
As far as I understand OTA process works two ways.
So far I havn't seen any devices quering images on their own. Also using notify image command 0x0505 doesn't make any difference. Zigate gets status success message after that command but nothing else happens. Might be that I have wrong syntax and that why lamp doesn't ask for ota image. Figured it would be easier to ask that are these commands and features even implemented on current firmware rather than banging my head against wall for many hours.
Just little update for this. Managed to build debug version of ZiGate firmware which makes debugging this easier. Noticed that devices actually request OTA files time to time and usually on startup. After that I had big facepalm moment when I found out that I have been using wrong OTA image. Now I am able to start updating process. Next things is to improve python library to get OTA file sent to client. I can confirm that OTA is implemented and it is working.
Would it be helpfully to get QUERY_NEXT_IMAGE_REQUEST messages passed to serial line?
Excellent news ! Where do you find the OTA images ?
great news !
Managed to update Trådfrin 980lm E27 bulb firmware with ZiGate using python library. You can probably use TestGui to do same as well.
Excellent news ! Where do you find the OTA images ?
deCONZ have python script for downloading ota files from ikea. You can also use deCONZ to convert ikea ota files to standard ota files. Load ikea file using STD OTAU Plugin. Open it from OTAU File tab and save it and its converted to standard ota file.
Could you share a quick doc on how to do it (direct liks to source, steps to follow,...)
Downloading and converting ikea ota files
Upgrading firmware using python ZiGate library
import logging
logging.basicConfig()
logging.root.setLevel(logging.DEBUG)
import zigate z = zigate.connect(port=None)
3. Pair your device to ZiGate `z.permit_join()` command allows joining for 30sec
4. Check what is your devices address. You can find it from debug messages or `z.devices` command
5. Load image to python and send headers to ZiGate `z.ota_load_image('path_to_ota_file')`
6. Notify your device that there is image available `z.ota_image_notify('ADDR')` replace ADDR with your device address.
7. Wait until upgrade process is done. You should get debug messages that tell what is going on.
8. Done
**Upgrading using TestGui**
1. Download and extract https://github.com/fairecasoimeme/ZiGate/releases/download/v3.0e/ZiGate.zip
2. Start TestGui from Tools/TestGui/ZGWUI
3. From menu click setting
4. Select correct port and baud rate(115200). Click Ok
5. From menu select open port
6. Select OTA Cluster tab
7. Press Load Image. Select desired ota image and open it. You might need to change file extension to .ota
8. OTA headers should be visible on boxes. Image headers are automatically sent to ZiGate.
9. Image notify row: Short, ADDRESS, 01, 01, JITTER, FFFFFFFFF, FFFF, FFFF, 64
10. Click image notify and you should see progress bar moving in bit.
11. Wait until process is done
12. Done
That's how you do it. I wrote these from memory so there might be some errors, but hopefully nothing major.
Huge thanks, will have a look soon.
@ISO-B
Downloading and converting ikea ota files
Thanks a lot for sharing
Hi,
I tried to update an ikea tradfri outlet using ota file. Step :
I get this: Something wrong with ota file header. I use python library 2.8.0 and zigate USB TTL with firmware 3.0f
Here is the debug log for command 0x0500:
DEBUG:zigate:REQUEST : 0x0500 b'\x02\x00\x00\x0b\xee\xf1\x1e\x01\x00\x008\x00\x00\x11|\x11\x01 \x01\x96#\x00\x02EBL tradfri_control_outlet \x00\x03\x19\xbe\x00\x00\x00\x00\x00\x03\x19\x80\x00\x02\x8c\xe3\x02' DEBUG:zigate:Msg to send b'05000048a70200000beef11e010000380000117c110120019623000245424c20747261646672695f636f6e74726f6c5f6f75746c6574202020202020000319be000000000003198000028ce302' DEBUG:zigate:Encoded Msg to send b'0102150210021048a7021202100210021beef11e0211021002103802100210117c11021120021196230210021245424c20747261646672695f636f6e74726f6c5f6f75746c65742020202020200210021319be0210021002100210021002131980021002128ce3021203' DEBUG:zigate:Waiting for status message for command 0x0500 DEBUG:zigate:Raw packet received, b'\x01\x80\x02\x10\x02\x10\x02\x15f\x02\x10\xd3\x02\x100\x02\x10\x03' DEBUG:zigate:Dispatch ZIGATE_PACKET_RECEIVED DEBUG:zigate:Received response 0x8000: b'00d30030' DEBUG:zigate:RESPONSE 0x8000 - Status response : status:0, sequence:211, packet_type:48, error:b'', lqi:0 DEBUG:zigate:Dispatch ZIGATE_RESPONSE_RECEIVED DEBUG:zigate:STATUS code to command 0x0030:RESPONSE 0x8000 - Status response : status:0, sequence:211, packet_type:48, error:b'', lqi:0 DEBUG:zigate:Waiting for message 0x8030 DEBUG:zigate:Raw packet received, b'\x01\x80\x02\x10\x02\x10\x02\x15\x80\x02\x10\x02\x10\x02\x15\x02\x10\x02\x10\x03' DEBUG:zigate:Dispatch ZIGATE_PACKET_RECEIVED DEBUG:zigate:Received response 0x8000: b'00000500' DEBUG:zigate:RESPONSE 0x8000 - Status response : status:0, sequence:0, packet_type:1280, error:b'', lqi:0 DEBUG:zigate:Dispatch ZIGATE_RESPONSE_RECEIVED DEBUG:zigate:STATUS code to command 0x0500:RESPONSE 0x8000 - Status response : status:0, sequence:0, packet_type:1280, error:b'', lqi:0 WARNING:zigate:Something wrong with ota file header. WARNING:zigate:Cannot read ota header. No ota file loaded.
I tried with other files from http://fw.ota.homesmart.ikea.net with same result Did I miss something ?
Thank you for your help.
Should zigate be able to work as OTA server? I am using firmware 3.0e. I have been trying to get Ikea trådfri lamp to fetch ota updates from zigate. For me it seems that 0x0505 command doesn't do anything.