← Back to Plugins
Voice

Modue

ddrayne By ddrayne 👁 48 views ▲ 0 votes

Modue control surface plugin for OpenClaw β€” live agent activity, channel health, physical approve/deny buttons, and agent-callable LED/display tools.

Homepage GitHub

Install

openclaw plugins install @ddrayne/openclaw-modue-bridge`).

README

# @modue/openclaw

A [Modue](https://www.modue.com) control surface plugin for
[OpenClaw](https://openclaw.ai) β€” turn the Modue's display, slider,
keys, knob, and LED cluster into a physical dashboard for your AI
assistant.

Built for headless setups (Mac Mini behind a TV, no monitor) where you
want at-a-glance status and physical approve / deny buttons for the
agent without context-switching to a terminal.

## How the pieces fit

```
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   β”‚   Modue device      β”‚                    β”‚   OpenClaw agent    β”‚
   β”‚ (display, LEDs,     β”‚                    β”‚ (LLM, channels,     β”‚
   β”‚  slider, keys)      β”‚                    β”‚  approvals, etc.)   β”‚
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
              β”‚                                          β”‚
              β–Ό                                          β”‚
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                               β”‚
   β”‚  this plugin        β”‚                               β”‚
   β”‚  (@modue/openclaw)  β”‚                               β”‚
   β”‚  inside Modue app   β”‚                               β”‚
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                               β”‚
              β”‚ WebSocket (auth + device pairing)        β”‚
              β–Ό                                          β–Ό
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   β”‚              OpenClaw gateway (host)                       β”‚
   β”‚   relays modue.* events via the openclaw-modue-bridge      β”‚
   β”‚   plugin (https://github.com/ddrayne/openclaw-modue-bridge)β”‚
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```

You need **both** sides β€” this Modue-platform plugin, and the
openclaw-side
[`@ddrayne/openclaw-modue-bridge`](https://github.com/ddrayne/openclaw-modue-bridge)
plugin that registers the `modue.*` gateway methods.

## What you get on the device

### Display widgets (7 total)

| Widget        | Size  | Shows                                                               |
| ------------- | ----- | ------------------------------------------------------------------- |
| `Claw Status` | 1Γ—1   | Compact status pill β€” emoji + state + elapsed timer                 |
| `Claw Stream` | 2Γ—2   | Mid-size live agent text + status line                              |
| `Claw Live`   | 4Γ—2   | Main streaming view β€” full agent reply, source, controls            |
| `Claw Full`   | 8Γ—2   | Immersive reading view β€” large type, optimized for far viewing      |
| `Channels`    | 2Γ—1   | Per-channel connection health (WhatsApp, Telegram, Slack, …)        |
| `Approval`    | 2Γ—1   | Pending exec-approval card with risk level + key hint               |
| `Claw Info`   | 2Γ—2   | Context-aware: scroll position, model name, today's cost, approval  |

Drag the widgets you want into your Modue layout in the Modue app.

### Physical controls

- **Left key**: approve pending exec / abort current generation / wake the
  assistant (depending on context).
- **Right key**: deny pending exec / fetch a usage-cost summary onto the
  display (depending on context).
- **Center key**: fetch + render the current channel-connection status.
- **Slider** (motorized fader): scroll back through the streaming reply
  text. Auto-resets to live after 5s of no movement. Agents can also push
  a target position via the `modue_slider` tool.
- **Knob**: reserved.
- **LED cluster**: ambient status β€” green=idle, purple=thinking,
  blue=replying, orange=working, red=error, gray=offline. Flashing amber
  during a pending approval. Agents can override patterns through the
  `modue_leds` tool.

## Setup

### Prerequisites

- A [Modue](https://www.modue.com) device + the Modue desktop app (macOS).
- An [OpenClaw](https://openclaw.ai) install with the gateway running
  locally β€” `openclaw gateway status` should report `Runtime: running`.
- The companion openclaw-side plugin
  [`@ddrayne/openclaw-modue-bridge`](https://github.com/ddrayne/openclaw-modue-bridge)
  installed (`openclaw plugins install @ddrayne/openclaw-modue-bridge`).

### Install (Modue side)

```sh
git clone https://github.com/ddrayne/openclaw-modue.git
ln -s "$PWD/openclaw-modue" "$HOME/Library/Application Support/modue/plugins/openclaw-modue"
```

Then in the Modue app: relaunch (or `Cmd+Shift+R` to hot-reload). The
plugin appears under **Plugins β†’ OpenClaw**.

### Configure

1. Pull your gateway auth token from OpenClaw:

   ```sh
   python3 -c "import json,os; print(json.load(open(f'{os.path.expanduser(\"~\")}/.openclaw/openclaw.json'))['gateway']['auth']['token'])"
   ```

2. In the Modue plugin settings, set:
   - **Gateway URL**: `ws://127.0.0.1:18789` (default β€” leave alone unless
     you've moved the gateway).
   - **Gateway Token**: the value you pulled in step 1.

3. Click **Connect**, or `Cmd+Shift+R` to reload.

### Verify

Tail the plugin log:

```sh
tail -f "$HOME/Library/Application Support/modue/pluginLogs/openclaw.log"
```

You should see, in order:

```
Connecting to OpenClaw at ws://127.0.0.1:18789
Challenge received, building device identity
Device identity loaded: …
Device token saved (pairing approved)        ← first time only
Connected to OpenClaw gateway
modue bridge primed
```

Drag a widget (e.g. `Claw Live`) onto the device. Send any message
through OpenClaw and the agent's reply should stream onto the display
in real time.

## Repo layout

```
openclaw-modue/
β”œβ”€β”€ index.js           # Entry β€” registers config, widgets, slider, keys, LEDs
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ connection.js  # Singleton β€” agent state, subscriber pattern, lifecycle
β”‚   β”œβ”€β”€ widgets.js     # 7 display widgets (Claw Status / Stream / Live / …)
β”‚   β”œβ”€β”€ ws-client.js   # Minimal WS client (Node http + crypto, no npm deps)
β”‚   └── renderer.js    # Display formatting helpers (colors, truncate, time)
β”œβ”€β”€ test/
β”‚   β”œβ”€β”€ connection.test.js  # 153 cases, exhaustive Connection coverage
β”‚   └── ws-client.test.js   # 4 cases for the disconnect-drain behavior
β”œβ”€β”€ icon.png / icon.svg
β”œβ”€β”€ package.json
β”œβ”€β”€ sync.sh            # Dev: rsync source -> Modue install dir
└── README.md
```

Zero npm dependencies. The plugin uses Node 22+ built-ins only (`http`,
`crypto`, `events`).

## Development

```sh
npm test                           # 157 tests, ~250ms

# Push local source into the Modue install dir without committing:
bash sync.sh
# Then Cmd+Shift+R in Modue.
```

`"devMode": true` is set in `package.json` so the Modue app picks up
hot-reloads.

## Troubleshooting

**`gateway token mismatch`**

Modue's stored `Gateway Token` doesn't match `gateway.auth.token` in
`~/.openclaw/openclaw.json`. The token rotates if you reinstall or
upgrade OpenClaw. Re-extract (see Configure step 1) and paste the new
value.

**`bridge ping failed: …`**

The openclaw-side
[`@ddrayne/openclaw-modue-bridge`](https://github.com/ddrayne/openclaw-modue-bridge)
plugin isn't loaded. Install it and restart the gateway:

```sh
openclaw plugins install @ddrayne/openclaw-modue-bridge
openclaw gateway stop && openclaw gateway start
```

**Modue plugin process RSS climbing during agent activity**

You're on an old version. Update to the latest commit (the per-notify
`channels.status` fan-out used to OOM the Modue platform under sustained
streaming). `Cmd+Shift+R` after pulling.

**Plugin log shows multiple parallel "Attempting reconnect…"**

The Connect button or widget initializers fired more than once. Harmless
once auth succeeds, but worth `Cmd+Shift+R` to get a clean single
connection.

## Compatibility

- Node **22+** required (uses built-in WebSocket framing patterns).
- macOS only (`os: "darwin"` in package.json β€” Modue itself is macOS only).
- OpenClaw protocol v3 (PROTOCOL_VERSION constant in `lib/ws-client.js`).

## License

ISC.
voice

Comments

Sign in to leave a comment

Loading comments...