![]() |
VOOZH | about |
dotnet add package Reefact.LuxaforLightingDeviceController --version 1.2.0
NuGet\Install-Package Reefact.LuxaforLightingDeviceController -Version 1.2.0
<PackageReference Include="Reefact.LuxaforLightingDeviceController" Version="1.2.0" />
<PackageVersion Include="Reefact.LuxaforLightingDeviceController" Version="1.2.0" />Directory.Packages.props
<PackageReference Include="Reefact.LuxaforLightingDeviceController" />Project file
paket add Reefact.LuxaforLightingDeviceController --version 1.2.0
#r "nuget: Reefact.LuxaforLightingDeviceController, 1.2.0"
#:package Reefact.LuxaforLightingDeviceController@1.2.0
#addin nuget:?package=Reefact.LuxaforLightingDeviceController&version=1.2.0Install as a Cake Addin
#tool nuget:?package=Reefact.LuxaforLightingDeviceController&version=1.2.0Install as a Cake Tool
A .Net library that provides a simple API to control Luxafor devices.
Luxafor is a company that designs and sells products for office productivity, such as availability indicators and notification tools.
Their flagship product is an LED availability indicator that can be programmed to display different colors depending on the user's availability status.
Luxafor's goal is to provide users with a simple and effective way to signal their availability to co-workers and improve communication and collaboration in the workplace.
Here is a non-exhaustive list of Luxafor devices:
Luxafor Flag: an LED availability indicator that displays personal availabilityLuxafor Bluetooth: a wireless, software-controlled LED availability indicator that displays notifications and personal availabilityLuxafor Switch: a wireless, remote-controlled availability indicator that displays the availability of meeting rooms and workstations in real timeLuxafor Cube: a standalone LED availability indicator that displays meeting room availabilityLuxafor Pomodoro-Timer: a USB-powered LED timer that divides work into smaller time slots (see Pomodoro)Luxafor Orb: a wide angle USB LED availability indicatorLuxafor CO2 Monitor: a sensor that analyzes the air quality of a room and alerts you when it needs to be ventilatedLuxafor Mute Button: turn on/off the microphone with a single touch and indicate if you are available with the red/greenLuxafor Colorblind Flag: monochrome USB LED availability light eliminates distractions and boosts productivityThese different devices are designed to be driven manually ('mechanical') for some, semi-automatically (manual driving via software) / automatically (integration via software to tools like Teams, Skype, Cisco, Zappier or via Webhook) for others.
This library aims to allow the integration of USB LED devices to your in-house applications without having to go through the Luxafor server (webhook).
It is developed in .Net Core and is based on the library HidLibrairy which allows to enumerate and communicate with HID compatible USB devices in .NET.
The code below presents an example of basic use of the library for the control of a Luxafor Orb device.
[Fact]
public void french_sequence() {
LuxaforDevice orb = Luxafor.GetDevices().First();
for (var i = 0; i < 3; i++) {
orb.SetBasicColor(BasicColor.Blue);
Thread.Sleep(500);
orb.SetBasicColor(BasicColor.White);
Thread.Sleep(500);
orb.SetBasicColor(BasicColor.Red);
Thread.Sleep(500);
orb.SetBasicColor(BasicColor.Off);
Thread.Sleep(1000);
}
}
Line 3 shows how to connect to a single Orb connected to the machine's USB port.
I will quickly go through all the possible commands to send to devices from the LuxaforDevice.
void TurnOff(); // Turns off all the LEDs of the device
void TurnOff(TargetedLeds targetedLeds); // Turn off the targeted LEDs of the device
void SetColor(BrightColor color); // Turns on the device's LEDs in a custom color.
void SetColor(TargetedLeds targetedLeds, BrightColor color); // Turns on the targeted device LEDs in a custom color.
void FadeColor(BrightColor color, FadeDuration duration); // Make a transition from all the LEDs of the device to a custom color
void FadeColor(TargetedLeds targetedLeds, BrightColor color, FadeDuration duration); // Performs a transition from the targeted device LEDs to a custom color
void Strobe(BrightColor color, Speed speed, Repeat repeat); // Flashes all the LEDs of the device in a custom color
void Strobe(TargetedLeds targetedLeds, BrightColor color, Speed speed, Repeat repeat); // Flashes the targeted device LEDs in a custom color
void PlayPattern(WavePattern wavePattern, BrightColor color, Speed speed, Repeat repeat); // Starts a wave pattern that targets all the LEDs of the device based on a custom color
void PlayPattern(BuiltInPattern, Repeat repeat); // Starts an embedded pattern that targets all LEDs on the device
It is possible to create custom commands called LightingCommand so that they can be reused in the code:
var command = LightingCommand.CreateStrobeCommand(TargetedLeds.All, BrightColor.Yellow, Speed.FromByte(20), Repeat.Count(3));
The Send method allows you to use these commands.
void Send(LightingCommand command); // Send a command to the device
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 is compatible. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
Enhancements: - Device commands now return bool to indicate whether the operation succeeded - Added support for IDisposable on LuxaforDevice o able proper resource cleanup.