Skip to main content

๐Ÿš€ Zero-touch provisioning for Raspberry Pi fleets - Configure WiFi, SSH, users, hardware peripherals, and manage devices through encrypted mesh networking

Project description

๐Ÿ”ท MeshPi

Zero-Touch Raspberry Pi Fleet Management

Python PyPI Downloads CI Status Coverage License Code Style

๐Ÿš€ Configure WiFi, SSH, users, hardware peripherals, and manage devices through encrypted mesh networking

Install โ€ข Quick Start โ€ข Features โ€ข Docs โ€ข PyPI


๐Ÿ“‹ Overview

MeshPi eliminates the manual work of configuring Raspberry Pi devices from factory defaults. Whether deploying one device or an entire fleet, MeshPi handles:

  • ๐Ÿ“ถ WiFi credentials - No monitor/keyboard needed
  • ๐Ÿ” SSH keys - Secure remote access out of the box
  • ๐Ÿ‘ค User accounts - Create users, set passwords
  • ๐ŸŒ Locale & timezone - Regional settings applied automatically
  • ๐Ÿ”ง Hardware peripherals - 49+ profiles for displays, sensors, GPIO devices
  • ๐Ÿ“Š Real-time monitoring - CPU, memory, temperature, network status
  • ๐Ÿค– LLM-powered management - Natural language fleet commands

All secured with RSA-2048 + AES-256-GCM encryption. No credentials ever travel in plaintext.


โšก Quick Start

# Install
pip install meshpi

# On HOST machine (your PC or a dedicated RPi)
meshpi config    # Interactive configuration wizard
meshpi host      # Start the host service

# On each CLIENT Raspberry Pi (fresh from factory)
meshpi scan      # Auto-discovers host, configures itself, reboots

๐ŸŽฏ Done! Your Raspberry Pi is now configured and ready.


โœจ Features

๐Ÿ” Encrypted Zero-Touch Provisioning

  • RSA-2048 key exchange + AES-256-GCM encryption
  • No shared secrets, no cleartext on the wire
  • mDNS discovery for automatic host detection

๐Ÿ“ก Real-Time Fleet Management

  • WebSocket-based persistent connections
  • Push config updates instantly
  • Execute shell commands remotely
  • Apply hardware profiles on-the-fly
  • Trigger reboots with delay

๐Ÿ”ง 49+ Hardware Profiles

Category Examples
๐Ÿ–ฅ๏ธ Display OLED SSD1306, TFT ILI9341, e-Paper, HDMI 4K
๐ŸŽ›๏ธ GPIO Steppers (A4988), relays, servos (PCA9685), distance sensors
๐ŸŒก๏ธ Sensors BME280, DS18B20, MPU-6050, INA219
๐Ÿ“ท Camera RPi Camera v2/HQ, USB UVC, IR night vision
๐Ÿ”Š Audio HiFiBerry DAC+, I2S MEMS microphone
๐Ÿ“ก Networking CAN, RS-485, LoRa, nRF24L01
๐ŸŽฉ HATs Sense HAT, PiSugar UPS, RTC DS3231
# Apply multiple profiles in one command
meshpi hw apply oled_ssd1306_i2c sensor_bme280 gpio_stepper_arm69ak

๐Ÿค– LLM-Powered Agent

pip install "meshpi[llm]"

meshpi agent
> show me all online devices
> what's wrong with rpi-kitchen?
> enable OLED display on rpi-bedroom
> push new WiFi password to all devices

Works with OpenAI, Anthropic, Ollama (local), Azure, Groq, and more.

๐Ÿ“Š Full Diagnostics

meshpi diag

Collects CPU load, memory, temperature, GPIO states, I2C scan, USB devices, WiFi signal, services, logs, and more.

๐Ÿ’พ USB Offline Workflow

For air-gapped environments:

meshpi pendrive seed     # Client: write public key to USB
meshpi pendrive export   # Host: encrypt config to USB
meshpi pendrive apply    # Client: apply config from USB

๐Ÿ“ฆ Installation

# Core package
pip install meshpi

# With LLM agent support
pip install "meshpi[llm]"

# Development dependencies
pip install "meshpi[dev]"

# Everything
pip install "meshpi[all]"

Requirements: Python 3.9+, Linux (host), Raspberry Pi OS (client)


๐Ÿ—๏ธ Architecture

HOST (PC / RPi)                    CLIENT (fresh RPi)
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€                  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
meshpi config                      meshpi scan
  โ†’ ~/.meshpi/config.env             โ†’ mDNS discovery
meshpi host                          โ†’ RSA key exchange
  โ†’ FastAPI REST API             โ†   โ†’ Encrypted config
  โ†’ WebSocket /ws/{id}           โ†’   โ†’ Apply & reboot
  โ†’ mDNS advertisement
  โ†’ Dashboard /dashboard
                           โ†•
                    meshpi daemon
                      โ†’ Diagnostics push (60s)
                      โ†’ Real-time commands

๐Ÿ› ๏ธ CLI Reference

Command Description
meshpi config Interactive configuration wizard
meshpi host Start host service (FastAPI + mDNS)
meshpi scan Discover hosts, download config
meshpi daemon Persistent WebSocket connection
meshpi diag Show device diagnostics
meshpi hw list List hardware profiles
meshpi hw apply <id> Apply hardware profile
meshpi agent Launch LLM management agent
meshpi info Show local keys/config state
meshpi pendrive * USB offline workflow

๐Ÿงช Development

# Clone and setup
git clone https://github.com/pyfunc/meshpi.git
cd meshpi
make venv
make dev

# Run tests
make test

# Build package
make build

# Publish to PyPI
make publish

๐Ÿณ Docker

# Build image
docker build -t meshpi .

# Run host
docker run -p 7422:7422 meshpi

# Docker Compose
docker-compose up -d meshpi-host

๐Ÿ“„ License

Apache License 2.0 - see LICENSE for details.


๐Ÿ‘ค Author

Tom Sapletta
๐Ÿ“ง tom@sapletta.com
๐Ÿข Softreck - Embedded systems, IoT automation


๐Ÿ”— Links


โฌ† Back to Top

Made with โค๏ธ for the Raspberry Pi community

License

Apache License 2.0 - see LICENSE for details.

Author

Created by Tom Sapletta - tom@sapletta.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

meshpi-0.1.12.tar.gz (58.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

meshpi-0.1.12-py3-none-any.whl (55.4 kB view details)

Uploaded Python 3

File details

Details for the file meshpi-0.1.12.tar.gz.

File metadata

  • Download URL: meshpi-0.1.12.tar.gz
  • Upload date:
  • Size: 58.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for meshpi-0.1.12.tar.gz
Algorithm Hash digest
SHA256 d22b05c0fee31843512e14962d839721c70ca6b08f1ba2ad57c5ee3a4c086c11
MD5 5a5d3ac07484869a4b2b24054243cf1f
BLAKE2b-256 3dbffa628b646642070a0cab396848863753532c520a509a934de7da028115c9

See more details on using hashes here.

File details

Details for the file meshpi-0.1.12-py3-none-any.whl.

File metadata

  • Download URL: meshpi-0.1.12-py3-none-any.whl
  • Upload date:
  • Size: 55.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for meshpi-0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 cb044f5c68ef57ba3f882d06ebecf7031e3c20f9edbe51afa383d14bb678f75e
MD5 274b6a64a56b44cc1b070f685e3a128c
BLAKE2b-256 9b98e9b062ac81dfdcb2707d50fe6673b144a6cc8b236031daf5ceedcf51f2c0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page