Skip to content

feat: add ability to abort running OTA#1759

Draft
Nerivec wants to merge 1 commit into
masterfrom
abort-ota
Draft

feat: add ability to abort running OTA#1759
Nerivec wants to merge 1 commit into
masterfrom
abort-ota

Conversation

@Nerivec
Copy link
Copy Markdown
Collaborator

@Nerivec Nerivec commented May 16, 2026

On paper (i.e. spec), this should allow to abort an in-progress OTA.
Though, since vastly untested, and with the many stacks out there, it needs testing with various devices to ensure no undesired behavior can result of this.
The device has to properly process the response, and abort the OTA process on its side. While it should be fairly simple, the lack of handling could send the device into a permanently unanswered repeat of last block request (until it eventually times out on its end, if). I guess worse case scenario, albeit unlikely, would be bricking the device if for some reason the abort isn't properly handled (could try to flash with a partial image, keep a partial image in slot that could mess with device state detection...).

@andrei-lazarov @burmistrzak if you have some time to test this with actual devices.

@burmistrzak
Copy link
Copy Markdown
Contributor

Question is, what do we do when a devices replies with Malformed Command and requests another block afterwards to continue OTAU?
IIRC, that's especially an issue with Hue accessories Koenkk/zigbee2mqtt#31590 (comment)

@Nerivec
Copy link
Copy Markdown
Collaborator Author

Nerivec commented May 17, 2026

@burmistrzak this should already be fixed in #1758. We can just ignore the malformed since the device is expected to continue requesting blocks at the proper offset. The ignore was missing, which caused the undesired state after the recent PR that added default response matching.

@burmistrzak
Copy link
Copy Markdown
Contributor

@Nerivec That's good to know! I've got a bunch of outdated Hue remotes still around. So I should be able to verify the fix. 🤞🤞🤞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants