ajazz-companion-bridge
Docker app from dvortsis' Repository
Overview
Readme
View on GitHubPlatform setup
New here? Windows users should follow GETTING-STARTED.md, which explains every click. This page covers the other systems and the more technical options.
Some steps below use a terminal: on a Mac open Terminal (Applications → Utilities); on Linux press
Ctrl+Alt+Tor search for Terminal. Type each command and press Enter. Commands starting withsudoask for your computer password (nothing shows as you type; that is normal).
The bridge must run on the machine the deck is plugged into. Companion can be anywhere on the network: set COMPANION_HOST (and COMPANION_PORT) to reach its Satellite API.
Verification status: an AKP05E has been run on a real Windows PC and on a real Unraid 7.3.2 server. On Unraid the published Docker image ran without Privileged, with only the pad's /dev/hidrawN node mapped, registered with a real Companion container, drew every image, and delivered every key, touch zone, swipe and dial turn that was tried. Linux (Debian, Node 22) passes install, lint and the full test suite; the generated systemd unit passes systemd-analyze verify; the launchd plist is well-formed. macOS, and Linux outside Docker, have not been tried with a real deck.
Ready-to-run downloads
The Releases page offers bundles for Windows (.zip), macOS Apple silicon and Intel (.tar.gz) and Linux (.tar.gz). Each contains the bridge, its dependencies, the docs and its own copy of Node.js, so you do not install Node. Unpack it somewhere permanent and use the launcher for your system:
| System | Start | Start at login |
|---|---|---|
| Windows | double-click launch-bridge.vbs (or start.cmd to see output) |
double-click install-startup.cmd |
| macOS | double-click Start Ajazz Bridge.command (or ./start.sh) |
run ./install-startup.sh in Terminal |
| Linux | ./start.sh |
./install-startup.sh (see the Linux section for udev rules) |
You build the same bundle yourself with npm run package (on the OS and CPU you want to ship for). Pushing a v* tag makes GitHub build all bundles and attach them to the release (.github/workflows/release.yml).
Windows
- Install Node.js 20+. Double-click
setup.cmd, or runnpm installand copy.env.exampleto.env. npm start. The tray icon shows status and offers Open log, Open folder, Reconnect, Start at login and Quit.- Start at login: the tray item, or
npm run install-startup(npm run uninstall-startupto remove). This puts a launcher in your Startup folder that runslaunch-bridge.vbs→src/supervisor.jsin a hidden window; the supervisor restarts the bridge if it crashes and stops when you choose Quit. - No Node on the target PC?
npm run packagebuildsdist/ajazz-bridge-portable.zipwith Node and the native modules included (build it on the OS you ship to).
macOS
If you used the ready-to-run download: macOS puts downloaded files in "quarantine", so the first launch can be blocked with "cannot be opened because the developer cannot be verified". Fix it once by opening Terminal, typing xattr -dr com.apple.quarantine (with a trailing space), dragging the unpacked folder onto the Terminal window, and pressing Enter. Then double-click Start Ajazz Bridge.command (if macOS still objects, right-click it and choose Open). The bundles are not code-signed.
Step 1 uses Homebrew. If you don't have it, install Node.js from nodejs.org instead and skip that command.
brew install node, thennpm installand copy.env.exampleto.env.npm start. A menu-bar icon appears (BRIDGE_NO_TRAY=1hides it). The first time the deck is read, macOS may ask to allow Input Monitoring for your terminal or Node.- Start at login:
npm run install-startupwrites~/Library/LaunchAgents/com.ajazz.bridge.plistand loads it;npm run uninstall-startupremoves it. Output goes tolaunchd.out.log/launchd.err.login the bridge folder.
Linux (desktop or server)
On Linux a normal user is not allowed to talk to USB devices until you add a permission rule (step 2). If you skip it the bridge reports a permission denied error.
- Install Node.js 20+. If no prebuilt USB module matches your system:
sudo apt install libudev-dev libusb-1.0-0-dev build-essential. Thennpm install. - Allow your user to open the deck:
Then unplug and replug the deck. The rules grant the logged-in desktop user (node scripts/udev-rules.js | sudo tee /etc/udev/rules.d/99-ajazz-bridge.rules sudo udevadm control --reload && sudo udevadm triggeruaccess) and theplugdevgroup; on a headless server add the service user toplugdev. A copy is committed atdeploy/linux/99-ajazz-bridge.rules. npm start. The tray icon only shows when a display server exists (it is off by default over SSH, on servers and in containers;BRIDGE_NO_TRAY=0forces it).- Start at login/boot:
npm run install-startupcreates a systemd user service. Thensystemctl --user start ajazz-bridge, andloginctl enable-linger $USERso it runs without an open session. Logs:journalctl --user -u ajazz-bridgeandbridge.log.
Docker
Docker packages the bridge so you don't install Node yourself. It suits servers and home labs; on a desktop PC the normal install above is easier.
The image is headless and configured with environment variables; logs and the lock go to /config.
docker run -d --name ajazz-bridge --restart unless-stopped --network host \
-e COMPANION_HOST=127.0.0.1 -e COMPANION_PORT=16622 -v $PWD/config:/config \
--device=/dev/hidraw0 ghcr.io/dvortsis/ajazz-companion-bridge:latest
The image is published for amd64 and arm64 and needs no login to pull. To build it yourself instead, run docker build -t ajazz-companion-bridge . in this folder and use that name in place of the ghcr.io/... one.
or docker compose up -d with the included docker-compose.yml. The deck appears as /dev/hidrawN (ls -l /dev/hidraw*); pass that device with --device, or use --privileged if the number changes between boots. Install the udev rules on the Docker host too. docker logs ajazz-bridge should show [HID] Secured … and ADD-DEVICE OK. Tagging a release (v*) on GitHub publishes ghcr.io/<owner>/ajazz-companion-bridge for amd64 and arm64 with .github/workflows/docker.yml.
Unraid
The pad must be plugged into the Unraid server for this route. If it is plugged into your PC, run the bridge on the PC instead (step 6).
Install the template. Once the app is listed in Community Applications, open Apps and search for "ajazz". Until then (or if you prefer), copy
templates/ajazz-companion-bridge.xmlfrom this repository to/boot/config/plugins/dockerMan/templates-user/on the server, then choose Docker → Add Container → ajazz-companion-bridge.Nothing to build: the template pulls the published image
ghcr.io/dvortsis/ajazz-companion-bridge:latest. (To use a copy you built yourself, rundocker build -t ajazz-companion-bridge /path/to/ajazz-bridgeand set Repository to that name.)Set Companion host to the IP of the machine that runs Companion (the Unraid IP if Companion is another container on this server).
Set USB HID device to the pad's node. The pad shows up as two
/dev/hidrawNentries (the pad itself and a keyboard-style interface); you need the first one, whoseHID_PHYSends in/input0. In the Unraid terminal, with the pad plugged in, run:for d in /sys/class/hidraw/hidraw*; do grep -q 00000300:00003004 $d/device/uevent && echo "$(basename $d) $(grep HID_PHYS $d/device/uevent)"; doneExample output:
hidraw7 HID_PHYS=usb-0000:00:14.0-2.4/input0andhidraw8 … /input1: use/dev/hidraw7. The number can change after a reboot, a replug or other USB devices, so check it again if the pad stops responding.Start the container and open its log. You should see
[HID] Secured …andADD-DEVICE OK. The template runs without Privileged, which has been verified on Unraid 7.3.2. If it saysNo supported devices found, check you picked the/input0node from step 4; as a last resort switch Privileged on (Advanced View).If the deck is plugged into another PC rather than Unraid, run the bridge on that PC and point it at Companion on Unraid.
Requirements
Categories
Related apps
Explore more like this
Explore allDetails
ghcr.io/dvortsis/ajazz-companion-bridge:latestRuntime arguments
- Network
host- Shell
sh- Privileged
- false
Template configuration
IP address or hostname of the machine running Bitfocus Companion (use the Unraid IP if Companion is another container on this server).
- Target
- COMPANION_HOST
- Default
- 127.0.0.1
- Value
- 127.0.0.1
Companion Satellite API port (Settings > Satellite API in Companion).
- Target
- COMPANION_PORT
- Default
- 16622
- Value
- 16622
The pad's /dev/hidrawN node: of the two hidraw entries the pad creates, the one whose HID_PHYS ends in /input0 (see the Overview for the command). The number can change after a reboot or replug.
- Target
- /dev/hidraw0
- Default
- /dev/hidraw0
- Value
- /dev/hidraw0
Log files (bridge.log, rotated at 5 MB).
- Target
- /config
- Default
- /mnt/user/appdata/ajazz-companion-bridge
- Value
- /mnt/user/appdata/ajazz-companion-bridge
error, warn, info or debug. Use debug when asking for help.
- Target
- LOG_LEVEL
- Default
- info
- Value
- info
Raise to 1, 2 or 5 if button pictures look torn or half drawn.
- Target
- HID_WRITE_DELAY_MS
- Default
- 0
- Value
- 0