The rig sim receives Art-Net (UDP 6454, answers ArtPoll) and DDP (each port the room's DDP strips use) in sim_net.c and passes changed universes and pixels to the page over /sim/ws, now with a kind byte in front of each binary frame. Rooms gain fixture types: ddp strips, artnet pixel strips, and artnet cans and movers that read named channels from the room's dmx_definitions (the qlcplus stage map's format). Overlapping DMX channels are refused. Cans and movers are decoded and drawn as in the qlcplus stage simulator (dmx.js, dmx-draw.js). In Edit mode: pick a type to add, edit port/offset/universe/address/colour order/definition, see a can's or mover's live channels, make a controller output aimed at the sim and send its test. The room dialog lists DMX definitions, with presets, a channel editor, and .qxf and stage map import. GET /sim/api/dmx shows what the receiver has had. Tests: test/api/test_sim_net.py and test/browser/dmx_decode.test.mjs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
led-controller on a desktop
The controller firmware (main/) built as a program for Linux: no ESP-IDF, no Docker, no board. The web
UI and API are the same as the board's. ESP-NOW goes through a bridge: the USB bridge board (bridge/)
or a UDP bridge such as led-simulator.
Build and run
Needs cmake, a C compiler, and www_dist/www.pack (make web builds it with node).
make desktop # builds build-desktop/led-controller
make desktop-run # the web UI on http://localhost:8080/
make test-desktop # starts the program and runs the API tests against it
Or run it directly:
build-desktop/led-controller --db ./data --port 8080
| option | environment | meaning |
|---|---|---|
--db DIR |
LED_CONTROLLER_DB |
the store (default /db) |
--port N |
LED_CONTROLLER_HTTP_PORT |
web UI and API port (default 8080) |
LED_LOG_LEVEL=error|warn|info|debug|verbose sets how much is logged (default info).
Install as a service (.deb)
make deb # build-desktop/led-controller_0.1.0_<arch>.deb
sudo apt install ./build-desktop/led-controller_0.1.0_*.deb
The package installs /usr/bin/led-controller, the led-cli command-line tool (/usr/bin/led-cli), the LED driver
firmware image (/usr/share/led-controller/firmware/led_driver.bin), a systemd unit (led-controller.service) that runs it as a
dynamic user with its store in /var/lib/led-controller, and /etc/default/led-controller for the port. The service starts at install and restarts after a restart from
the web UI. The bridges are kept in the controller's settings, so set them in the web UI under Settings > Network >
Bridges. Change the port in /etc/default/led-controller, then sudo systemctl restart led-controller. The bridge's serial port is
owned by dialout, which the service joins.
packaging/led-bridge.udev.example (installed in /usr/share/doc/led-controller/) gives the bridge board a
stable name, /dev/led-bridge, by its serial number.
How it is built
desktop/CMakeLists.txt compiles the firmware's own sources (main/, and the host stand-ins in
sim-controller/components/sim/: mic, OTA, littlefs and the timers) with a small port of the ESP-IDF APIs
they use:
port/src/freertos.c: tasks, queues, semaphores, stream buffers and event groups on POSIX threads.port/src/esp_glue.c: logging, error names, random numbers, the MAC (from the first real network interface), restart (an exit, for the service manager), and the app description.port/src/desktop_crypto.c: SHA-1 and base64 for the WebSocket handshake.port/src/www_pack.c: the web UI pack (www_dist/www.pack) embedded in the program.port/include/: the headers.sdkconfig.his the config the sim's build generated.
Third-party code is vendored in third_party/: the HTTP server and http_parser from ESP-IDF v6.1, and cJSON.
tools/vendor.sh refreshes them (it runs espressif/idf:v6.1 to copy the httpd sources). Its patch
(tools/patch_vendor.py) swaps the handshake's mbedTLS and PSA calls for desktop_crypto.c.
Limits
- ESP-NOW needs the bridge. Without one the program runs, and its ESP-NOW frames go nowhere.
- The Wi-Fi drivers are not discovered automatically: their mDNS discovery is not in the desktop build yet.
- Firmware OTA is not available (the API answers 501, as in the simulator).
- The mic is simulated: beats come from the BPM clock, as in the simulator.