ORION Lab Bridge
Modular WebSocket bridge for industrial robotics labs. Connects physical and simulated devices (xArm, ABB, Siemens PLC, shell) to the ORION platform.
Quick start
One command — this is the recommended install and upgrade path:
pip install --upgrade "orion-bridge[all]" # core + GUI + all device drivers
orion # opens the GUI (use `orion --cli` for the terminal menu)
The GUI ships with the core package, so even a plain pip install
orion-bridge gives a working orion --gui. On Windows the first run
registers the Python Scripts directory in your user PATH automatically —
if orion is not recognized right after installing, open a new terminal.
If another program named orion shadows the command (e.g. Oracle's ORION
disk benchmark), use the orion-bridge alias or python -m orion_bridge.
For a lighter install pick only the device drivers you need:
pip install "orion-bridge[xarm]" # physical xArm only
pip install "orion-bridge[mujoco]" # MuJoCo simulation
pip install "orion-bridge[gazebo]" # Gazebo via rosbridge
pip install "orion-bridge[plc]" # Siemens S7 snap7
pip install "orion-bridge[http]" # PLC REST sidecar (Flask)
Available extras: xarm, abb, plc, gazebo, mujoco, http, all
Configuration
Profiles are stored in ~/.orion/connections.toml.
The wizard creates this file on first run. You can also edit it directly.
connections.toml format
# Which profile to use when no --connection flag is given
[default]
profile = "mezzanine"
# One [connections.<name>] section per lab
[connections.mezzanine]
server = "wss://your-server.example.com/ws/robot"
lab_id = "mezzanine"
bridge_id = "hostname-mezzanine" # unique per bridge process
token_env = "ORION_TOKEN_MEZZANINE" # real token read from this env-var
[[connections.mezzanine.devices]]
type = "xarm"
id = "xarm-lab1"
ip = "192.168.1.185"
[[connections.mezzanine.devices]]
type = "shell"
id = "shell-local"
# A second profile (e.g. local dev)
[connections.dev]
server = "ws://localhost:8000/ws/robot"
lab_id = "dev"
bridge_id = "localhost-dev"
token_env = "ORION_TOKEN_DEV"
[[connections.dev.devices]]
type = "xarm"
id = "xarm6-mujoco"
handler = "mujoco"
viewer = true
mjcf_path = "sim/models/xarm6/scene_xarm6.xml"
Token management
The token is never stored in the TOML file. Set the env-var named in
token_env before starting:
export ORION_TOKEN_MEZZANINE="your-secret-token"
orion --connection mezzanine
Or use a .env file with python-dotenv / direnv.
CLI flags
| Flag | Description |
|---|---|
orion |
Interactive wizard (first run) or menu |
orion --list |
Print all saved profiles |
orion --connection NAME |
Start bridge using a specific profile |
orion --local |
Run without a server (local dispatch only) |
orion --config FILE |
Legacy: load a JSON config file |
Migrating from lab_config.json
If you have a legacy lab_config.json from an older installation, run orion
once — the bridge automatically detects the file and migrates it to
connections.toml. The JSON file is left untouched.
You can also migrate manually from Python:
from orion_bridge.connections import migrate_from_json
name = migrate_from_json("lab_config.json")
print(f"Migrated to profile '{name}'")
Supported devices
| Type | Handler | Notes |
|---|---|---|
xarm |
physical (default) |
UFACTORY SDK over IP |
xarm |
mujoco |
MuJoCo simulation (pip install mujoco) |
xarm |
gazebo |
Gazebo via rosbridge (pip install roslibpy) |
abb |
TCP socket | RAPID SocketServer |
plc |
snap7 | Siemens S7-1200 (pip install python-snap7) |
shell |
subprocess | Local commands (whitelisted) |
Environment variables
| Variable | Required | Description |
|---|---|---|
ORION_BRIDGE_ID |
Yes | Unique bridge ID, provisioned by owner |
ORION_BRIDGE_TOKEN |
Yes | Unique bridge token, provisioned by owner |
SUPABASE_URL |
Yes | Supabase project URL |
SUPABASE_ANON_KEY |
Yes (for orion login) |
Anon key — NOT service_role |
Authentication
Bridges have two authentication layers:
- Bridge identity:
ORION_BRIDGE_ID+ORION_BRIDGE_TOKEN, provisioned once and stored in.env. Required for the bridge to connect to the server. - User identity:
orion loginwith email OTP. Required fororion repl.
orion login # sends OTP to your email, stores JWT in ~/.orion/credentials.json
orion logout # removes stored credentials
orion repl # interactive REPL — requires prior login
orion (menu) and orion --start work without login.
Development
pip install -e ".[all]" # editable install with all extras
pytest tests/ -v
Metadata
Release files for orion-bridge 3.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| orion_bridge-3.7.0.tar.gz | 3.4 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| orion_bridge-3.7.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.8 MB
Release files / orion_bridge-3.7.0.tar.gz
| Download URL | orion_bridge-3.7.0.tar.gz |
|---|---|
| Size | 3.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
98110fa67e1323fb015f42818813787e703989b9da1d86bd02a369be6f2663aa
|
|
BLAKE2b-256 checksum How to use checksums |
fa28f1742c4c5f7fdda66fc3c66212fa39c145409054f1bcd690edb7490f9a3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.11
|
Release files / orion_bridge-3.7.0-py3-none-any.whl
| Download URL | orion_bridge-3.7.0-py3-none-any.whl |
|---|---|
| Size | 3.4 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ea5761e58324c39a555bacd36807d4ee5aaea80bc6c08b37c3cbb16d728bea47
|
|
BLAKE2b-256 checksum How to use checksums |
b358592c289816dd22d01d4630d00841f53675bd8487f82e10a1de2c05207d7b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.11
|