I know that we have a few samples in this area, give me a few days to clean them up and I can see about getting something up there with the other samples on GitHub. If possible, I'll see about getting a more general write-up for the blog area finished.
1. Runs the same health check that we run when intiating an upgrade operation from the GUI interface[s].
2. Takes a firmware file from the user's local filesystem and uploads it, telling the controller[s] to activate it immediately.
3. Waits for the controllers to reboot and become active again.
I can elaborate on any portions that are unclear, and this may be the subject of a future article out on The Pub. I know you aren't the only one interested in how to do this, and I think a more general explanation would be helpful.