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


๐Ÿ—๏ธ Architektura Systemu

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                           ๐Ÿš€ MESHPI FLEET MANAGEMENT                            โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   GRUPY RPi     โ”‚โ”€โ”€โ”€โ–ถโ”‚   PROFILE HW    โ”‚โ”€โ”€โ”€โ–ถโ”‚   INSTALACJA    โ”‚โ”€โ”€โ”€โ–ถโ”‚   MONITORING    โ”‚
โ”‚                 โ”‚    โ”‚                 โ”‚    โ”‚                 โ”‚    โ”‚                 โ”‚
โ”‚ โ€ข office_sensorsโ”‚    โ”‚ โ€ข OS + Drivers  โ”‚    โ”‚ โ€ข Pakiety       โ”‚    โ”‚ โ€ข Prometheus    โ”‚
โ”‚ โ€ข warehouse_autoโ”‚    โ”‚ โ€ข Biblioteki    โ”‚    โ”‚ โ€ข Moduล‚y        โ”‚    โ”‚ โ€ข Grafana       โ”‚
โ”‚ โ€ข lab_gpio      โ”‚    โ”‚ โ€ข Konfiguracja  โ”‚    โ”‚ โ€ข Uprawnienia   โ”‚    โ”‚ โ€ข Alerting      โ”‚
โ”‚ โ€ข home_automationโ”‚   โ”‚                 โ”‚    โ”‚                 โ”‚    โ”‚ โ€ข Audit Logs    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚                       โ”‚                       โ”‚                       โ”‚
         โ–ผ                       โ–ผ                       โ–ผ                       โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   LOGIKA        โ”‚    โ”‚   KONFIGURACJA  โ”‚    โ”‚   DEPLOYMENT    โ”‚    โ”‚   OBSERWOWALNOลšฤ†โ”‚
โ”‚                 โ”‚    โ”‚                 โ”‚    โ”‚                 โ”‚    โ”‚                 โ”‚
โ”‚ โ€ข Logiczne      โ”‚    โ”‚ โ€ข YAML profiles โ”‚    โ”‚ โ€ข SSH Remote    โ”‚    โ”‚ โ€ข Real-time     โ”‚
โ”‚ โ€ข Zbiory        โ”‚    โ”‚ โ€ข Kategorie     โ”‚    โ”‚ โ€ข Batch Install โ”‚    โ”‚ โ€ข Historical    โ”‚
โ”‚ โ€ข Przeznaczenie โ”‚    โ”‚ โ€ข Tagi          โ”‚    โ”‚ โ€ข OTA Updates   โ”‚    โ”‚ โ€ข Alerting      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                           ๐Ÿ”ฅ FLOW PRACY MESHPI                                   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  PLAN   โ”‚โ”€โ”€โ”€โ–ถโ”‚ KONFIG  โ”‚โ”€โ”€โ”€โ–ถโ”‚ WYBร“R   โ”‚โ”€โ”€โ”€โ–ถโ”‚ INSTAL  โ”‚โ”€โ”€โ”€โ–ถโ”‚ MONITOR โ”‚
โ”‚         โ”‚    โ”‚         โ”‚    โ”‚         โ”‚    โ”‚         โ”‚    โ”‚         โ”‚
โ”‚ Grupy   โ”‚    โ”‚ Urzฤ…dz. โ”‚    โ”‚ Profile โ”‚    โ”‚ Pakiety โ”‚    โ”‚ Metryki โ”‚
โ”‚ Profile โ”‚    โ”‚ SSH     โ”‚    โ”‚ Hardwareโ”‚    โ”‚ Moduล‚y  โ”‚    โ”‚ Alerty  โ”‚
โ”‚ Scenarizโ”‚    โ”‚ Sieฤ‡    โ”‚    โ”‚ Drivers โ”‚    โ”‚ Uprawn. โ”‚    โ”‚ Logs    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                         ๐Ÿข TYPOWE WDROลปENIE - BIURO                             โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  HOST PC        โ”‚ โ”€โ”€โ–ถ  meshpi host (port 7422)
โ”‚ 192.168.1.10   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚
         โ–ผ SSH + ENCRYPTION
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   RPi #1        โ”‚    โ”‚   RPi #2        โ”‚    โ”‚   RPi #3        โ”‚
โ”‚ 192.168.1.100   โ”‚    โ”‚ 192.168.1.101   โ”‚    โ”‚ 192.168.1.102   โ”‚
โ”‚                 โ”‚    โ”‚                 โ”‚    โ”‚                 โ”‚
โ”‚ โ€ข BME280 Sensor โ”‚    โ”‚ โ€ข BME280 Sensor โ”‚    โ”‚ โ€ข BME280 Sensor โ”‚
โ”‚ โ€ข OLED Display  โ”‚    โ”‚ โ€ข OLED Display  โ”‚    โ”‚ โ€ข OLED Display  โ”‚
โ”‚ โ€ข WiFi Config   โ”‚    โ”‚ โ€ข WiFi Config  โ”‚    โ”‚ โ€ข WiFi Config  โ”‚
โ”‚ โ€ข SSH Keys      โ”‚    โ”‚ โ€ข SSH Keys     โ”‚    โ”‚ โ€ข SSH Keys     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚                       โ”‚                       โ”‚
         โ–ผ                       โ–ผ                       โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                         ๐Ÿ“Š PROMETHEUS + GRAFANA                                 โ”‚
