Hi,
i wanted to know the best practice of detecting whether there is a new version available ?
our device is not alwayes connected to the internet, but when it does, we need to present to the user that there is a new version available, and update the containers when he approves.
whats the best way of doing that using balena os?
Hello! So you want your users to decide if they want to update. Currently how are you handling the fleet update? Do you have pinned releases for the devices and ask them if they want to update and then manually pin the device to the new release?
@mbalamat thanks for the answer.
The best solution for me will be to lock the device, so updates will be downloaded, but will be installed only upon approval from user.
is that something the balena API provides? state of the current version in the device? (i didnt find in the documentation, but i can see in the dashboard that there is a state, so i assume there is such option)
also before i start the update, i want to perform few operations (also close communication so it cant be accessed)
Hi,
unfortunately it is currently not possible to pre-download updates. You can influence the update strategy using the RESIN_SUPERVISOR_UPDATE_STRATEGY environment variable: https://www.balena.io/docs/learn/deploy/release-strategy/update-strategies/ but none of them would let separate the download and the actual update.
Are this parameters are global? or per service? in order to understand if there is an upload pending, do i need to question all the services or is it enough 1?
@mtoman
Is there a way i can mimic the behavior of the dashboard?
what i want to achieve on my app is starting to blink some LEDS on my device, the same time that on the dashboard i can see the “Downloading” phase in the services.
And stop the LEDS once it finished downloading and installing.
Is that possible? whats the best practice for that?
thanks for the answer @alexgg, i do see that the status is not changing while its downloading, maybe there it acts differently when delta download is available? it keeps being idle although it was downloading.
i did notice that: update_pending is reflecting well.
any idea why the status is not changing?
Hey Daniel, yeah it is possible that the update_pending is true but the device has not started the download yet, as it might be waiting for the delta generation to be complete. Did you never see observe the status to be Downloading during an application update?