This example project gets you set up with OTA Hub DIY, ready for Over-The-Air updates driven directly from your GitHub repo's releases, all for free.
OTA Hub is designed to do one thing, and one thing only:
Deliver Over-the-Air updates onto your ESP32/embedded devices directly from your code releases in an obvious, clean, light-weight way.
OTA Hub DIY (this example) is for the hobbyists and small teams, directly grabbing release files from GitHub, involving as minimal setup as possible. It's completely open-source, and of course, free!
OTA Hub Pro is for the experts and larger teams, providing you with a dashboard to have finer control over your release deployment, fleet management, greater flexibility, and even less setup! Find out more at otahub.wordpress.com/.
- No-longer worry about drag-and-dropping
.bin
files into some fiddly UI. - Easily trace your code to your releases to your deployed firmware.
- Not locked into any eco-systems you probably aren't using already (you're probably already using GitHub).
- Client-agnostic! Implement OTA Hub on-top of secure or insecure* connections, on 4G, NB-IoT, or WiFi modules.
- The DIY version is open-source, completely free, and GitHub hosting is also (currently) completely free!
* Note that our default examples are for SSL-enabled connections, as GitHub requires a secure connection. As this is open-source, you can of course use your own storage buckets APIs for insecure connections etc.
There are only two steps you need to consider for OTA updates from GitHub:
-
Set up the CI/CD on your GitHub repo to automatically build the firmware on new releases. This is as easy as copying the .github/workflows/ project into your PlatformIO base directory (like in this example). Then, build new releases as normal.
-
Include the OTA-Hub library and example code you'll find in src/main.cpp. Note the
#define
s, and the inclusion ofOTA::isUpdateAvailable()
,OTA::performUpdate(..)
, andOTA::followRedirect(..)
.
That's it!
- hard-stuff/OTA-Hub-diy-device_client
OTA Hub DIY works with both your public and private repositories, pulling release files (that are automatically compiled) directly from GitHub. If using a private repository, you will need #define OTAGH_BEARER "your_token"
, learn more here.
This library has been tested on the ESP32S3 with both the internal WiFi functionality and a SIMCOM SIM7600G.
We are looking for people to support us in testing more boards, other connectivity functionalities, and making OTA Hub Pro even more useful. Contribute either on our GitHub repos, or contact us at [email protected].
Hard Stuff is a hardware prototyping agency and venture studio focussing on sustainability tech, based in London, UK. Find out more at hard-stuff.com.
This library is written and provided open-source in the hope that you go on to build great things.