โ”‚                                                                                 โ”‚
โ”‚ โ€ข CPU/Memory/Temperature Metrics                                                โ”‚
โ”‚ โ€ข Sensor Data (temp/humidity/pressure)                                          โ”‚
โ”‚ โ€ข Device Status & Health                                                        โ”‚
โ”‚ โ€ข Alert Rules (offline, high temp, low memory)                                  โ”‚
โ”‚ โ€ข Historical Data & Trends                                                      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ“‹ 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

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                           ๐Ÿš€ QUICK START FLOW                                   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   HOST PC       โ”‚         โ”‚   MESHPI HOST   โ”‚         โ”‚ CLIENT RPi      โ”‚
โ”‚                 โ”‚         โ”‚                 โ”‚         โ”‚                 โ”‚
โ”‚ โ€ข Install MeshPiโ”‚ โ”€โ”€โ–ถ     โ”‚ โ€ข Config Wizard โ”‚ โ”€โ”€โ–ถ     โ”‚ โ€ข Scan & Join   โ”‚
โ”‚ โ€ข Run Config    โ”‚         โ”‚ โ€ข Start Service โ”‚         โ”‚ โ€ข Auto-Setup    โ”‚
โ”‚ โ€ข Start Host    โ”‚         โ”‚ โ€ข Port 7422     โ”‚         โ”‚ โ€ข Reboot Ready  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
# 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.


๐Ÿ“ฑ Client Setup (Raspberry Pi)

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                         ๐Ÿ“ฑ RASPBERRY PI SETUP FLOW                              โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  FACTORY RPi    โ”‚โ”€โ”€โ”€โ–ถโ”‚  CONNECT NET    โ”‚โ”€โ”€โ”€โ–ถโ”‚  UPDATE SYSTEM  โ”‚โ”€โ”€โ”€โ–ถโ”‚  SCAN & JOIN    โ”‚
โ”‚                 โ”‚    โ”‚                 โ”‚    โ”‚                 โ”‚    โ”‚                 โ”‚
โ”‚ โ€ข Fresh OS      โ”‚    โ”‚ โ€ข WiFi/Network  โ”‚    โ”‚ โ€ข apt update    โ”‚    โ”‚ โ€ข meshpi scan   โ”‚
โ”‚ โ€ข Default Configโ”‚    โ”‚ โ€ข Internet      โ”‚    โ”‚ โ€ข apt upgrade   โ”‚    โ”‚ โ€ข Auto-discover โ”‚
โ”‚ โ€ข No Config     โ”‚    โ”‚ โ€ข Access        โ”‚    โ”‚ โ€ข reboot        โ”‚    โ”‚ โ€ข Auto-setup    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ”ง Prerequisites Setup

Before running meshpi scan on your Raspberry Pi, follow these steps:

1. Connect to Internet

