Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: prevent parallel FW updates and soft/hard reset during ongoing FW updates #5220

Merged
merged 4 commits into from
Jan 2, 2023

Conversation

raman325
Copy link
Contributor

Per zwave-js/zwave-js-server#772 (comment) , we won't let hard resets or soft resets occur while a firmware update is in progress. Al has also mentioned that two firmware updates should not happen in parallel (at least for now), so this PR protects against those as well

Copy link
Member

@AlCalzone AlCalzone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok with my changes

Comment on lines +4662 to +4663
// Don't let two firmware updates happen in parallel
if (this.isAnyOTAFirmwareUpdateInProgress()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sure this change will get complaints from users who queue a bunch of firmware updates for sleeping nodes. However I think it makes sense, at least until I can implement some kind of task scheduling in the driver.

Comment on lines 179 to 180
/** A firmware update is already in progress preventing this action from proceeding */
Firmware_Update_In_Progress_Error,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing you want to distinguish this from FirmwareUpdateCC_Busy?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In any case, I renamed it to match the other flag.

@AlCalzone AlCalzone changed the title feat: protect application from ongoing firmware updates feat: prevent parallel FW updates and soft/hard reset during ongoing FW updates Jan 2, 2023
@AlCalzone AlCalzone enabled auto-merge (squash) January 2, 2023 11:18
@AlCalzone AlCalzone merged commit c6eafb5 into zwave-js:master Jan 2, 2023
AlCalzone added a commit that referenced this pull request Jan 16, 2023
### Features
* Support OTW firmware updates of 500 and 700+ series controllers (#5321, #5326)
* Parallel firmware updates and soft/hard reset during ongoing firmware updates is now prevented (#5220)
* Added a readonly `rfRegion` property to the `Controller` class (#5288)
* Added support for requesting region-specific firmware updates from the update service (#5296)
* Allow configuring the number of kept logfiles (#5294)
* Added support for the `Inclusion Controller CC` which allows secondary controllers in the network to include devices on behalf of Z-Wave JS (#4851)
* Added support for scanning QR codes that only contain the DSK, as well as pre-filling the DSK before the inclusion process (#5309)

### Bugfixes
* Known Wake Up CC version no longer gets overwritten with 1 (#5261)
* Surrounding whitespace in S2 or SmartStart QR codes now gets ignored (#5295)
* Always use S2 for endpoint communication if the node uses S2 (#5310)
* Distinguish between protocol and SDK version on 500 series (#5323)

### Config file changes
* Add metadata for Sensative strips (#5223)
* Add Ring Retrofit Alarm Kit (#5299)
* Correct value size for some Nortek/GoControl device params (#5297)
* Correct low temp threshold for Aeotec aërQ (#5286)
* Add fingerprint for Fibaro FGWP102 (#5280)
* Add metadata to Aeotec aërQ (#5224)
* Allow higher minimum dim level for Inovelli LZW31-SN, FW 1.57+ (#5181)
* Add Zooz 800 series controllers (#5324)

### Changes under the hood
* Removed a workaround for broken caching in the `got` library (#5090)
@raman325 raman325 deleted the firmware branch October 15, 2023 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants