Skip to content

feat: OTA server script, release workflow, versioned web flash#55

Merged
zevorn merged 3 commits intomainfrom
feat/ota-tools-and-versioned-flash
Mar 17, 2026
Merged

feat: OTA server script, release workflow, versioned web flash#55
zevorn merged 3 commits intomainfrom
feat/ota-tools-and-versioned-flash

Conversation

@zevorn
Copy link
Copy Markdown
Owner

@zevorn zevorn commented Mar 17, 2026

Summary

  • scripts/ota-server.py: Local OTA development server — auto-detects build firmware, generates version.json with SHA256, serves over HTTP with device configuration instructions
  • .github/workflows/release-firmware.yml: CI workflow triggered on tag push (v*) — builds all hardware targets, creates GitHub Release with firmware zips + standalone OTA binaries + version.json
  • Website version selector: Flash panel Version dropdown lists latest (main) + all tagged releases from GitHub Releases API. Tag versions download firmware zip and extract via JSZip

Usage

Local OTA development

make build-esp32c3-xiaozhi-xmini   # build firmware
make ota-server                     # start OTA server
# Device: /ota update http://<ip>:8080/rt-claw.bin

Creating a release

git tag v0.2.0
git push origin v0.2.0
# CI builds firmware → creates GitHub Release with all assets

Web flashing with version selection

Users can now pick a specific release version (or latest) before flashing.

Test plan

  • scripts/ota-server.py --help works
  • Version auto-detection from claw_config.h works
  • Website version selector loads releases from GitHub API
  • Release workflow creates correct assets on tag push
  • Firmware zip extraction via JSZip works in browser

Closes #53 (Phase 1 complete)

zevorn added 3 commits March 17, 2026 20:19
Python script that auto-detects the build firmware, reads version
from claw_config.h, generates version.json with SHA256, and serves
both over HTTP.  Prints device configuration instructions.

Usage: make ota-server
       scripts/ota-server.py --platform esp32c3 --board xiaozhi-xmini

Signed-off-by: Chao Liu <chao.liu.zevorn@gmail.com>
On tag push (v*), builds all hardware firmware targets, packages
each as a zip (for web flashing) and standalone app binary (for OTA),
generates OTA version.json with download URLs and SHA256, then
creates a GitHub Release with all assets attached.

Signed-off-by: Chao Liu <chao.liu.zevorn@gmail.com>
Flash panel now has a Version dropdown that lists:
- "latest (main)" — firmware from GitHub Pages (current behavior)
- Tagged releases (v0.1.0, v0.2.0, ...) — fetched from GitHub
  Releases API, downloaded as zip and extracted with JSZip

The resolveFirmware() function abstracts firmware resolution:
- main: direct fetch from firmware/<platform>-<board>/
- tags: download <target>-firmware.zip from Release, extract via JSZip

Signed-off-by: Chao Liu <chao.liu.zevorn@gmail.com>
@zevorn zevorn merged commit 3d3cf6e into main Mar 17, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add OTA support for ESP32 platforms

1 participant