Skip to main content


🔌 blocksd

ROLI Blocks Daemon for Linux, macOS, and Windows
✦ Topology · Keepalive · LED Control · Touch Events ✦

CI PyPI Python License

Features • Install • Usage • External API • Architecture • Devices • Development • Docs • Vision


ROLI Blocks devices need an active host-side handshake over MIDI SysEx to enter "API mode." Without it, they show a searching animation and eventually power off. ROLI never supported Linux, and the company entered administration in October 2026.

blocksd implements the ROLI Blocks host protocol without ROLI's apps: device discovery, topology management, API mode keepalive, LED control, touch events, and device configuration. The shared runtime uses ALSA on Linux, CoreMIDI on macOS, and WinMM on Windows.

✦ Features

Capability Description
🔌 API Mode Keepalive Periodic pings prevent the 5-second device timeout that kills API mode
🏗️ Topology Management Auto-discovers devices over USB, tracks DNA-connected blocks through master
🎭 Full State Machine Serial → topology → API activation → ping loop, matching the C++ reference
💡 LED Control Lightpad RGB565 grids and LUMI per-key colors, with CLI patterns
👆 Touch & Button Events Normalized touch data (x/y/z/velocity) and button callbacks
⚙️ Device Config Read/write device settings (sensitivity, MIDI channel, scale, etc.)
🔊 DAW Friendly ALSA and CoreMIDI are multi-client, so blocksd and your DAW share MIDI
🛡️ Background Service systemd user service with watchdog and udev rules on Linux; LaunchAgent on macOS

📦 Install

macOS

macOS requires v0.6.0 or newer. To run from source, build the dashboard and start the daemon in the foreground:

git clone https://github.com/hyperb1iss/blocksd.git
cd blocksd
uv sync --locked
pnpm --dir web install --frozen-lockfile
pnpm --dir web build
uv run --locked blocksd run -v

After stopping the foreground process, run uv run --locked blocksd install to install a per-user LaunchAgent that starts on login. macOS does not need udev rules or sudo. Keep the checkout and its virtual environment at the installed path.

The macOS runtime and installer have automated coverage. USB LUMI Keys and a DNA-connected Lightpad Block M have been confirmed entering API mode. Sleep/wake and DAW coexistence still need hardware validation. See the macOS installation guide for service commands, Homebrew packaging status, and the hardware checklist.

Windows (preview)

Windows runs from a source checkout in the foreground, and building python-rtmidi needs Microsoft C++ Build Tools. Commands reach the daemon over its local WebSocket endpoint, and there is no background service yet. Discovery covers LUMI Keys and ROLI Piano M; renderer startup and LED output have not been confirmed on Windows hardware. Follow the Windows installation guide.

Quick Install

curl -fsSL https://github.com/hyperb1iss/blocksd/releases/latest/download/install.sh -o install-blocksd.sh
bash install-blocksd.sh

Starting with v0.6.0, the installer supports Linux and macOS. It installs or upgrades blocksd using uv and managed Python. Linux setup installs udev rules with sudo and restarts a systemd user service; macOS setup installs a per-user LaunchAgent without sudo. Run as your normal user. Use --version 0.6.0 to select a release or --no-udev, --no-service, and --no-enable to skip setup steps. See the installation guide for prerequisites and upgrade details.

From PyPI

uv tool install --python 3.13 blocksd
blocksd install    # Linux: systemd service + udev rules; macOS: LaunchAgent

Arch Linux

Packaging recipes live in packaging/aur/. AUR publication is separate from a GitHub or PyPI release; check the package's availability before installing through an AUR helper.

From Source

git clone https://github.com/hyperb1iss/blocksd.git
cd blocksd
just install
just web-build
uv run --locked blocksd install

The install command sets up:

  • udev rules: proper permissions for ROLI USB devices (requires sudo)
  • systemd user service: auto-starts on login with watchdog monitoring
  • Security hardening: sandboxed with ProtectSystem=strict, NoNewPrivileges, etc.

⚡ Usage

The first LED frame loads a device-side LittleFoot renderer. The daemon waits for complete upload acknowledgement and a matching reply to a fresh execution challenge before sending pixels. Visible RGB patterns have been verified on Lightpad Block M firmware 1.1.0 and LUMI Keys firmware 1.3.9. An accepted API frame confirms daemon acceptance, not a visible display change. See the LittleFoot notes for the hardware evidence and remaining checks.

Running the Daemon

