espota-server is an HTTP server that can hold firmware for flashing with the ESP8266 Arduino firmware. It's useful when you have many ESP8266-based devices in the field and want them to download their own firmware to update themselves, rather than you having to push firmware to each one separately.
The main difference between the espota-server and any other HTTP server is that it only serves firmware to the device if there's a newer version of the firmware available. If there's no newer version, it just responds with a "no new version" and the device goes on its merry way.
To install espota-server, just compile it if you have Rust installed, or get the latest compiled binary from the nightlies page and drop it somewhere on your
How it works
It's pretty simple, just follow these steps:
- Make sure you're using the HTTP
library in your code, with a firmware URL like
projectnameis your project's name), and make sure you specify a monotonically increasing version string as your version. This should be something like
"100", "101", "102", not
"1.1.0", "1.1.1", "1.2", etc.
- Run the espota-server somewhere.
- Drop a file called
projectname-version.binin the directory where you ran the server. Not necessarily the directory where the server binary is located, just where you ran the server. For example, this file should be called
- That's it! Whenever your device attempts to update its firmware, the server will respond with a firmware file only if there's a file of the same or a later version in the directory. For example, if a device on version 8 requests an update, and versions 7 to 22 are available on the server, the server will respond with version 22. Of course, this means you only need to keep one file from each project on the server at any time.
Please send pull requests/comments/issues if you have any.