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

[REQUEST] Add a batteries check and soft blocking of OTA updates of battery-powered devices unless have at least 70% battery life left #301

Open
Hedda opened this issue Nov 22, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Hedda
Copy link

Hedda commented Nov 22, 2024

Not sure if this feature request to prevent bad experinces with ZHA belongs here in the zha library or for Home Assistant but I would like to suggest that you consider adding a batteries check and soft blocking of OTA updates of battery-powered devices unless have at least 70% battery life left, where the user get a pop-up with some warning text about battery-life if try to update firmware when battery-percentage is at 69% or lower and has to press an "OK I understand the risk and bypass" button for ZHA to go ahead and continue with the OTA firmware even though.

Suggest both adding a check and also add a more verbose type warning text in the UI to explain why recomend fresh batteries:

  • Warning! Battery-level appears to be lower than 70%. OTA updating can be very power-consuming so it is therefore recommend that you replace batteries before starting the firmware update. Do you want to cancel the upgrade for now or proceed anyway?

FYI, Zigbee2MQTT instead just have this simple tip under the troubleshooting section in their documentation when might be to late:

This is indirectly related to this PR so do not have to add additional explaination in the informative header to ZHA update entity with info stating that the user themselves needs to check the battery life before starting OTA updates:

Note that frenck declined ZHA documentation update when simply true added a line under warnings about this, he instead commented that "This is not a burden we should be putting on users, it is up to us to handle this stuff.", meaning that this type of thing is something that he thinks that ZHA should handle.

  • Ensure battery-powered devices have at least 70% battery life.
  • Be patient as OTA updates can take 10 minutes or longer.
  • Avoid multiple simultaneous updates to reduce network traffic.

This is not a burden we should be putting on users, it is up to us to handle this stuff.

PS: Perhaps also add a tip comment there in the UI when press "upgrade" on a firmware update that Zigbee battery-powered end-devices may need to be manually woken up by trigger them by e.g. pushing a button right before checking for an OTA, or in some cases temporarily remove the batteries and put them back in.

By the way, Zigbee2MQTT also has these additional general tips in their documentation at the top of their OTA upgrade page:

"TIP: Always check if the firmware update will bring you advantages. Firmware updates are NOT made for Zigbee2MQTT, but for working with apps and hubs from the brand. In some cases the firmware update can cause that your device will react different then Zigbee2MQTT expects, making that you can't use it the way you want, at least until Zigbee2MQTT is changed to react to those changes. If you get annoyed by the notifications that there are updates available, then turn the automatic check off."

@TheJulianJES TheJulianJES added the enhancement New feature or request label Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants