ArtNetOutModule¶
Category: driver | Tags: ☸️🟦🐙
Sends DriverLayer pixels as Art-Net DMX over UDP. Each frame is split across consecutive Art-Net universes of 170 RGB pixels (510 channels) each. The number of universes sent per frame is ceil(total_pixels / 170) and scales automatically with the panel size.
Controls¶
| Control | Type | Range | Default | Description |
|---|---|---|---|---|
universe_start |
slider | 0-255 | 0 | First Art-Net universe number |
ip |
text | 255.255.255.255 | Destination IP (broadcast or unicast) | |
enabled |
toggle | 0/1 | 1 | Enable/disable sending |
Wiring¶
{
"type": "ArtNetOutModule",
"inputs": { "layer": "<driver-layer-id>" }
}
Art-Net packet format¶
Each universe is sent as a standard Art-Net OpDmx packet (Art-Net 4 spec):
| Offset | Size | Content |
|---|---|---|
| 0 | 8 | "Art-Net\0" |
| 8 | 2 | OpCode 0x00 0x50 (OpDmx, little-endian) |
| 10 | 2 | ProtVer 0x00 0x0e (14, big-endian) |
| 12 | 1 | Sequence (0 = disabled) |
| 13 | 1 | Physical (0) |
| 14 | 2 | Universe number (little-endian) |
| 16 | 2 | Channel count (big-endian, always even) |
| 18+ | N | DMX data: R, G, B per pixel |
Multi-universe example¶
A 20x20 panel = 400 pixels = ceil(400/170) = 3 universes:
| Universe | Pixels | Channels |
|---|---|---|
| 0 | 0-169 | 510 |
| 1 | 170-339 | 510 |
| 2 | 340-399 | 180 (padded to 180, already even) |
Health report¶
universe_start=0 packets_tx=1234 ip=255.255.255.255
Test coverage¶
Unit tests in tests/test_artnet.cpp:
| Test | Level | What is verified |
|---|---|---|
| Lifecycle without layer | smoke |
No crash when layer_ is null; packets_tx=0 in healthReport |
| Sends packets when wired | behavioral |
packetsTx() > 0 after one frame with a real DriverLayer |
| Multi-universe: 170px = 1 uni, 171px = 2 | behavioral |
Universe split at exactly 170 pixels |
| Packet header bytes correct | behavioral |
Art-Net OpDmx header present after one send |
| ArtNetOut loopback to ArtNetIn | integration |
Full send/receive on 127.0.0.1; packets_tx > 0 confirmed |
Live tests (deploy/live_suite.py, deploy/livetest.py):
| Test | Level | What is verified |
|---|---|---|
| test5 Art-Net loopback (PC) | integration |
packets_tx > 0 and packets_rx > 0 on PC broadcast loopback |
| Two-device Art-Net (PC sender) | integration |
packets_rx > 0 on MM-70BC ESP32 over LAN broadcast UDP |
Tags¶
| Emoji | Meaning |
|---|---|
| ☸️ | Driver |
| 🟦 | 2D+ |
| 🐙 | WLED-compatible protocol |