IOT-13Recommended
Resume downloads and install only when power allows
Download firmware in resumable pieces and check the whole image's hash before installing. Install only on mains power or above 30% battery, and never in the middle of a task the user is waiting for.
How to do it
Home networks drop, and batteries run out. A download that starts over on every drop never finishes on a weak link. Use HTTP range requests or a block-wise transfer, and keep what arrived. Let the device delay the install until a lock has finished locking or a meter has finished its reading. Tell the user before an update stops the device from working, and say for how long. If power fails during the install, the device starts the old slot as keep the old firmware until the new one proves it works says.
How to check
In a lab test, the network is cut at half of a download, and the download resumes from where it stopped. At 20% battery the device postpones the install. Power cut during the install leaves it running the previous version.
Sources
Related rules
- IOT-10 Keep the old firmware until the new one proves it works in Connected devices
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/connected-devices/firmware-updates/safe-install-conditions">Agent Wranglers connected devices playbook</a>. In code you write, add a comment next to it with the same link.