You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+79-1Lines changed: 79 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,10 @@ Turn your OBEGRÄNSAD LED Wall Lamp into a live drawing canvas
19
19
-[Software Setup](#software-setup)
20
20
-[ESP32 Setup with VS Code and PlatformIO](#esp32-setup-with-vs-code-and-platformio)
21
21
-[WiFi Configuration](#wifi-configuration)
22
+
-[OTA Updates](#ota-updates)
23
+
-[Configuration](#configuration)
24
+
-[Upload Methods](#upload-methods)
25
+
-[Visual Feedback](#visual-feedback)
22
26
-[HTTP API Reference](#http-api-reference)
23
27
-[Device Information](#device-information)
24
28
-[Plugin Control](#plugin-control)
@@ -180,6 +184,80 @@ For ESP8266, WiFi Manager is not available. Set `WIFI_SSID` and `WIFI_PASSWORD`
180
184
181
185
---
182
186
187
+
## OTA Updates
188
+
189
+
Over-The-Air (OTA) updates allow you to upload new firmware wirelessly without a USB connection. This is powered by [ElegantOTA](https://github.com/ayushsharma82/ElegantOTA).
190
+
191
+
### Configuration
192
+
193
+
Before using OTA, configure the following:
194
+
195
+
1.**Set OTA Credentials** in `include/secrets.h`:
196
+
```cpp
197
+
#defineOTA_USERNAME "admin"
198
+
#define OTA_PASSWORD "your-password"
199
+
```
200
+
201
+
2. **Configure Upload Settings** in `platformio.ini` (for the `esp32dev` environment):
202
+
```ini
203
+
extra_scripts = upload.py
204
+
upload_protocol = custom
205
+
custom_upload_url = http://192.168.178.50 # Your device IP
206
+
custom_username = admin
207
+
custom_password = your-password
208
+
```
209
+
210
+
**Note:** Replace `192.168.178.50` with your device's actual IP address.
211
+
212
+
### Upload Methods
213
+
214
+
#### Method 1: Web Interface (Manual Upload)
215
+
216
+
1. Navigate to `http://your-device-ip/update` in your browser
217
+
2. Login with your configured credentials (default: `admin` / `ikea-led-wall`)
218
+
3. Select your firmware file (`.pio/build/esp32dev/firmware.bin`)
219
+
4. Click "Update" and wait for completion
220
+
5. Device will automatically reboot with new firmware
221
+
222
+
#### Method 2: PlatformIO (Automated Upload)
223
+
224
+
Upload directly from PlatformIO via the command line:
225
+
226
+
```bash
227
+
pio run -e esp32dev -t upload
228
+
```
229
+
230
+
Or use the PlatformIO Upload button in VS Code (bottom toolbar).
231
+
232
+
**Requirements:**
233
+
- Python packages: `requests_toolbelt` and `tqdm`
234
+
- Install if needed: `pip install requests_toolbelt tqdm`
235
+
236
+
### Visual Feedback
237
+
238
+
During OTA updates, the LED matrix provides visual feedback:
239
+
240
+
- **"U" letter displayed**: Update has started
241
+
- **Serial output**: Progress updates every second
242
+
- **"R" letter displayed**: Update completed (device will reboot)
243
+
244
+
Monitor the serial output for detailed progress:
245
+
```
246
+
OTA update started!
247
+
OTA Progress Current: 262144 bytes, Final: 1440655 bytes
248
+
OTA Progress Current: 524288 bytes, Final: 1440655 bytes
249
+
...
250
+
OTA update finished successfully!
251
+
```
252
+
253
+
**Troubleshooting:**
254
+
- Ensure device is connected to the same network
255
+
- Verify IP address in `platformio.ini` matches device IP
256
+
- Check credentials match in both `secrets.h` and `platformio.ini`
257
+
- For upload failures, try the web interface method first
258
+
259
+
---
260
+
183
261
## HTTP API Reference
184
262
185
263
Base URL: `http://your-server/api`
@@ -524,7 +602,7 @@ Create a second automation or condition to call `rest_command.obegraensad_bright
524
602
**Structure:**
525
603
- `src/`- Arduino code
526
604
- `platformio.ini`- Build configuration
527
-
- Uncomment OTA lines for over-the-air updates (replace IP with your device)
605
+
- See [OTA Updates](#ota-updates) section for wireless firmware upload configuration
0 commit comments