Skip to content

Latest commit

 

History

History
158 lines (113 loc) · 3.91 KB

README.md

File metadata and controls

158 lines (113 loc) · 3.91 KB

AULA F87 Python CLI

Command-line tool to control AULA F87 keyboard lighting over USB HID.

Requirements

  • Python 3.9+
  • uv (recommended) or pip

uv run handles dependencies automatically via PEP 723 inline metadata. With pip, install from requirements.txt instead.


Setup

macOS

  1. Install hidapi via Homebrew:

    brew install hidapi
  2. Grant Input Monitoring access to your terminal app:

    System Settings → Privacy & Security → Input Monitoring → enable your terminal (e.g. Terminal.app, iTerm2, Ghostty).

  3. Re-plug the keyboard (or re-pair the wireless USB adapter) after granting access.

  4. Run (no sudo required):

    uv run aula_f87.py scan

    Or with pip:

    pip install -r requirements.txt
    python aula_f87.py scan

Ubuntu / Debian

  1. Install hidapi:

    sudo apt install libhidapi-hidraw0
  2. Add a udev rule so your user can open the device without sudo:

    echo 'SUBSYSTEM=="hidraw", ATTRS{idVendor}=="258a", MODE="0660", GROUP="plugdev"' \
      | sudo tee /etc/udev/rules.d/99-aula-f87.rules
    sudo udevadm control --reload-rules && sudo udevadm trigger
  3. Add yourself to the plugdev group, then log out and back in:

    sudo usermod -aG plugdev $USER
  4. Run (no sudo required after the udev rule is active):

    uv run aula_f87.py scan

    Or with pip:

    pip install -r requirements.txt
    python aula_f87.py scan

Commands

Command Description
scan Show connected AULA F87 device info
list List all available lighting effects
effect <number> Set a lighting effect (see below)
perkey <key:#RRGGBB ...> Set per-key RGB colors
read Read current keyboard configuration
sleep <0-60> Set sleep timer in minutes (0 = disable, max 60)
debounce <1|2|3|4|5> Set debounce time in milliseconds (1-5ms)
reset Factory reset all lighting
raw <hex> Send a raw 20-byte HID fragment (debug)
probe Dump HID collections + probe both RE protocol families (see docs/STREAMING.md)
bench <mode> <anim> Sustained-FPS streaming benchmark (mode = audio or perkey)

Effects

# Name Speed Color
0 OFF — —
1 Fixed on — yes
2 Respire yes yes
3 Rainbow yes —
4 Flash away yes yes
5 Raindrops yes yes
6 Rainbow wheel yes yes
7 Ripples shining yes yes
8 Stars twinkle yes yes
9 Shadow disappear yes yes
10 Retro snake yes yes
11 Neon stream yes yes
12 Reaction yes yes
13 Sine wave yes yes
14 Retinue scanning yes yes
15 Rotating windmill yes —
16 Colorful waterfall yes —
17 Blossoming yes —
18 Rotating storm yes yes

Examples

# Turn lighting off
uv run aula_f87.py effect 0

# Fixed red
uv run aula_f87.py effect 1 --color 255 0 0

# Rainbow at max speed
uv run aula_f87.py effect 3 --speed 4

# Per-key: set Escape red, WASD green
uv run aula_f87.py perkey esc:#ff0000 wasd:#00ff00

# Set debounce to 3ms (default)
uv run aula_f87.py debounce 3

# List available key names
uv run aula_f87.py perkey --list-keys

# Which RE applies to this firmware? (probe both 20-byte and 520-byte paths)
uv run aula_f87.py probe

# Sustained FPS benchmark — brightness-only animation (cmd 0x88)
uv run aula_f87.py bench audio wave --color 255 0 0 -d 5

# Sustained FPS benchmark — full per-key RGB animation (cmd 0x02)
uv run aula_f87.py bench perkey rainbow -d 5

# Cap to 60 fps to measure latency stability
uv run aula_f87.py bench audio sweep --fps 60 -d 10

See docs/STREAMING.md for the streaming architecture and how to use aula.stream.StreamEngine from your own Python code.