From a0e71d2347952f31a468ca2ea6b0ed343abf5ce0 Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Fri, 30 Jan 2026 22:11:43 -0800 Subject: [PATCH] Process artmap senders as flow sources Co-Authored-By: Claude Opus 4.5 --- artmap.go | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/artmap.go b/artmap.go index 8be9ce2..793464f 100644 --- a/artmap.go +++ b/artmap.go @@ -13,6 +13,12 @@ import ( type artmapConfig struct { Targets []artmapTarget `json:"targets"` Mappings []artmapMapping `json:"mappings"` + Senders []artmapSender `json:"senders"` +} + +type artmapSender struct { + Universe artmapUniverse `json:"universe"` + IP string `json:"ip"` } type artmapTarget struct { @@ -101,6 +107,36 @@ func (t *Tendrils) processArtmapConfig(cfg *artmapConfig) { } updated = true } + + for _, sender := range cfg.Senders { + ip := net.ParseIP(sender.IP) + if ip == nil { + continue + } + + node := t.nodes.GetByIP(ip) + if node == nil { + continue + } + + universe := int(sender.Universe.Number) + switch sender.Universe.Protocol { + case "artnet": + t.nodes.UpdateArtNet(node, nil, []int{universe}) + if t.DebugArtmap { + log.Printf("[artmap] marked %s (%s) as artnet output for universe %d", node.DisplayName(), ip, universe) + } + case "sacn": + t.nodes.UpdateSACN(node, []int{universe}) + if t.DebugArtmap { + log.Printf("[artmap] marked %s (%s) as sacn output for universe %d", node.DisplayName(), ip, universe) + } + default: + continue + } + updated = true + } + if updated { t.NotifyUpdate() }