# Connect to WiFi using desktop interface or command line
sudo raspi-config
# Navigate to Network Options โ†’ Wi-Fi โ†’ Enter SSID and password

2. Update System

# Update package lists and upgrade system packages
sudo apt update && sudo apt upgrade -y

# Reboot after updates
sudo reboot

3. Install Python pip

# Install pip if not already installed
sudo apt install python3-pip python3-venv -y

# Verify installation
pip3 --version

4. Install MeshPi

# Install MeshPi package
pip3 install meshpi

# Or with LLM support for natural language commands
pip3 install "meshpi[llm]"

5. Run MeshPi Scan

# Discover and connect to MeshPi host
meshpi scan

๐Ÿš€ One-Liner Installation

For experienced users, here's the complete setup in one command:

sudo apt update && sudo apt upgrade -y && sudo apt install python3-pip -y && pip3 install meshpi && meshpi scan

๐Ÿ“‹ What Happens During Scan

When you run meshpi scan, the client will:

  1. ๐Ÿ” Discover Host - Uses mDNS to find MeshPi hosts on your network
  2. ๐Ÿ”‘ Key Exchange - Generates RSA key pair and exchanges with host
  3. ๐Ÿ” Download Config - Receives encrypted configuration
  4. โš™๏ธ Apply Settings - Configures WiFi, SSH, users, locale
  5. ๐Ÿ”„ Reboot - Restarts to apply all changes

๐Ÿ› ๏ธ Troubleshooting

No hosts found?

  • Ensure host machine is running meshpi host
  • Check both devices are on the same network
  • Verify firewall allows mDNS (port 5353)

Installation issues?

# Update pip to latest version
pip3 install --upgrade pip

# Install with specific version
pip3 install meshpi==0.1.14

โœจ Features

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                           ๐Ÿ”ฅ MESHPI FEATURE MATRIX                               โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  ENCRYPTION     โ”‚    โ”‚  FLEET MGMT     โ”‚    โ”‚  HARDWARE       โ”‚    โ”‚  MONITORING     โ”‚
โ”‚                 โ”‚    โ”‚                 โ”‚    โ”‚                 โ”‚    โ”‚                 โ”‚
โ”‚ โ€ข RSA-2048      โ”‚    โ”‚ โ€ข WebSocket     โ”‚    โ”‚ โ€ข 49+ Profiles  โ”‚    โ”‚ โ€ข Prometheus    โ”‚
โ”‚ โ€ข AES-256-GCM   โ”‚    โ”‚ โ€ข Real-time     โ”‚    โ”‚ โ€ข Group Mgmt    โ”‚    โ”‚ โ€ข Grafana       โ”‚
โ”‚ โ€ข mDNS Discoveryโ”‚    โ”‚ โ€ข Push Updates  โ”‚    โ”‚ โ€ข Auto-Install  โ”‚    โ”‚ โ€ข Alerting      โ”‚
โ”‚ โ€ข Zero-Touch    โ”‚    โ”‚ โ€ข Remote CMD    โ”‚    โ”‚ โ€ข Custom Config โ”‚    โ”‚ โ€ข Audit Logs    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ” 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 with Group Management

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                         ๐Ÿ› ๏ธ HARDWARE PROFILES CATALOG                            โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   DISPLAYS      โ”‚    โ”‚    SENSORS      โ”‚    โ”‚     MOTORS      โ”‚    โ”‚      HATs       โ”‚
โ”‚                 โ”‚    โ”‚                 โ”‚    โ”‚                 โ”‚    โ”‚                 โ”‚
โ”‚ โ€ข OLED SSD1306  โ”‚    โ”‚ โ€ข BME280        โ”‚    โ”‚ โ€ข A4988 Stepper โ”‚    โ”‚ โ€ข Sense HAT     โ”‚
โ”‚ โ€ข TFT ILI9341   โ”‚    โ”‚ โ€ข DS18B20       โ”‚    โ”‚ โ€ข PCA9685 Servo โ”‚    โ”‚ โ€ข PiSugar UPS   โ”‚
โ”‚ โ€ข e-Paper       โ”‚    โ”‚ โ€ข MPU-6050      โ”‚    โ”‚ โ€ข DC Motors     โ”‚    โ”‚ โ€ข RTC DS3231    โ”‚
โ”‚ โ€ข HDMI 4K       โ”‚    โ”‚ โ€ข INA219        โ”‚    โ”‚ โ€ข Relays        โ”‚    โ”‚ โ€ข Adafruit HAT  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚    CAMERAS      โ”‚    โ”‚     AUDIO       โ”‚    โ”‚   NETWORKING    โ”‚    โ”‚      GPIO       โ”‚
โ”‚                 โ”‚    โ”‚                 โ”‚    โ”‚                 โ”‚    โ”‚                 โ”‚
โ”‚ โ€ข RPi Camera v2 โ”‚    โ”‚ โ€ข HiFiBerry DAC โ”‚    โ”‚ โ€ข CAN Bus       โ”‚    โ”‚ โ€ข Distance      โ”‚
โ”‚ โ€ข USB UVC       โ”‚    โ”‚ โ€ข I2S Microphoneโ”‚    โ”‚ โ€ข RS-485        โ”‚    โ”‚ โ€ข Ultrasonic    โ”‚
โ”‚ โ€ข IR NightVisionโ”‚    โ”‚ โ€ข PWM Speakers  โ”‚    โ”‚ โ€ข LoRa          โ”‚    โ”‚ โ€ข IR Sensors    โ”‚
โ”‚ โ€ข MIPI CSI      โ”‚    โ”‚ โ€ข Bluetooth     โ”‚    โ”‚ โ€ข nRF24L01      โ”‚    โ”‚ โ€ข Touch Sensors โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
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
# Quick interactive installation
meshpi hw quick-install --interactive

