openvibers/openvibe.link Commits

Node: a driver can latch the local stop; Windows user-session start; --driver looi (#35)

OP OpenVibers committed 11 Oct 2026 · tag v0.2.0 · 0 files, +0 −0

LOOI owners are building a Generic LOOI driver for the Node: a bridge plugin driving LOOI's base over Bluetooth from a Windows PC, while the robot's phone streams on its own. This gives that driver what it needs from the Node. Bot's matching `looi` profile follows in OpenVibe.Bot.

**A driver can latch the Node's local stop.**
- **The op:** a new plugin → core message, `{"op": "local_stop", "reason": "…"}`. In Python it is `self.local_stop("reason")`. It is for a driver's own stop: a button, a hotkey on the bridge, a sensor it trusts.
- **What happens:** the core stops every plugin at once and latches the **local** stop, persisted with its reason (cleaned of control characters, at most 120 characters, first reason kept). `estop_state` carries `local_stop: true` and that reason, so Bot shows it.
- **Releasing it:** as with `openvibe-node stop` today, only `openvibe-node resume` on the machine releases it. The owner's remote clear does not, and nothing a plugin sends releases a latch.
- **No crossing resume:** the Python runtime refuses motion from the call on, and ignores a `resume` that crosses it on the wire until the core's `estop` confirms it.
- **The CLI's stop:** `openvibe-node stop` now records "openvibe-node stop" as its reason.

**Windows: `openvibe-node install --user-session --home DIR`.**
- **Why:** Bluetooth through the Windows runtime may not work from the LocalSystem service.
- **How:** this starts the Node at sign-in, in the user's own session, from the user's Run registry key, with no administrator needed. The Node runs in a console window that shows its log; the Windows service keeps none yet.
- **Safety:** closing the window stops the Node and every actuator, and nothing restarts it until the next sign-in.
- **Undo:** `uninstall --user-session` removes it. It needs `--home` (the directory you paired with). Other systems refuse the flag with a pointer to the service.

**Installer: `--driver looi`.**
- **What it writes:** a bridge config with video off (LOOI's camera is its phone) and the `looi` plugin.
- **Without the driver:** the driver is the community's, so if `openvibe_looi` is not in the Node's environment yet, the installer says how to install it, and that the robot does not move until it is.

**Docs:**
- New `docs/hardware-looi.md`: the command contract (`drive` throttle/steer, `actuator` head, `halt`, deadlines and telemetry), stopping, and installing on Linux/macOS and Windows. It also states that the robot itself must stop when Bluetooth or commands stop.
- `plugins.md`: the `local_stop` op.
- `install.md`: the user-session start.
- HANDOFF: the two latches are stated correctly; the local one is never cleared by the owner.
- README: the driver list.

**Tests:**
- Go: `TestPluginLocalStop` (latch, reason, survives the owner's clear, resume lifts it), `TestLocalStopIsForwarded`, `TestLocalStopReason`, and `TestUserSession*` (command line, refused off Windows).
- Python: `test_local_stop_latches_and_ignores_a_crossing_resume`.
- `go test ./...`, the plugin suites, shellcheck, and builds for Windows and macOS all pass.

This commit has no diff to show.