# Foreground with verbose logging
systemctl --user stop blocksd   # if the service is installed
blocksd run -v

# As a systemd service (after install)
systemctl --user start blocksd
systemctl --user status blocksd
journalctl --user -u blocksd -f

When running, you'll see devices connect:

INFO  blocksd ready, scanning for ROLI devices
INFO  Master serial: LKBC9PZSOH978HOE
INFO  Topology: 2 devices, 1 connections
INFO  ✨ Device connected: lumi_keys_block (LKBC9PZSOH978HOE), battery 100%
INFO  ✨ Device connected: lightpad_block_m (LPMJW6SWHSPD8H92), battery 100%

Device Status

# Show devices known to the running daemon
blocksd status

# Include DNA topology details without opening a MIDI session
blocksd status --probe

LED Control

The LED and config commands connect to the running daemon. Keep the service running. LED commands submit a frame and exit; configuration writes wait for device readback. Use --device SERIAL to select a device when more than one is connected.

Control the 15×15 LED grid on Lightpad Block and Lightpad Block M:

blocksd led solid '#ff00ff'                          # solid color
blocksd led rainbow                                   # static rainbow
blocksd led gradient ff0000 0000ff                    # horizontal gradient
blocksd led gradient ff0000 0000ff --vertical         # vertical gradient
blocksd led checkerboard ff0000 00ff00                # 1x1 checkerboard
blocksd led checkerboard ff0000 00ff00 --size 3       # 3×3 checkerboard
blocksd led off                                       # Lightpad lights off

Control all 24 LUMI key colors (firmware 1.3.0 or newer):

blocksd led keys                       # rainbow across the keys
blocksd led keys '#ff00ff'              # one color on every key
blocksd led keys 000000                 # key lights off

Device Configuration

Read and write device settings like velocity sensitivity, MIDI channel, scale mode, and more:

blocksd config list                    # show all known config IDs
blocksd config get 10                  # read velocity sensitivity
blocksd config set 10 50               # write velocity sensitivity

Web Dashboard

Run blocksd ui to open the existing daemon's dashboard. Start the service or blocksd run first; opening the UI does not create another hardware session.

blocksd ui                             # open the running dashboard
blocksd ui --no-browser                # print its URL

The dashboard provides device settings, live Lightpad touch feedback, LittleFoot program loading, and saved presets. Changes stay pending until the device confirms them. Presets can be exported, imported, and selected for reconnect restoration. The DAW handles sound generation.

Service Management

blocksd install                        # Linux: systemd service + udev rules; macOS: LaunchAgent
blocksd install --no-udev              # skip udev rules (Linux)
blocksd install --no-enable            # write/reload without starting or restarting
blocksd uninstall                      # remove service and udev rules

🔌 External API

blocksd exposes two APIs for external integration:

Unix Socket: low-latency IPC for local clients (e.g. Hypercolor)

  • Socket path: $XDG_RUNTIME_DIR/blocksd/blocksd.sock
  • Fallback path: /tmp/blocksd/blocksd.sock
  • macOS path: /tmp/blocksd-<uid>/blocksd.sock in a private per-user directory
  • One socket supports both control messages and high-rate LED frame writes

WebSocket: browser and network clients (used by blocksd ui)

  • Default: ws://localhost:9010/ws
  • Binary LED frame writes + JSON device events

The quick rules:

  • Use discover first to get the device uid
  • Use bitmap frames for devices with nonzero grid_width and grid_height
  • Use JSON key_frame for LUMI devices with key_count = 24
  • Use the fixed-size binary frame protocol for Lightpad animation and streaming
  • Treat frame_ack.accepted=false or binary ack 0x00 as a rejected write: this usually means the device is not ready yet, the uid is gone, or the payload was malformed
  • Once a device is live, frame writes are coalesced daemon-side to the latest target state instead of surfacing host-visible "busy" backpressure
  • Prefer a separate subscription socket if you also want events; outbound NDJSON events and 1-byte binary frame acks share the same connection

See the API reference for the full protocol reference, examples, and Hypercolor-oriented integration notes.

🏗️ Architecture

