dresden-elektronik / deconz-ota-plugin

Server side implementation of the standard Zigbee OTA protocol.
BSD 3-Clause "New" or "Revised" License
47 stars 13 forks source link

Update 100 nodes with the correct firmware #11

Closed ChrisPrefect closed 4 years ago

ChrisPrefect commented 4 years ago

I downloaded the tradfri firmware and opened the STD OATU plugin. But it is impossible to find the correct address to a specific device type and select the right firmware and then flash the device and repeat that for all 98 devices.

How can this be done? This absolutely has do work somehow automatically.

image

For reference: Script to download the firmware files: https://github.com/dresden-elektronik/deconz-rest-plugin/blob/master/ikea-ota-download.py

ebaauw commented 4 years ago

Update to the latest version and the OTAU plugin will jump to the corresponding row when you select a node in the map.

Download the firmware files to ~/otau and restart deCONZ. The OTAU plugin will match the file automatically. Mains powered devices will be updated automatically; for battery-powered devices you need to start the update.

Note that the plugin only updates one device at a time. Also note that it might take some time, before the device queries the OTAU server for new firmware.

ChrisPrefect commented 4 years ago

Thanks a lot! That sounds like it could work :-)

How can I update the OTAU plugin?

Is there a risk to flash the wrong firmware or can I safely click the update button on each row in the list?

This should be the correct folder for the firmware files I guess?

image

Clicking on a node in the graphical network view does not select the node in the STD OTAU Plugin list so far.

And the firmware files are not selected automatically if I click on a node in the list.

I installed the raspian image about three weeks ago, shouldn't this be the latest version?

Thanks for your help!

ebaauw commented 4 years ago

How can I update the OTAU plugin?

It’s included in the deCONZ distribution. Not sure, but I think you need v2.05.75 or later for the new functionality. Alternatively, you can compile and install the OTAU plugin, just like the REST API plugin.

This should be the correct folder for the firmware files I guess?

Yes. Make sure to restart deCONZ after downloading the firmware. The OTAU plugin will copy the files under a new name on startup, after which it should link them, when the device queries the OTAU server for newer firmware.

Is there a risk to flash the wrong firmware or can I safely click the update button on each row in the list?

The OTAU plugin won’t start sending the firmware when you select a firmware file with the wrong manufacturer or image.
While adding support for the Hue firmware file format I managed to send a corrupted firmware file to the Hue light. The firmware downloaded in full, but the device didn’t switch to it afterwards. So there seems to be some safeguards on the device as well, at least in Hue lights

I installed the raspian image about three weeks ago, shouldn't this be the latest version?

Apparently not. You can check the version under the Help menu.

ChrisPrefect commented 4 years ago

Thank you! Is there a way to get the latest version without having to compile it?

image

Would it help with reliability and speed to use a Raspberry Pi 4? I have one laying around and could just swap the SD card and ConBee-Stick over?

ebaauw commented 4 years ago

Thank you! Is there a way to get the latest version without having to compile it?

Yes upgrade to the latest deCONZ version, as I've said above.

Would it help with reliability and speed to use a Raspberry Pi 4? I have one laying around and could just swap the SD card and ConBee-Stick over?

Never tried that. Might work if you already run buster. If you still run stretch you're out of luck, as the Pi 4 only supports buster. You should be able to copy over the database and move the ConBee.

ChrisPrefect commented 4 years ago

The latest image is from last year?

deCONZ 2.05.72 Version 12-2019 veröffentlicht 17.12.2019

https://phoscon.de/de/conbee/sdcard

Or can I just do these steps on my current Raspian image? Will this update deCONZ?

image

Should I use the beta version?

Thanks a lot!

ebaauw commented 4 years ago

I'm sorry, I have no experience with the image, but you should be able to use apt to update deconz using these steps. It takes a bit longer for versions to be pushed to the stable channel, so I use the beta. I think you need as least .75. .78 will be published on beta shortly.

ChrisPrefect commented 4 years ago

I managed to upgrade, thanks for your tips! I am now on version .78

The .ota files where copied into the same directory but with different file names.

But the files are not automatically selected when I click on a node in the graphical overview or in the list. How do I select the right firmware for all the nodes?

image

Thank you!

ChrisPrefect commented 4 years ago

Update: It worked! After waiting some time, I can now select a row and click on "Query" and it sometimes loads an update. The version number does not change though.

image

But most of the nodes don't report back their vendor, image or version and do not start an update after a press on Query. Is this normal?

ebaauw commented 4 years ago

The version number does not change though.

It will on the next Query, when the “done” status changes back to “no file”.

But most of the nodes don't report back their vendor, image or version and do not start an update after a press on Query. Is this normal?

The plugin only updates one device at a time. The light drives the update process, not the plugin. The buttons “invite” the light to start the process. When the light wants to start upgrading and the plugin is busy upgrading another device, it’s up to the light to try again after some time. Some devices do this every 5 minutes, others take several hours. If you keep the plugin running for a day, you should see all rows populated (except for unreachable devices).