Reefact.LuxaforLightingDeviceController 2.0.1

Prefix Reserved
dotnet add package Reefact.LuxaforLightingDeviceController --version 2.0.1
                    
NuGet\Install-Package Reefact.LuxaforLightingDeviceController -Version 2.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Reefact.LuxaforLightingDeviceController" Version="2.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Reefact.LuxaforLightingDeviceController" Version="2.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Reefact.LuxaforLightingDeviceController" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Reefact.LuxaforLightingDeviceController --version 2.0.1
                    
#r "nuget: Reefact.LuxaforLightingDeviceController, 2.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Reefact.LuxaforLightingDeviceController@2.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Reefact.LuxaforLightingDeviceController&version=2.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Reefact.LuxaforLightingDeviceController&version=2.0.1
                    
Install as a Cake Tool

Version française - Nederlandse versie - Svensk version - Deutsche Version - Versión española - Ελληνική έκδοση - Wersja polska

Luxafor Device Controller

Drive your Luxafor availability indicators from your own .NET applications, speaking their USB HID protocol directly: no Luxafor server, no webhook, no third-party software to install.

  • A direct API: SetColor, FadeColor, Strobe, PlayPattern, down to driving one LED at a time.
  • .NET Standard 2.0 and .NET Framework 4.6.2, for a single dependency (HidLibrary).
  • Windows only: the devices are driven through the Windows HID stack. The package installs on any platform, but the devices can only be enumerated and controlled on Windows.

Installation

dotnet add package Reefact.LuxaforLightingDeviceController

Quick start

using System.Linq;

using Reefact.LuxaforLightingDeviceController;

namespace MyApplication {

    public static class BuildStatusLight {

        public static void Show(bool buildSucceeded) {
            using ILuxaforDevice device = Luxafor.GetDevices().First();

            if (buildSucceeded) {
                device.SetColor(BrightColor.Green);
            } else {
                device.Strobe(BrightColor.Red, Speed.FromByte(20), Repeat.Count(3));
            }
        }

    }

}

Luxafor.GetDevices() enumerates the Luxafor devices plugged into the USB ports of the machine; the enumeration is empty when none is plugged in. ILuxaforDevice implements IDisposable: the using statement releases the device handle at the end of the block. Every command returns a bool: true when the device accepted the command, false when the write failed.

Compatible devices

The library drives, through their USB HID protocol, the Luxafor devices identified by the vendor id 1240 (0x04D8) and the product id 62322 (0xF372).

Device Status
Luxafor Orb Tested: the device used to develop and validate the library (6 addressable LEDs).
Luxafor Flag Expected to work, not tested: same identifiers and same lighting protocol (6 addressable LEDs).
Luxafor Mute Button, Luxafor Colorblind Flag Expected to work, not tested: the lighting commands are the same; the LED layout, the number of LEDs and the color rendering may differ.
Luxafor Bluetooth, Luxafor Switch, Luxafor Cube, Luxafor Pomodoro-Timer, Luxafor CO2 Monitor Not supported: these devices are not driven through this USB HID protocol.

Feedback about an untested device is very welcome: please open an issue.

Features

  • Solid color (SetColor) from a named color, a hexadecimal code or red / green / blue components.
  • Fade (FadeColor) to a color, over a chosen transition duration.
  • Strobe (Strobe) at a chosen speed and for a chosen number of repetitions.
  • Patterns (PlayPattern): colored waves, or patterns built into the device (Police, Rainbow, TrafficLight, ...).
  • Turning off (TurnOff), all the LEDs or only some of them.
  • LED targeting: all of them, one side (TabSide, BackSide) or a single LED (Led_1 to Led_6).
  • Reusable commands: LightingCommand describes a command once, to replay it later with Send.

Detailed documentation

License

This library is distributed under the Apache-2.0 license.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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 was computed.  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 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
2.0.1 118 8/7/2026
2.0.0 108 8/6/2026
1.2.0 303 7/29/2025
1.1.1 1,072 2/6/2023
1.1.0 897 2/6/2023
1.0.1 823 2/6/2023