Commit graph

4 commits

Author SHA1 Message Date
cjkas
b525a800b0 test: e2e firmware update, and restarts told apart by boot time
With --reboot, a restore of the radio alone brings it back as it was:
on a board without Ethernet it read the radio from the wrong place.

--firmware <firmware.bin> updates the device through /updateFirmware and
checks it still runs a minute later, after it marks the update good.

wait_for_restart compared uptimes, so a test run right after another
restart could see more uptime than before and fail.  It compares boot
times, and waits while the device hasn't restarted yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 16:59:53 +01:00
cjkas
51e15f341e fix: refuse a restore with no part chosen
It rebooted the device and restored nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 21:19:22 +01:00
cjkas
d968f7e70c fix: review fixes for the restore fix
- A restore of the repeaters alone saves them before the reboot, instead
  of leaving that to somfy.loop().
- e2e: a refused restore leaves no upload behind, tested on its own.
- e2e: auth() sits next to upload(), whose file part is now file=.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 21:10:47 +01:00
cjkas
3d45ba59c1 fix: restore reads the options the web UI ticks
The web UI sends the restore options as the form field "data". The
param helpers looked up query parameters only, so /restore never saw
them and restored the shades alone, since 3.0.0. The helpers now take a
form field too.

/restore uses an upload once, and drops the file when the options aren't
JSON.

e2e: test_restore.py, a probe that the field is read and, with --reboot,
a settings-only round trip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 21:02:39 +01:00