# Browse hardware catalog
meshpi hw catalog --category sensor --popular

# Apply to device groups
meshpi group create sensors
meshpi group add-device sensors pi@192.168.1.100
meshpi group hw-apply sensors sensor_bme280 sensor_ds18b20

# Remote management via SSH
meshpi ssh hw-apply --target pi@192.168.1.100 hat_sense
meshpi ssh hw-search oled --category display

New Features:

  • ๐ŸŽฏ Quick Install Wizard - Interactive hardware selection and installation
  • ๐Ÿ“‹ Hardware Catalog - Browse and filter 49+ profiles with tags
  • ๐Ÿ‘ฅ Device Groups - Batch operations on multiple devices
  • ๐Ÿ”— SSH Remote Management - Control hardware on remote devices
  • ๐ŸŽจ Custom Profiles - Create and share your own hardware configurations

๐Ÿค– 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.

๐Ÿ“ˆ Monitoring & Observability

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                         ๐Ÿ“Š MESHPI MONITORING STACK                              โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   AUDIT LOGS    โ”‚    โ”‚  PROMETHEUS     โ”‚    โ”‚   ALERT ENGINE  โ”‚    โ”‚   GRAFANA       โ”‚
โ”‚                 โ”‚    โ”‚                 โ”‚    โ”‚                 โ”‚    โ”‚                 โ”‚
โ”‚ โ€ข JSONL Format  โ”‚    โ”‚ โ€ข Metrics API   โ”‚    โ”‚ โ€ข 9 Rules       โ”‚    โ”‚ โ€ข Dashboards    โ”‚
โ”‚ โ€ข Operations    โ”‚    โ”‚ โ€ข Time Series   โ”‚    โ”‚ โ€ข Temperature   โ”‚    โ”‚ โ€ข Visualization โ”‚
โ”‚ โ€ข Device Events โ”‚    โ”‚ โ€ข Device Health โ”‚    โ”‚ โ€ข Memory        โ”‚    โ”‚ โ€ข Historical    โ”‚
โ”‚ โ€ข Timestamps    โ”‚    โ”‚ โ€ข System Stats  โ”‚    โ”‚ โ€ข Offline       โ”‚    โ”‚ โ€ข Alerting      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚                       โ”‚                       โ”‚                       โ”‚
         โ–ผ                       โ–ผ                       โ–ผ                       โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                           ๐Ÿš€ CENTRALIZED MONITORING                             โ”‚