blocksd
├── daemon.py                 asyncio main loop, sd_notify, signal handling
│   └── TopologyManager       polls MIDI ports every 1.5s
│       └── DeviceGroup       per-USB lifecycle + touch/button/config events
│           └── MidiConnection    python-rtmidi wrapper (SysEx I/O)
├── protocol/                 pure protocol logic (no I/O, fully testable)
│   ├── constants.py          enums, headers, bit sizes
│   ├── checksum.py           SysEx checksum algorithm
│   ├── packing.py            7-bit pack/unpack (LSB-first)
│   ├── builder.py            host → device packet construction
│   ├── decoder.py            device → host packet parsing
│   ├── serial.py             serial number request/parse
│   ├── data_change.py        SharedDataChange diff encoder
│   └── remote_heap.py        ACK-tracked heap manager for live updates
├── device/
│   ├── models.py             BlockType, DeviceInfo, TouchEvent, ButtonEvent
│   ├── config_ids.py         known configuration item IDs
│   ├── registry.py           serial prefix → device type mapping
│   └── connection.py         rtmidi ↔ asyncio bridge
├── led/
│   ├── bitmap.py             RGB565 LED grid (15×15 Lightpad)
│   └── patterns.py           solid, gradient, rainbow, checkerboard
├── littlefoot/
│   ├── opcodes.py            LittleFoot VM opcode definitions
│   ├── assembler.py          bytecode assembler with label support
│   └── programs.py           BitmapLEDProgram (145 bytes)
├── topology/
│   ├── detector.py           MIDI port scanning
│   ├── device_group.py       connection lifecycle (the big one)
│   └── manager.py            orchestrates DeviceGroups
├── api/
│   ├── commands.py           shared command validation and dispatch
│   ├── server.py             Unix socket + WebSocket servers
│   ├── protocol.py           NDJSON + binary frame wire protocol
│   ├── events.py             event broadcaster (device/touch/button/config)
│   ├── websocket.py          RFC 6455 frame codec
│   └── http.py               HTTP parser + static file serving
├── web/                      web dashboard (Vite build output)
├── config/
│   ├── schema.py             DaemonConfig (Pydantic)
│   └── loader.py             TOML config file parsing
├── sdnotify.py               lightweight systemd notification (no deps)
└── cli/
    ├── app.py                Typer commands (run, status --probe)
    ├── led.py                LED pattern commands (solid, rainbow, etc.)
    ├── config.py             device config get/set/list
    └── install.py            systemd/udev setup

Protocol Pipeline

Host                                          Device
 │                                              │
 │  ── Serial Dump Request ──────────────────►  │
 │  ◄─────────────────── Serial Response ────  │
 │  ── Request Topology ─────────────────────►  │
 │  ◄───────────────────── Topology ─────────  │
 │  ── endAPIMode + beginAPIMode ────────────►  │
 │  ◄──────────────────── Packet ACK ────────  │
 │                                              │
 │  ── Ping (400ms master / 1666ms DNA) ─────► │  ← keepalive loop
 │  ◄──────────────────── Packet ACK ────────  │
 │                                              │
 │  ── SharedDataChange (LED data) ──────────► │  ← heap writes
 │  ◄──────────────────── Packet ACK ────────  │

Supported Devices

Device USB PID Serial Prefix Status
Lightpad Block / M 0x0900 LPB / LPM ✅ Tested
LUMI Keys Block 0x0E00 LKB ✅ Tested
Seaboard Block 0x0700 SBB 🔲 Untested
Live Block Unknown LIC 🔲 Untested
Loop Block Unknown LOC 🔲 Untested
Developer Control Block Unknown DCB 🔲 Untested
Touch Block Unknown TCB 🔲 Untested
Seaboard RISE 25/49 0x0200 / 0x0210 N/A 🔲 Untested

Lightpad Block / Lightpad Block M expose a 15×15 bitmap surface. LUMI Keys exposes 24 key colors through a separate key-frame API. Visible RGB patterns were confirmed on Lightpad M 1.1.0 and LUMI 1.3.9 on September 7, 2026. Other recognized Blocks can use discovery and keepalive; their lighting is unverified.

🧪 Development

See CONTRIBUTING.md for the full development guide.

uv sync                        # install all dependencies
uv run pytest                  # run tests
uv run ruff check .            # lint
uv run ruff format --check .   # format check
uv run ty check                # type check

🗺️ Roadmap

