Overview
The HID (Human Interface Device) plugin enables QLC+ to receive input from USB HID-class devices such as joysticks, gamepads, keyboards, and other USB input devices. This provides an affordable way to control lighting using gaming peripherals and generic USB controllers.The plugin name as reported by QLC+ is “HID”
Capabilities
The HID plugin supports:- Input - Receive data from HID devices
- Output - Send data to HID devices (limited device support)
Supported Device Types
The HID plugin works with standard USB HID-class devices:Joysticks
Flight sticks, game controllers with analog axes
Gamepads
PlayStation, Xbox, generic USB gamepads
Keyboards
Standard USB keyboards (requires HID mode)
Custom Controllers
Arduino-based HID devices, custom USB controllers
Platform Support
The HID plugin has platform-specific implementations:- Linux - Uses
/dev/inputand evdev interface - macOS - Uses IOKit HID Manager
- Windows - Uses Windows HID API
Device Detection
Devices are automatically detected when:- QLC+ starts and calls
init() - The user manually rescans via configuration
- USB hotplug events occur (device connected/disconnected)
Hotplug Support
Automatic detection of device connections:When a device is connected or disconnected, the plugin emits
configurationChanged() to notify QLC+.Input Configuration
Opening Input
- Plugin locates the HID device by index
- Opens the device for reading
- Starts polling thread for input events
HID Input Events
HID devices report various input types:- Axes
- POV/Hat
Channel Mapping
HID devices map to QLC+ channels in order:Output Configuration
Opening Output
Devices with Output
Some devices support output:- Force feedback joysticks - Vibration/rumble effects
- RGB keyboards/mice - LED control
- Custom USB devices - Device-specific outputs
Writing Data
Device Polling
The HID plugin uses a polling thread to read device state:Unlike interrupts, polling introduces small latency (20-50ms). This is acceptable for lighting control but may not be suitable for real-time gaming.
Configuration
The HID plugin supports configuration through the QLC+ interface:- Viewing detected devices
- Rescanning for new devices
- Testing device inputs
- Viewing channel mappings
Device Management
Device List
Getting Devices
Adding/Removing Devices
Platform-Specific Details
Linux
Device location:/dev/input/event*
Permissions:
macOS
Framework: IOKit HID Manager Device access: Automatic (no special permissions) Testing:- Use USB Prober (Xcode tools)
- System Information → USB
Windows
API: Windows HID API (hid.dll) Device access: Automatic for HID devices Testing:- Device Manager → Human Interface Devices
- Joy.cpl (Game Controllers control panel)
- Use tools like HIDView or USB Device Tree Viewer
Common Controllers
Xbox 360/One Controllers
VID:PID: 045e:028e (360), 045e:02dd (One) Inputs:- 14 buttons
- 2 analog sticks (4 axes)
- 2 analog triggers (2 axes)
- 1 D-pad
PlayStation DualShock 3/4
VID:PID: 054c:0268 (DS3), 054c:05c4 (DS4) Inputs:- 17 buttons
- 2 analog sticks (4 axes)
- Pressure-sensitive face buttons (DS3)
- Touchpad (DS4)
Logitech Extreme 3D Pro
VID:PID: 046d:c215 Inputs:- 12 buttons
- 3 axes (X, Y, twist)
- 1 POV hat
- 1 throttle slider
Generic USB Gamepads
Most generic USB gamepads work as HID:- 8-12 buttons
- 2 analog sticks
- D-pad
Best Practices
Button Debouncing
QLC+ handles debouncing, but for critical triggers:- Use virtual channels with short fade times
- Implement hysteresis in scenes
- Use edge triggers instead of level triggers
Axis Calibration
Device Selection
Good choices for lighting:- Controllers with many buttons
- Devices with robust construction
- Controllers with good analog sticks
- Affordable, readily available devices
- Wireless controllers (latency, battery issues)
- Devices requiring special drivers
- Overly complex multi-mode devices
Troubleshooting
Device Not Detected
Check USB connection
Check USB connection
Verify device is properly connected and powered
Verify HID mode
Verify HID mode
Some devices have multiple modes - ensure HID mode is active
Check permissions (Linux)
Check permissions (Linux)
User must be in
input group: sudo usermod -a -G input $USERTry different USB port
Try different USB port
Some USB hubs may not properly enumerate HID devices
Rescan devices
Rescan devices
Use configuration dialog to manually rescan
No Input Received
- Verify input is opened in QLC+
- Test device with OS tools (evtest, Joy.cpl, etc.)
- Check channel mapping in input profile
- Ensure device is not in sleep/power-save mode
- Try reconnecting the device
Erratic Input Values
- Check for USB interference or power issues
- Verify device drivers are up to date
- Test with different USB port
- Check for damaged cable or connector
- Apply deadzone to axes if drifting
Linux Permission Issues
Creating Custom HID Controllers
You can create custom controllers using:Arduino Leonardo/Micro
Arduino boards with native USB support:Teensy
Powerful microcontroller with excellent HID support:- Multiple HID types (keyboard, mouse, joystick)
- High update rates
- Large number of inputs
STM32
Advanced ARM microcontrollers with USB HID:- Very fast
- Many GPIO pins
- Requires more programming knowledge
Related Pages
MIDI Plugin
MIDI controller support
OSC Plugin
Network-based control protocol
Plugin Overview
Learn about the plugin architecture