โ”‚                                                                                 โ”‚
โ”‚ โ€ข Real-time Metrics Collection                                                  โ”‚
โ”‚ โ€ข Historical Data Storage                                                       โ”‚
โ”‚ โ€ข Alert Notifications                                                           โ”‚
โ”‚ โ€ข Visual Dashboards                                                             โ”‚
โ”‚ โ€ข Fleet Health Overview                                                         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

MeshPi includes built-in monitoring with Prometheus metrics, alerting, and audit logging:

# View audit log
meshpi audit

# Check alert status
meshpi alerts status

# Push OTA update
meshpi ota push --image ./image.img --devices rpi-001,rpi-002

Features:

  • ๐Ÿ” Audit Logging - All fleet operations logged to JSONL
  • ๐Ÿ“Š Prometheus Metrics - CPU, memory, temperature, device count
  • ๐Ÿšจ Alert Engine - 9 default rules (temperature, memory, offline, etc.)
  • ๐Ÿ”„ OTA Updates - Staged rollout with A/B partition rollback
  • ๐Ÿ“‰ Grafana Dashboards - Pre-built visualization templates

Docker Monitoring Stack:

# Start with Prometheus + Grafana
docker compose --profile monitoring up

# Access endpoints
open http://localhost:7422/metrics    # Prometheus metrics
open http://localhost:9090            # Prometheus UI
open http://localhost:3000            # Grafana (admin/meshpi)

๐Ÿ’พ 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

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                           ๐Ÿš€ MESHPI INSTALLATION FLOW                           โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   HOST PC       โ”‚                     โ”‚   CLIENT RPi    โ”‚
โ”‚                 โ”‚                     โ”‚                 โ”‚
โ”‚ meshpi config   โ”‚                     โ”‚ meshpi scan     โ”‚
โ”‚   โ†“             โ”‚                     โ”‚   โ†“             โ”‚
โ”‚ ~/.meshpi/      โ”‚                     โ”‚ mDNS discovery  โ”‚
โ”‚ config.env      โ”‚                     โ”‚   โ†“             โ”‚
โ”‚                 โ”‚                     โ”‚ RSA key exchangeโ”‚
โ”‚ meshpi host     โ”‚โ—€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”‚   โ†“             โ”‚
โ”‚   โ†“             โ”‚   Encrypted config  โ”‚ Apply settings  โ”‚
โ”‚ FastAPI API     โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ถโ”‚   โ†“             โ”‚
โ”‚   โ†“             โ”‚                     โ”‚ Reboot          โ”‚
โ”‚ WebSocket       โ”‚                     โ”‚   โ†“             โ”‚
โ”‚   โ†“             โ”‚                     โ”‚ Ready!          โ”‚
โ”‚ Dashboard       โ”‚                     โ”‚                 โ”‚
โ”‚   โ†“             โ”‚                     โ”‚                 โ”‚
โ”‚ mDNS Adv        โ”‚                     โ”‚                 โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

                            โ†• Persistent Connection
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚           MESHPI DAEMON                โ”‚
                    โ”‚                                        โ”‚
                    โ”‚ โ€ข Diagnostics push (60s interval)      โ”‚
                    โ”‚ โ€ข Real-time commands                   โ”‚
                    โ”‚ โ€ข Status updates                       โ”‚
                    โ”‚ โ€ข Health monitoring                    โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ› ๏ธ 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

๐Ÿ”ง Environment Variables

MeshPi supports extensive configuration through environment variables. Copy .env.example to .env and customize.

๐Ÿณ Docker & Deployment

# Host service
MESHPI_PORT=7422
MESHPI_BIND=0.0.0.0

# Client configuration
MESHPI_HOST_IP=localhost
MESHPI_HOST_PORT=7422
MESHPI_DEVICE_ID=meshpi-client

๐Ÿ”ง Configuration (MESHPI_CFG_*)

Environment variables with MESHPI_CFG_ prefix are automatically converted to config.env:

# WiFi
MESHPI_CFG_WIFI_SSID="MyNetwork"
MESHPI_CFG_WIFI_PASSWORD="MyPassword"
MESHPI_CFG_WIFI_COUNTRY="PL"

