Skip to content

feat: add Reachy Mini NATS sidecar support#4

Open
armwaheed wants to merge 3 commits intoatsyplikhin:feat/reachy-mini-guidefrom
armwaheed:reachy-mini-device-connect
Open

feat: add Reachy Mini NATS sidecar support#4
armwaheed wants to merge 3 commits intoatsyplikhin:feat/reachy-mini-guidefrom
armwaheed:reachy-mini-device-connect

Conversation

@armwaheed
Copy link
Copy Markdown

Summary

This PR adds a working Reachy Mini Device Connect sidecar flow for Raspberry Pi deployments that already have a local Reachy daemon or app running.

What changed

  • add run_reachy_nats.py as a small Reachy NATS sidecar runner
  • add transport_mode override support to ReachyMiniDriver
    • allows forcing websocket when Reachy is local to the Pi but Device Connect traffic should go over NATS
  • add tests for the new transport override behavior
  • rewrite the Reachy guide around the validated NATS setup
  • add a pointer from the main Device Connect guide to the Reachy-specific setup

Why

The original Reachy docs were oriented around a standalone daemon flow and Zenoh examples. On the Pi we validated a different production-relevant pattern:

  • an existing local Reachy app owns the daemon on 127.0.0.1:8000
  • a separate Device Connect sidecar runs alongside it
  • the sidecar bridges Reachy RPCs into Device Connect over NATS

Without the transport override, the driver auto-detection can select the wrong real-time transport for this topology.

Validation

Validated on a Raspberry Pi Reachy setup using:

  • local Reachy daemon on 127.0.0.1:8000
  • NATS broker nats://nats-nlb-52ebd3849ae4cb02.elb.us-east-1.amazonaws.com:4222

Observed successful registration logs:

  • Connected to NATS broker: [...]
  • Driver connected: reachy_mini
  • Device registered: ...
  • Subscribed to commands on device-connect.default.reachy-mini-1.cmd

Notes

The reusable Reachy Device Connect bridge remains in strands_robots/device_connect/.
App-specific Reachy browser-control behavior should stay in the separate conference-room repo.

@armwaheed
Copy link
Copy Markdown
Author

Attn: @atsyplikhin

@armwaheed
Copy link
Copy Markdown
Author

Follow-up: the private broker/dashboard path is now confirmed working.

The required private-broker configuration is:

export NATS_URL='nats://137.184.86.16:4222'
export TENANT='souravpati'
export DEVICE_ID='reachy-mini-1'
export NATS_CREDENTIALS_FILE='/path/to/souravpati-reachy-mini-1.creds.json'
export REACHY_HOST='127.0.0.1'
export REACHY_PORT='8000'
export REACHY_TRANSPORT_MODE='websocket'

The important correction is that device_id=reachy-mini-1 was not enough by itself. The runtime also had to use tenant=souravpati for the private broker subjects.

I pushed an additional update to this branch to:

  • add TENANT support to run_reachy_nats.py
  • document the exact private-broker configuration in reachy-guide.md
  • mention the required tenant/device settings from the main Device Connect guide

Observed success log on the private broker:

Connected to NATS broker: ['nats://137.184.86.16:4222']
Device registered: registration_id=c47be84a-e207-4824-8eed-9980bd8f27e7
Subscribed to commands on device-connect.souravpati.reachy-mini-1.cmd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant