Add artmap polling to discover sACN unicast receivers

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Ian Gulliver
2026-01-30 13:03:35 -08:00
parent e3aa25d85f
commit 1618ef1b87
9 changed files with 176 additions and 15 deletions

View File

@@ -210,21 +210,23 @@ export function render(data, config) {
const sacnUniverseInputs = new Map();
const sacnUniverseOutputs = new Map();
function getSacnInputsFromMulticast(node) {
const groups = node.multicast_groups || [];
function getSacnInputs(node) {
const inputs = [];
groups.forEach(g => {
(node.multicast_groups || []).forEach(g => {
if (typeof g === 'string' && g.startsWith('sacn:')) {
const u = parseInt(g.substring(5), 10);
if (!isNaN(u)) inputs.push(u);
}
});
(node.sacn_unicast_inputs || []).forEach(u => {
if (!inputs.includes(u)) inputs.push(u);
});
return inputs;
}
nodes.forEach(node => {
const name = getShortLabel(node);
getSacnInputsFromMulticast(node).forEach(u => {
getSacnInputs(node).forEach(u => {
if (!sacnUniverseInputs.has(u)) sacnUniverseInputs.set(u, []);
sacnUniverseInputs.get(u).push(name);
});
@@ -242,7 +244,7 @@ export function render(data, config) {
nodes.forEach(node => {
const nodeId = node.id;
const sacnInputs = getSacnInputsFromMulticast(node);
const sacnInputs = getSacnInputs(node);
const sacnOutputs = node.sacn_outputs || [];
if (sacnInputs.length === 0 && sacnOutputs.length === 0) return;