# SSH
MESHPI_CFG_RPI_USER="pi"
MESHPI_CFG_RPI_PASSWORD="raspberry"
MESHPI_CFG_SSH_ENABLE="yes"

# System
MESHPI_CFG_RPI_HOSTNAME="meshpi-node"
MESHPI_CFG_RPI_TIMEZONE="Europe/Warsaw"

๐Ÿค– LLM Agent

# LiteLLM configuration
LITELLM_MODEL=gpt-4o-mini
LITELLM_API_KEY=sk-...
LITELLM_API_BASE=https://api.openai.com/v1

# Alternative providers
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...

๐Ÿ“‹ Complete Reference

See .env.example for all available variables including:

  • Docker & Deployment: Port, binding, client settings
  • Configuration: SSH, WiFi, hostname, hardware interfaces
  • LLM Agent: Multiple provider support
  • Testing: Test devices, SSH keys, timeouts
  • Security: Key paths, crypto settings
  • Monitoring: Log levels, file paths

๐Ÿ“š Standard Documentation

For standardized documentation on device groups and hardware profiles, see:


๐Ÿ“ Repository Organization

meshpi/
โ”œโ”€โ”€ test/                    # Test scripts and utilities
โ”‚   โ”œโ”€โ”€ batch-rpi-test.sh    # Batch testing for multiple RPis
โ”‚   โ”œโ”€โ”€ test-doctor.sh       # Doctor functionality tests
โ”‚   โ”œโ”€โ”€ test-enhanced-cli.sh # CLI feature tests
โ”‚   โ”œโ”€โ”€ test-list.sh         # List functionality tests
โ”‚   โ”œโ”€โ”€ test-restart.sh      # Restart functionality tests
โ”‚   โ”œโ”€โ”€ test-ssh-host.sh     # SSH host tests
โ”‚   โ”œโ”€โ”€ test-ssh-scan-identify.sh # SSH scan tests
โ”‚   โ””โ”€โ”€ run-rpi-tests.sh     # Main Docker test runner
โ”œโ”€โ”€ scripts/                 # Tooling and utility scripts
โ”‚   โ”œโ”€โ”€ diagnose-rpi.sh      # Comprehensive RPi diagnostics
โ”‚   โ”œโ”€โ”€ fix-rpi-meshpi.sh    # Automated common issue fixes
โ”‚   โ”œโ”€โ”€ monitor-repair.py    # Real-time repair status monitor (Python)
โ”‚   โ”œโ”€โ”€ project.py           # Code analysis tool (Python)
โ”‚   โ”œโ”€โ”€ remote-rpi-test.sh   # Remote RPi testing via SSH
โ”‚   โ”œโ”€โ”€ rpi-service-manager.sh # Service management
โ”‚   โ””โ”€โ”€ show-repair-status.py # Visual repair status display (Python)
โ”œโ”€โ”€ meshpi/                  # Core Python package
โ”œโ”€โ”€ docker/                  # Docker configurations
โ”œโ”€โ”€ docs/                    # Documentation
โ””โ”€โ”€ tests/                   # Unit tests

๐Ÿงช 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.35.tar.gz (137.7 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.35-py3-none-any.whl (122.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: meshpi-0.1.35.tar.gz
  • Upload date:
  • Size: 137.7 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.35.tar.gz
Algorithm Hash digest
SHA256 424048bc30f86408d3ebe92e0ae92b8a10470b017eca46fc05d2df1aeb7885c9
MD5 a39be97a0ebb4fdd4e9d3c69a15c81de
BLAKE2b-256 ebc571e72a8d99323baa383fd7ea8f50a4740a063abe6e53d6accb4e9dc7c777

See more details on using hashes here.

File details

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

File metadata

  • Download URL: meshpi-0.1.35-py3-none-any.whl
  • Upload date:
  • Size: 122.5 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.35-py3-none-any.whl
Algorithm Hash digest
SHA256 172b0762f9e2438192220ab3d5cdaed6e3e93bcce17500a1387a38ab48eb870c
MD5 16326864ba8764bace01090a40493ed1
BLAKE2b-256 77e7ee61f81611c376d62f3f1a26e7dfb6f72d69824358b34fc13c5aec305951

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