ESP32 ota from url triggered in code

With esp32 platformio on vscode - trying to find a way to trigger ota update in my code from a .bin file at a static url. So basic idea is we update a file on one of our servers, as esp32’s come online they check their version against a value on our server. If they are out of date the code in the esp32 triggers ota based on that static url.

What specific part are you stuck on? Have you thought about adding a versioning or checksum to this so that the ESP32 can determine whether its firmware is out of date or not?

Max, I think we have the version control and how to check if it’s out of date taken care of - I think the part I need help on is just what code to run (when the program has determined it’s time) to get a .bin file from our server (something like https://myserver.com/firmware.bin for an example) and then install that program and run it on the esp32.

I found this example which I think is what we want to do

You’ll probably want to use httpUpdateSecure.ino from the official, built-in HTTPUpdate library.

Yep - I don’t think it’s “secure” but that code worked. Thank you!