Skip to content
busycursorPublic

About

macOS localhost daemon for RGB peripherals (SteelSeries QcK Prism, Logitech G903)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

mousepadd

A small macOS daemon that drives RGB lighting on two peripherals over a localhost HTTP API:

  • SteelSeries QcK Prism (hard mat, USB 1038:1507): 12 individually addressable perimeter LEDs. Modes: off, solid (one color or 12 zones), breathing, rotate.
  • Logitech G903 Lightspeed (via the Lightspeed receiver, 046d:c539): the G logo. Modes: off, solid, cycle (runs on the mouse itself), breathing.

Devices are hot-pluggable; the daemon connects and disconnects as they come and go.

Requirements

  • macOS on Apple silicon, with Homebrew
  • brew install python hidapi

Python dependencies (aiohttp, hid, solaar) are installed from PyPI by the installer; none of their code is bundled here.

Install

git clone https://github.com/busycursor/mousepad.git
cd mousepad
./install/install.sh

This creates a self-contained venv at ~/Library/Application Support/mousepadd/venv/ and registers a LaunchAgent (com.busycursor.mousepadd) that starts at login and restarts on failure. Logs go to ~/Library/Logs/mousepadd.log.

  • ./install/update.sh: push local code changes into the live install and restart
  • ./install/uninstall.sh: stop and remove the LaunchAgent (optionally the venv)

API

Listens on 127.0.0.1:8765. <id> is qck or g903.

Method Path Body
GET /state all devices
GET /devices/<id>/state one device
POST /devices/<id>/mode {"name": ..., ...params}
POST /devices/<id>/brightness {"level": 0-255}
curl -s -X POST localhost:8765/devices/qck/mode \
  -d '{"name": "solid", "color": [255,0,255]}'
# rotate takes a 12-entry palette, one [r,g,b] per LED
curl -s -X POST localhost:8765/devices/qck/mode \
  -d '{"name": "rotate", "speed_zps": 4, "palette": [[255,0,0],[255,128,0],[255,255,0],[0,255,0],[0,255,255],[0,0,255],[128,0,255],[255,0,255],[255,0,128],[255,255,255],[64,64,64],[0,0,0]]}'
curl -s -X POST localhost:8765/devices/g903/mode \
  -d '{"name": "solid", "color": [0,255,128]}'

lightshow.py is a demo that drives both devices together through the API.

Development

Protocol notes live in CLAUDE.md; probe scripts are in probes/. ./scripts/fetch-refs.sh downloads the third-party references the drivers were built from (OpenRGB controllers, bahorn's QCKPrism notes) into a git-ignored openrgb-ref/.

License

MIT. See LICENSE.

About

macOS localhost daemon for RGB peripherals (SteelSeries QcK Prism, Logitech G903)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages