Installation
Install the base agent:
pip install plexus-pythonThe base package includes the Plexus client, CLI, buffering, and HTTP transport. Add optional extras for hardware-specific capabilities.
Extras
Install extras by appending them in brackets:
pip install plexus-python[sensors]
pip install plexus-python[sensors,can]
pip install plexus-python[all]| Extra | Installs | Use Case |
|---|---|---|
sensors | smbus2 | I2C sensors (IMU, temperature, pressure, ADC) |
can | python-can, cantools | CAN bus via SocketCAN |
mavlink | pymavlink | MAVLink protocol (drones, autopilots) |
mqtt | paho-mqtt | MQTT broker integration |
modbus | pymodbus | Modbus TCP/RTU (PLCs, industrial sensors) |
opcua | asyncua | OPC-UA (industrial automation) |
serial | pyserial | Serial port (RS-232, UART, GPS receivers) |
ble | bleak | Bluetooth Low Energy relay |
tui | rich | Live terminal dashboard (plexus start --live) |
system | psutil | System health (CPU temp, memory, disk) |
all | All of the above | Install everything |
System Requirements
Base Package
- Python 3.8 or later
- Works on Linux (x86_64, ARM64), macOS, and Windows
Platform-Specific Requirements
| Extra | OS | Requirements |
|---|---|---|
sensors | Linux | I2C enabled (sudo raspi-config on Raspberry Pi) |
can | Linux | SocketCAN kernel module, can-utils |
serial | All | USB-to-serial adapter or UART pins |
system | All | No additional requirements |
Raspberry Pi Quick Setup
# Enable I2C
sudo raspi-config nonint do_i2c 0
# Install with sensors
pip install plexus-python[sensors]
# Verify I2C is working
plexus scanCAN Bus Setup (Linux)
# Load the SocketCAN kernel module
sudo modprobe can
sudo modprobe can_raw
# Bring up the CAN interface
sudo ip link set can0 type can bitrate 500000
sudo ip link set can0 up
# Install with CAN support
pip install plexus-python[can]Environment Variables
Set these before running the agent:
| Variable | Required | Description |
|---|---|---|
PLEXUS_API_KEY | Yes | Your API key (starts with plx_). Get it from app.plexus.company (opens in a new tab) → Settings → Developer. |
PLEXUS_GATEWAY_URL | No | Gateway HTTP ingest URL. Defaults to https://plexus-gateway.fly.dev. |
PLEXUS_GATEWAY_WS_URL | No | Gateway WebSocket URL. Defaults to wss://plexus-gateway.fly.dev. |
export PLEXUS_API_KEY=plx_xxxxxVerify Installation
# Check the installed version
plexus --version
# Diagnose any missing dependencies
plexus doctor
# Scan for connected hardware
plexus scanNext Steps
- Configuration — Configure the agent with a config file or constructor parameters
- Quickstart — Send your first data point in under a minute