OTA for frontend works. Created documentation to know how to do it, upload and voila.
This commit is contained in:
@@ -62,3 +62,21 @@ Because `CONFIG_CALENDINK_DEPLOY_WEB_PAGES` is enabled, CMake will automatically
|
||||
1. Detect your `frontend/dist/` folder.
|
||||
2. Run `mklittlefs` to package it into `www.bin`.
|
||||
3. Flash `www.bin` directly to the active `www_0` partition on the ESP32!
|
||||
|
||||
## 5. Over-The-Air (OTA) Updates
|
||||
|
||||
Once the backend supports it (Phase 2+), you can update the frontend without using USB or `idf.py`.
|
||||
|
||||
1. **Build the assets**: `npm run build:esp32`
|
||||
2. **Package the image**: `npm run ota:package`
|
||||
- This generates a `frontend/bin/www.bin` file.
|
||||
- **Configuration**: If the tool is not in your PATH, add its path to `frontend/.env`:
|
||||
```env
|
||||
MKLITTLEFS_PATH=C:\path\to\mklittlefs.exe
|
||||
```
|
||||
*(Note: The script also supports `littlefs-python.exe` usually found in the `build/littlefs_py_venv/Scripts/` folder).*
|
||||
3. **Upload via Dashboard**:
|
||||
- Open the dashboard in your browser.
|
||||
- Go to the **Frontend Update** section.
|
||||
- Select the `www.bin` file and click **Flash**.
|
||||
- The device will automatically write to the inactive partition and reboot.
|
||||
|
||||
Reference in New Issue
Block a user