See VISION.md for the full vision, use cases, and ideas beyond music.

  • Protocol Core: 7-bit packing, checksum, SysEx builder/decoder
  • Device Discovery: MIDI port scanning, serial number parsing
  • Topology Management: multi-device tracking, DNA connections
  • API Mode Keepalive: full state machine with correct ping timing
  • Remote Heap Manager: ACK tracking, retransmission, heap state sync
  • LittleFoot Assembler: bytecode generation and BitmapLEDProgram definition
  • LittleFoot Upload: execution-ready handshake for Lightpad and LUMI renderers
  • CLI LED Commands: blocksd led solid '#ff00ff', blocksd led rainbow
  • Touch/Button Events: normalized callbacks with full velocity data
  • Config Commands: read/write device settings via CLI
  • sd_notify Integration: Type=notify service with watchdog heartbeat
  • CI/CD: GitHub Actions, PyPI publishing, automated releases
  • D-Bus Interface: IPC for external applications
  • Hypercolor Integration: ROLI Blocks as an RGB device backend

⚖️ License

ISC


Star on GitHub    Ko-fi

If blocksd keeps your Blocks alive, give us a ⭐ or support the project

✦ Built with obsession by Hyperbliss Technologies ✦

Metadata

Release files for blocksd 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for blocksd 0.8.0
File Size Uploaded Provenance Actions
blocksd-0.8.0.tar.gz 1.2 MB With provenance Details for blocksd-0.8.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for blocksd 0.8.0
File Actions
blocksd-0.8.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for blocksd-0.8.0-py3-none-win_amd64.whl
blocksd-0.8.0-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 Details for blocksd-0.8.0-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
blocksd-0.8.0-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.24+ ARM64, Linux glibc 2.28+ ARM64 Details for blocksd-0.8.0-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
blocksd-0.8.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for blocksd-0.8.0-py3-none-macosx_11_0_arm64.whl
blocksd-0.8.0-py3-none-macosx_10_13_x86_64.whl Python 3 none macOS 10.13+ x86-64 Details for blocksd-0.8.0-py3-none-macosx_10_13_x86_64.whl

Total release size: 8.3 MB

Release files / blocksd-0.8.0.tar.gz

Download URL blocksd-0.8.0.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
60e97a065ccd0346bfa0ae702c7747092d397a96bbac9ffbe53c59c40ef89651
BLAKE2b-256 checksum
How to use checksums
1b24c939bf389fde5ee6b611b3406589a88d72f9ab2fe98aee9b92a6ac0ceb19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.

Transparency log

Release files / blocksd-0.8.0-py3-none-win_amd64.whl

Download URL blocksd-0.8.0-py3-none-win_amd64.whl
Size 1.0 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
58a3955ea89aad9e0802e8c4d6ded7652476797942b05f100ea4e1e790676764
BLAKE2b-256 checksum
How to use checksums
78ebbb1af15b17cb44396066638f4932407a62ab888e3d855fb7096f14acc873
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.

Transparency log

Release files / blocksd-0.8.0-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL blocksd-0.8.0-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 1.5 MB
Tags Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
da4139e3ac7b1ad7f199ad0e779ad65be62d1f32724f352ad7bd8e7e64ba0fd6
BLAKE2b-256 checksum
How to use checksums
7dac2724ec7087661f3d95cc15fe9fc280f46946d1729d17e29ea6ff239c9d24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.

Transparency log

Release files / blocksd-0.8.0-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl

Download URL blocksd-0.8.0-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Size 1.5 MB
Tags Linux glibc 2.24+ ARM64 Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
e3caf1a3b6d6a4c2f124cc874bbb696ac508b36272aaa5ae1e2f2359fc31f70d
BLAKE2b-256 checksum
How to use checksums
c412640e94e1dd141b91a92577f0e87ab52329a0ce2e89e98f24980ee09a7865
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.

Transparency log

Release files / blocksd-0.8.0-py3-none-macosx_11_0_arm64.whl

Download URL blocksd-0.8.0-py3-none-macosx_11_0_arm64.whl
Size 1.5 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
6805e34cc027679b10e1348d69085d4d88437e49b91070956933ee88f8986960
BLAKE2b-256 checksum
How to use checksums
72a20a81d3f49eb309495bdbd9b21053415b8a2856b677284f24bc245a2452e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.

Transparency log

Release files / blocksd-0.8.0-py3-none-macosx_10_13_x86_64.whl

Download URL blocksd-0.8.0-py3-none-macosx_10_13_x86_64.whl
Size 1.6 MB
Tags Python 3 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
8a44ef1a52845eca23d6dcc92e7c3aa61bfb120ddeddaf5e4d842d26de6938c4
BLAKE2b-256 checksum
How to use checksums
dc9101e7cdab1cbf2eef92f519125d6aa52b74bda70c17e8243c3f4bc7fdf53e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.

Transparency log

Security for blocksd 0.8.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for blocksd-0.8.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page