Commit Graph

33 Commits

Author SHA1 Message Date
Ian Gulliver
2b833d7913 Bind interface for sACN receiver multicast group joins 2026-01-28 20:00:59 -08:00
Ian Gulliver
f33ba514a7 mod tidy 2026-01-28 12:58:52 -08:00
Ian Gulliver
bc3736bc56 Validate channel start <= end in parseChannelRange 2026-01-28 12:56:02 -08:00
Ian Gulliver
416e67b3f1 Add fuzz tests for config, remap, and sacn packages 2026-01-28 12:34:32 -08:00
Ian Gulliver
8e24dee91f Use shared artnet library 2026-01-28 10:27:52 -08:00
Ian Gulliver
eba0750cb9 Bind send interface for sacn 2026-01-27 22:11:42 -08:00
Ian Gulliver
ae0b896883 Fix ArtPollReply to send to broadcast:6454 with proper MAC detection 2026-01-27 22:00:46 -08:00
Ian Gulliver
e48a7de384 Fix ArtPollReply to advertise both input and output universes 2026-01-27 15:54:32 -08:00
Ian Gulliver
9a694b5178 Add proper Universe type with protocol-aware formatting 2026-01-27 15:25:10 -08:00
Ian Gulliver
9a673bcd23 Add sACN unicast target support 2026-01-27 14:45:45 -08:00
Ian Gulliver
e45121c277 Remove ArtNet broadcast fallback for DMX output 2026-01-27 14:38:07 -08:00
Ian Gulliver
ac59d7975c Remove pcap-based packet sniffing receivers 2026-01-27 14:33:21 -08:00
Ian Gulliver
ce98165946 Check in config 2026-01-26 19:58:55 -08:00
Ian Gulliver
42b1e63ebc Configured targets take priority over discovery
If a target address is configured for a universe, use it directly
instead of looking for discovered nodes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 13:01:22 -08:00
Ian Gulliver
5019f7c060 Remove global and classic ArtNet broadcast addresses
Only use per-interface broadcast addresses for auto-detection.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 12:58:16 -08:00
Ian Gulliver
020d6b59e7 Log universes on discovery and when updated
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 12:29:55 -08:00
Ian Gulliver
2cde5b255b Fix multi-port device discovery by accumulating universes
Multi-port ArtNet devices (like PD8000) send separate ArtPollReply
packets for each group of 4 ports. Previously we overwrote universes
on each reply; now we accumulate them.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 12:28:09 -08:00
Ian Gulliver
b372815892 Add debug logging for universe lookup, fix node port
- Log when GetNodesForUniverse finds no matching nodes
- Use pkt.Port (from ArtPollReply) instead of UDP source port

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 12:25:02 -08:00
Ian Gulliver
dee33302c2 Add pcap-based ArtNet receiver to avoid port conflicts
Similar to sACN pcap receiver, allows receiving ArtNet packets without
binding to port 6454. Use --artnet-pcap=any to enable.

The BPF filter "udp port 6454" captures packets where src OR dst is
6454, so we also catch ArtPollReply responses sent from port 6454.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 12:18:53 -08:00
Ian Gulliver
e6ea34e381 Include standard ArtNet broadcast addresses in auto-detection
Add 255.255.255.255 (limited broadcast) and 2.255.255.255 (classic
ArtNet subnet) to the auto-detected broadcast list.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 12:11:25 -08:00
Ian Gulliver
0ec8059aad Default --artnet-broadcast to auto, clean up log prefixes
- Make --artnet-broadcast default to "auto" so broadcast works out of box
- Add consistent [category] prefixes to all log messages
- Change discovery logs from [discovery] to [artnet] since it's protocol-specific

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 12:08:32 -08:00
Ian Gulliver
cfee18e6e2 Add --artnet-broadcast flag for smarter broadcast handling
- Accepts comma-separated list of addresses or 'auto'
- Auto-detection calculates broadcast from all network interfaces
- Used as fallback when no per-universe target or discovered nodes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 12:03:00 -08:00
Ian Gulliver
ff8d371351 Simplify pcap interface selection to default to "any"
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 19:01:36 -08:00
Ian Gulliver
e289375df8 Add pcap-based sACN receiver to avoid port conflicts
New -sacn-pcap flag uses packet capture instead of binding port 5568.
This allows running alongside other software using the sACN port.

- Captures both incoming and outgoing packets (same-host sender support)
- Requires root/sudo for packet capture privileges
- Use "auto" for automatic interface detection

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 18:27:16 -08:00
Ian Gulliver
e823d9838d Refactor config format and improve consistency
Config changes:
- Use protocol prefixes in addresses: "sacn:64:361-450" -> "artnet:0.0.0:1"
- Remove separate from_proto/proto fields
- Targets now include protocol: universe = "artnet:0.0.0"

CLI changes:
- Rename --listen to --artnet-listen (empty to disable)
- Fix --debug help text

Logging changes:
- Use [<-proto] and [->proto] prefixes for direction
- Consistent lowercase key=value format
- Refactor duplicate send code into sendOutputs()

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 18:22:09 -08:00
Ian Gulliver
86403f1ff8 Replace --broadcast flag with per-universe target config
- Remove --broadcast CLI flag
- Add [[target]] config section for per-universe destination addresses
- Each ArtNet output universe can have its own target IP (broadcast or unicast)
- ArtPoll discovery broadcasts to all unique target addresses
- Falls back to configured target when no nodes discovered for universe

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 18:06:33 -08:00
Ian Gulliver
b0e9ecdee7 Add sACN input/output support and fix multi-source merging
- Add sACN/E1.31 protocol support for both input and output
- from_proto = "sacn" to receive from sACN multicast
- proto = "sacn" to output via sACN multicast
- Fix remap engine to maintain persistent state per output universe
- Multiple inputs targeting same output now merge correctly
- Prevents flickering when multiple universes feed same output

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 12:32:41 -08:00
Ian Gulliver
cdb769d059 Change -port to -listen with flexible address format
Supports host:port, host, or :port for binding to specific
interfaces. Useful for running alongside other ArtNet software.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 10:06:13 -08:00
Ian Gulliver
081057f68a Add -debug flag to log ArtNet packets
Logs recv/send for DMX, Poll, and PollReply packets.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 09:54:22 -08:00
Ian Gulliver
a7d2a83aba Document indexing conventions in example config
- Universe: 0-indexed (net.subnet.universe)
- Channels: 1-indexed (1-512), matching DMX convention

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 09:42:08 -08:00
Ian Gulliver
d88ef4ccee Simplify config: encode channels in address strings
- from: "0.0.1:50-100" specifies channel range
- to: "0.0.1:50" specifies starting channel only (range implied by from)
- Remove from_channel, to_channel, count fields
- Support plain universe numbers with channels: "1:50-100"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 09:37:09 -08:00
Ian Gulliver
7743836d53 Simplify config: flags for settings, dots-only for addresses
- Move listen_port and broadcast_addr from TOML to CLI flags
- Remove colon format support for universe addresses (dots only)
- Config file now contains only mappings

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 09:30:38 -08:00
Ian Gulliver
a709e5498b Initial implementation of ArtNet remapping proxy
Channel-level DMX remapping between ArtNet universes with:
- TOML configuration with multiple address formats (net.subnet.universe, plain number)
- ArtPoll discovery for output nodes
- Configurable channel ranges for fixture spillover handling

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 09:27:20 -08:00