Raspberry Pi Sensor Dashboard
Turn a Raspberry Pi into a monitoring station. The Plexus Python agent auto-detects connected I2C sensors and streams everything to a live dashboard — no code required.
What You'll Build
A dashboard streaming:
- I2C sensor data — temperature, humidity, pressure, IMU, light, power
- System health — CPU usage, memory, disk, CPU temperature
- Camera feed — USB or Pi Camera (optional)
What You Need
| Item | Notes |
|---|---|
| Raspberry Pi | Any model with WiFi (Pi 3B+, Pi 4, Pi 5, Pi Zero 2 W) |
| I2C sensor | BME280, MPU6050, INA219, SHT30, BH1750, or any supported sensor |
| Plexus account | Free at app.plexus.company (opens in a new tab) |
Step 1: Enable I2C
If you haven't already, enable I2C on your Pi:
sudo raspi-config
# Navigate to: Interface Options → I2C → EnableReboot if prompted. Verify with:
sudo i2cdetect -y 1You should see your sensor's address (e.g., 0x76 for BME280, 0x68 for MPU6050).
Step 2: Install the Plexus Agent
pip install plexus-agent[sensors]This installs the agent with I2C sensor drivers. For additional capabilities:
pip install plexus-agent[sensors,system] # Add CPU/memory monitoring
pip install plexus-agent[sensors,camera] # Add USB camera support
pip install plexus-agent[all] # EverythingStep 3: Get Your API Key
- Go to app.plexus.company (opens in a new tab)
- Click Add Device
- Copy the API key (starts with
plx_)
Step 4: Start Streaming
Run a single command:
plexus start --key plx_xxxxxThe agent scans your I2C bus and shows what it found:
Scanning I2C bus 1...
Found 2 sensors:
[1] BME280 temperature, humidity, pressure
[2] MPU6050 accel_x, accel_y, accel_z, gyro_x, gyro_y, gyro_z
Stream all? [Y/n]:Press Enter to start. That's it — data flows to your dashboard.
Step 5: Add System Metrics (Optional)
To also monitor CPU, memory, and disk alongside your sensors:
plexus run --key plx_xxxxx --sensor system --name rpi-labThis streams sensor data plus cpu_percent, memory_percent, disk_percent, and cpu_temp.
Step 6: See Your Dashboard
Open app.plexus.company (opens in a new tab). Your device appears and metrics populate in real time.
Create a dashboard with:
- Line charts for temperature and humidity over time
- Gauges for current CPU temperature
- Multi-series plot for IMU accelerometer data (accel_x, accel_y, accel_z)
Running as a Service
To keep the agent running after you close the terminal:
# Create a systemd service
sudo tee /etc/systemd/system/plexus.service << 'EOF'
[Unit]
Description=Plexus Agent
After=network-online.target
Wants=network-online.target
[Service]
User=pi
Environment=PLEXUS_API_KEY=plx_xxxxx
ExecStart=/home/pi/.local/bin/plexus run --name rpi-lab --sensor system
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl enable plexus
sudo systemctl start plexusCheck status with:
sudo systemctl status plexus
journalctl -u plexus -fUsing the Python API Directly
If you want programmatic control instead of the managed agent:
from plexus import Plexus
import time
px = Plexus(api_key="plx_xxxxx", source_id="rpi-lab")
while True:
# Read your sensors however you like
temp = read_temperature()
humidity = read_humidity()
px.send("temperature", temp)
px.send("humidity", humidity, tags={"room": "lab"})
time.sleep(2)Supported Sensors
The agent auto-detects these I2C sensors:
| Sensor | Metrics | I2C Address |
|---|---|---|
| BME280 | temperature, humidity, pressure | 0x76 / 0x77 |
| MPU6050 | accel_x/y/z, gyro_x/y/z | 0x68 |
| INA219 | voltage, current, power | 0x40 |
| SHT3x | temperature, humidity | 0x44 / 0x45 |
| BH1750 | light_lux | 0x23 / 0x5C |
| ADS1115 | adc_ch0–ch3 | 0x48 |
| VL53L0X | distance_mm | 0x29 |
Troubleshooting
"No sensors found" — Run sudo i2cdetect -y 1 to verify your sensor is visible. Check wiring (SDA, SCL, 3.3V, GND). Make sure I2C is enabled in raspi-config.
Permission denied on I2C — Add your user to the i2c group: sudo usermod -aG i2c $USER then log out and back in.
Agent exits immediately — Check your API key. Run with --debug for verbose output: plexus run --key plx_xxxxx --debug.
Next Steps
- I2C Sensor Reference — Full list of supported sensors and configuration
- CAN Bus Adapter — Monitor vehicle or industrial CAN networks
- MAVLink Adapter — Stream drone telemetry
- CLI Reference — Full command reference