Self Updating Pro Mini & Esp8266

Hi all!

I’m working on some home automation controllers and am to the point that I would like to make them permanent but at the same time, I need to still be able to provide updates and I don’t want to have to go around and open up enclosures to update the controllers. I know there are plenty of OTA examples but I’d like to not rely on pushing those through the Arduino console. The controller I’m working on has both a pro mini for display/manual input/relay control and an ESP8266 for handling network connection/remote instruction processing via private server. So if like to update the firmwares by uploading the packaged binary to my server and sending a command to the device to update. My thought for this process would be to download the firmwares first to the onboard microSD, then the pro mini would flash the ESP first and make sure it’s working, and if not, it would roll back to the previous version of firmware. If successful, then the ESP would flash the pro mini, again, if unsuccessful, would roll back to the previous firmware.

First, is this approach feasible or is it overkill? Second, I’m having trouble finding examples of flashing an ESP from an Arduino that doesn’t focus on a serial connection. I’m just trying to find examples of how to prepackage the firmware that can be transmitted over WiFi and applied at a later time.

Thanks for any suggestions.

are you sure you have flash and SRAM for SD library on mini?
the esp8266 can update itself and it can update the Mini. it is simple over SPI (ESP8266AVRISP library) and not so simple but doable over serial bootloader.
for Mini a SD bootloader can bootload from SD card. I use zevero/avr_boot (with a 1284p).

First question always - why do you need a Pro Mini? What does it do that a port expander cannot?