As both a solar enthusiast and 40+ year software developer I have to shake my head at Victron's update activity for their inverters, for example. Otherwise, I think you guys are amazing at everything else you do and the content of your updates are timed well and appropriate.
That said, why on Earth would you stream the update to the device through the smartphone? Here's what I see is happening with the activity:
- Visiting the details page for the inverter (Phoenix 24/1200) queries Victron's server to determine if an update is available. [I note that I lived in a very rural area with spotty cell tower connectivity and initially I'd prevented the app from using cell data.] An update v1.35 was available.
- I chose to accept the update and it began in earnest. At this point it was perhaps 45% into that update.
- Of course the inverter toggled to the OFF mode.
- My internet router was then powered OFF as well.
- My smartphone lost internet connectivity.
- The app at this point prompted that I might need to turn ON cell data permission for this app.
- I toggled ON cell data but at this point my Verizon connectivity went from one bar and LTE to "SOS Only".
- The update process eventually timed out. The inverter could not be toggled ON via the app.
- It was necessary to turn off various devices inside my house since the power outage was going to be of questionable duration.
- Revisiting the Settings page for the inverter it now demanded that I update. I note that there was no internet—given that the inverter was toggled OFF—and there was no cell signal available.
- I put on my boots and began hiking around in the foot-deep snow outside in an attempt to find a suitable cell tower signal within the Bluetooth radius of the inverter.
- I eventually found a single bar of Verizon connectivity with LTE which was within the Bluetooth radius for the inverter. I repeated the update process which slowly finished the process and returned the inverter to service.
I would suggest instead the following order of events to avoid these sort of bricked-device scenarios:
- Query the server, determine if an update is available and simply download the update on the smartphone's local storage. Determine if another update follows this one and conditionally download that as well.
- Prompt the user to see if they would like to accept the update or updates. Let them decide which final version they want in the potential series of updates.
- Toggle the inverter in this case to the OFF mode and apply the updates in order.
- Leave the updates in local storage.
- Return the inverter quickly back into service by turning it ON. This should half the time necessary for the power outage and remove any danger of bricking the device. Even in the event of a bad final-version update, the user could revert the device to a previous version if they so wished.
The reason why you would maintain a persistent "device tree" of updates in local storage on the smartphone is that people like myself maintain other people's solar installations. Secondly, there are times when the latest version of software might otherwise brick the device; having the prior versions locally could prevent this scenario. I might suggest a device tree something like:
/Victron/A27A/1.35/ (assuming that A27A is the product code for this inverter)
/RespectfullySent
Michael