zwave-js / zwave-js-ui

Full featured Z-Wave Control Panel UI and MQTT gateway. Built using Nodejs, and Vue/Vuetify
https://zwave-js.github.io/zwave-js-ui
MIT License
938 stars 200 forks source link

Possible to queue OTA updates? #3283

Open rafaelmathieu opened 12 months ago

rafaelmathieu commented 12 months ago

Currently I have over 100 devices on my network and one of my switch just got a Firmware update. The problem is I have 50 of them.

As far as I have seen, I can only update one at a time which is a pain to do.

Is there a way to Queue the updates so that the next update starts automatically after the previous one completes?

robertsLando commented 12 months ago

@AlCalzone Correct me if I'm wrong but this should already happen? If a user start updates on multiple devices them are queued, right?

rafaelmathieu commented 12 months ago

As far as I have tried it didn't seem possible.

returns this error:

image
robertsLando commented 12 months ago

I can add this feature on my side, anyway I would like to know @AlCalzone opinion on this, maybe it makes more sense to have it implemented on driver side so other applications can use this feature that in cases like yours is so useful

AlCalzone commented 11 months ago

Not possible at the moment. I plan to add a higher level queue into the driver that can queue tasks, so this becomes possible in the future: https://github.com/zwave-js/node-zwave-js/issues/3707

rafaelmathieu commented 11 months ago

I look forward to be able to do this. took me almost 2 weeks to update everything. (didn't do this full time)

github-actions[bot] commented 8 months ago

This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label

github-actions[bot] commented 8 months ago

This issue is now closed due to inactivity, you can of course reopen or reference this issue if you see fit.

jfhautenauven commented 7 months ago

This feature is interesting for me too. Been investing in a lot of new Shelly Zwave modules recently and for once that a manufacturer seems to care about regularly providing new firmwares, I think I will have to regularly update a bunch of my modules. Doing them one by one is very time consuming TBH.

robertsLando commented 7 months ago

@jfhautenauven This is something that should be implemented on driver side firstly

jfhautenauven commented 7 months ago

@robertsLando indeed, I've read the above :)

@AlCalzone : this is still something planned in the driver right ? :p

malammar commented 3 months ago

This is very simple to script out. Not sure why a driver update is required.

  1. Create a queue for OTA FW updates
  2. Run the first update in the queue
  3. Poll every n seconds/minutes for update status/success.
  4. On success/timeout reinterview node and start the next FW update in the queue

Adding retry/backoff would remedy any issues with update interruption and failures.

AlCalzone commented 3 months ago

Not sure why a driver update is required.

Because I'd like to implement that functionality in the driver, and I'd like to do it the right way. There are multiple things that could benefit from the same mechanism.

Sure @robertsLando could hack around it but that would be wasted work once the driver can do it natively.