Commit Graph
8 Commits
Author SHA1 Message Date
jimmyandClaude Opus 5.5 bfeeb958df feat: main's import/export, zones, audio API and web UI
Profiles, presets and sequences export and import as main's bundles.
Zones carry group_ids, preset_group_ids, sequence_ids, content_kind and
brightness; profiles seed rainbow as colour_cycle, and deleting a
profile also deletes its sequences. Groups, zones and sequences written
by older versions are migrated at boot.

/api/audio (status, event stream, start/stop, reset, anchor-bar,
devices) maps main's audio detector onto the mic's beat detector. Audio
start/stop picks whether mic beats or the BPM clock time sequences; the
clock's beats also go to the drivers while the mic is off.
/ws now greets from a post-handshake callback (httpd does not call the
handler for the upgrade).

The web UI is main's, plus v2's outputs editor, list search and
hostname/static IP settings; the bridge, Wi-Fi AP and led-tool parts
are gone. API tests follow main's behaviour (119 pass on the board).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 20:34:22 +13:00
jimmyandClaude Opus 5.5 04b56c6ef2 feat: device groups, combined brightness and beat-driven sequences from main
Groups (registry of driver MACs, optionally scoped to a profile) become
the drivers' group membership, alongside z<zone id> for zones that still
name drivers. Zones play to their group_ids. Group and device routes for
driver config, brightness (global x groups x device x zone) and identify.
The push path takes main's message shape: select as a list, groups as a
filter (one GROUP_CMD per group, or JSON when a preset has a background),
short keys so JSON fits a frame.

Sequences follow main: lanes of {preset_id, beats} steps played to each
lane's groups, advanced by the mic's beats or a clock at
audio_simulated_bpm; a switch waits for the next beat or downbeat; sync-
phase, stop (clears the zone's drivers) and status. This replaces the
time-based per-zone sequencer and scene playback, as in main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 18:09:42 +13:00
jimmyandClaude Opus 5.5 19fea0b0a1 feat: ping drivers and push groups from the devices modal
POST /devices/ping broadcasts an ESP-NOW PING_REQ, collects the drivers'
PING_RSP for timeout_s and registers or renames the ones that answer. A
reply also counts as the driver being heard, so group updates go to it
again. POST /devices/groups sends every ESP-NOW driver its groups and
reports the acks. The devices modal gets the Ping drivers and Update
groups buttons from main, with per-driver ping dots.

UI files are now served with Cache-Control: no-cache and the firmware
build hash as ETag, so a browser picks up a new UI right after an update
instead of a day later.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 17:53:56 +13:00
jimmyandClaude Opus 5.5 e7f238aebc fix: stop group updates to silent drivers from starving zone play
Every acked unicast holds a pending slot for its whole retry run, so zone
and profile edits with drivers switched off filled the link and the next
zone play timed out (503). Group updates now go to a driver that has
failed three messages in a row at most once every 30 s; one that comes
back still gets its groups when it announces or resyncs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 10:38:51 +13:00
jimmyandClaude Opus 5.5 57182188ba feat: port the remaining v1 API to the v2 controller
Profiles seed presets, a default zone and a palette, and clone with their
own copies; deleting a profile removes what it owned. Zones get the v1
list shape, set-current, current, clone and content-fragment. Devices are
keyed by MAC with v1 validation and identify. Patterns: definitions, OTA
file and manifest, upload, driver, and send over ESP-NOW (the led-driver
pattern sources are embedded in the firmware). Pixel outputs get v1
validation and a DDP/Art-Net/sACN test pattern. Sequences, palettes and
settings follow v1 replies and validation, and /ws forwards browser
messages to the drivers.

The resource handlers move out of api.c into res_*.c, patterns.c and
outputs.c. cJSON now allocates from PSRAM: the store had grown enough to
starve internal RAM and abort the mic at boot. /status reports
free_internal.

The Wi-Fi AP and led-tool routes are left out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 09:58:17 +13:00
jimmyandClaude Opus 5.5 9d628aa3c8 fix: run the W5500 SPI bus at 10 MHz
At 20 MHz the controller intermittently dropped every Ethernet frame
over about 900 bytes, while small packets got through. The web UI then
hung after the first chunk of a response. At 10 MHz, full-size pings
and repeated fetches of every UI file all succeed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 00:50:46 +13:00
jimmyandClaude Opus 5.5 32c0ecfa76 feat: update led-driver app files over ESP-NOW
tools/driver_ota.py (make ota-drivers) pushes the driver's .py files
through the controller, one file per POST /drivers/ota/file. Drivers
skip files they already have, and the rest are committed together.

- one target: acked unicast, two chunks in flight
- several targets: each file is broadcast once, then each driver is
  asked for its missing chunks and repaired by unicast
- rel: rel_send_seq, rel_wait and rel_send_wait, plus a callback for
  the drivers' 0x26 status replies
- commands are retried, because status replies are not acked
- broadcast chunks are paced 50 ms apart: faster broadcast left C3
  drivers unable to receive until reset
- bench results in docs/BENCH_TEST.md, endpoints in docs/API.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 23:45:38 +13:00
jimmyandClaude Opus 5.5 1c222771a5 refactor: move the v2 controller to the repository root
The ESP-IDF project, docs, tools, tests and web UI move from v2/ to the
root, and the Makefile, README, build scripts and test runner drop the
v2/ prefix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 23:44:58 +13:00