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
<PackageReference Include="Reefact.LuxaforLightingDeviceController" Version="2.0.1" />
<PackageVersion Include="Reefact.LuxaforLightingDeviceController" Version="2.0.1" />
<PackageReference Include="Reefact.LuxaforLightingDeviceController" />
paket add Reefact.LuxaforLightingDeviceController --version 2.0.1
#r "nuget: Reefact.LuxaforLightingDeviceController, 2.0.1"
#:package Reefact.LuxaforLightingDeviceController@2.0.1
#addin nuget:?package=Reefact.LuxaforLightingDeviceController&version=2.0.1
#tool nuget:?package=Reefact.LuxaforLightingDeviceController&version=2.0.1
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.0and.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_1toLed_6). - Reusable commands:
LightingCommanddescribes a command once, to replay it later withSend.
Detailed documentation
- API reference: every command, its parameters and its errors.
- Luxafor, the company and its devices: what these indicators are for, and which ones this library drives.
- Changelog and contributing guide.
License
This library is distributed under the Apache-2.0 license.
| Product | Versions 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. |
-
.NETFramework 4.6.2
- hidlibrary (>= 3.3.40)
-
.NETStandard 2.0
- hidlibrary (>= 3.3.40)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.