Haukcode.sACN
3.0.117
See the version list below for details.
dotnet add package Haukcode.sACN --version 3.0.117
NuGet\Install-Package Haukcode.sACN -Version 3.0.117
<PackageReference Include="Haukcode.sACN" Version="3.0.117" />
<PackageVersion Include="Haukcode.sACN" Version="3.0.117" />
<PackageReference Include="Haukcode.sACN" />
paket add Haukcode.sACN --version 3.0.117
#r "nuget: Haukcode.sACN, 3.0.117"
#:package Haukcode.sACN@3.0.117
#addin nuget:?package=Haukcode.sACN&version=3.0.117
#tool nuget:?package=Haukcode.sACN&version=3.0.117
Haukcode.sACN
A high-performance, cross-platform sACN (E1.31) library for .NET - enabling DMX512 lighting control over IP networks.
What is sACN?
sACN (Streaming ACN / ANSI E1.31) is a network protocol for transmitting DMX512 lighting control data over IP networks using UDP. It's the industry standard for modern entertainment and architectural lighting systems.
Features
- ✅ Send and receive DMX data via sACN/E1.31
- ✅ Multicast and unicast support
- ✅ Sync packet support for frame-accurate multi-universe synchronization
- ✅ Universe discovery, stream termination and priority
- ✅ High-performance with buffer pooling and async I/O
- ✅ Cross-platform (.NET 8.0, 9.0, 10.0)
- ✅ Reactive extensions support
Upgrading from 2.x
3.0 has breaking changes: received packets are reused once your callback returns (queue
p.Clone()), terminated streams are delivered, arguments are validated, and universe discovery
now interoperates. See the 3.0 release notes.
Quick Start
Receiving DMX Data
using Haukcode.sACN;
using Haukcode.sACN.Model;
using System.Net;
using System.Threading.Channels;
var channel = Channel.CreateUnbounded<ReceiveDataPacket>();
var client = new SACNClient(
senderId: Guid.NewGuid(),
senderName: "MyReceiver",
localAddress: IPAddress.Any,
// Received packets are reused once the writer returns, so queue a copy
channelWriter: async p => await channel.Writer.WriteAsync(p.Clone()),
channelWriterComplete: () => channel.Writer.Complete());
// Join Universe 1
client.JoinDMXUniverse(1);
// Process packets
await foreach (var packet in channel.Reader.ReadAllAsync())
{
// Sync and discovery packets arrive here too
if (packet.Packet.FramingLayer is not DataFramingLayer data)
continue;
if (data.Options.StreamTerminated)
{
Console.WriteLine($"Universe {data.UniverseId}: {data.SourceName} stopped");
continue;
}
Console.WriteLine($"Universe {data.UniverseId}: {data.DMPLayer.Data.Length} channels");
}
Sending DMX Data
using Haukcode.sACN;
using System.Net;
var client = new SACNClient(
senderId: Guid.NewGuid(),
senderName: "MyController",
localAddress: Haukcode.Network.Utils.GetFirstBindAddress().IPAddress);
byte[] dmxData = new byte[512];
dmxData[0] = 255; // Channel 1 at full intensity
// Send via multicast
await client.SendDmxData(null, universeId: 1, dmxData);
// Send via unicast to specific device
await client.SendDmxData(IPAddress.Parse("192.168.1.100"), universeId: 1, dmxData);
Key Methods
Sending:
SendDmxData()- Send DMX channel dataSendSync()- Send synchronization packetSendUniverseDiscovery()- Announce the universes you send (every 10 s)
Receiving:
JoinDMXUniverse()- Subscribe to a universeDropDMXUniverse()- Unsubscribe from a universeJoinDMXUniverseForTrigger()- Join a universe as a trigger (for sync addresses)JoinDiscoveryMulticastGroup()- Listen for universe discovery
Sequence checking, the 2.5 s data loss timeout, source merging and keep-alive are left to the application; the GitHub README lists what E1.31 expects.
Documentation
For comprehensive documentation, advanced features, API reference, and troubleshooting:
📖 Full Documentation on GitHub
Resources
License
MIT License - see LICENSE for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Haukcode.HighPerfComm (>= 1.0.53)
- Haukcode.Network (>= 1.0.29)
- HdrHistogram (>= 2.5.0)
- System.Reactive (>= 7.0.0)
-
net8.0
- Haukcode.HighPerfComm (>= 1.0.53)
- Haukcode.Network (>= 1.0.29)
- HdrHistogram (>= 2.5.0)
- System.Reactive (>= 7.0.0)
-
net9.0
- Haukcode.HighPerfComm (>= 1.0.53)
- Haukcode.Network (>= 1.0.29)
- HdrHistogram (>= 2.5.0)
- System.Reactive (>= 7.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.119 | 59 | 10/21/2026 |
| 3.0.118 | 45 | 10/21/2026 |
| 3.0.117 | 56 | 10/20/2026 |
| 3.0.116 | 49 | 10/20/2026 |
| 3.0.115 | 46 | 10/20/2026 |
| 3.0.114 | 42 | 10/20/2026 |
| 3.0.113 | 48 | 10/20/2026 |
| 2.0.112 | 421 | 9/10/2026 |
| 2.0.111 | 120 | 9/10/2026 |
| 2.0.110 | 122 | 9/10/2026 |
| 2.0.109 | 115 | 9/10/2026 |
| 2.0.108 | 148 | 9/5/2026 |
| 2.0.104 | 193 | 7/26/2026 |
| 2.0.103 | 170 | 7/17/2026 |
| 2.0.102 | 132 | 7/16/2026 |
| 2.0.101 | 143 | 7/15/2026 |
| 2.0.100 | 142 | 7/15/2026 |
| 2.0.99 | 137 | 7/15/2026 |
| 2.0.98 | 133 | 7/15/2026 |
| 2.0.97 | 148 | 7/15/2026 |
1.0.0 - Refactored
1.0.1 - Added methods to find local IPAddress
1.0.2 - Added method for multi-universe listener
1.0.3 - Changed DMXData property
1.0.4 - Changed API for GetAddressesFromInterfaceType
1.0.5 - Added method to list network adapters
1.0.6 - Removed unused dependency
1.0.7 - Make it Linux-compatible
1.0.8 - Allow unknown operational status on network adapter
2.0.0 - Allow for sync packets, breaking change
2.0.13 - Fix issue with ReceiveMessageFrom and reusing the socket events
2.0.16 - Fix incorrect byte order of Acn Source Id