A modern, feature-rich web dashboard for monitoring and controlling your Raspberry Pi with GPIO support
- π Real-time System Monitoring - CPU, memory, disk, network, temperature
- β‘ GPIO Control - Control GPIO pins via web interface with breadboard wiring guides
- π‘ MQTT/IoT Support - Control Tasmota ESP32 devices and IoT sensors
- π΅ Service Management - Monitor and control Raspotify, Shairport-Sync
- π€οΈ Weather Integration - Local weather and world clocks
- π± Mobile-Friendly - Responsive glassmorphism UI
- π§ Extensible - Easy to add new services and integrations
- π Log Viewer - Real-time system and service logs
- β‘ Optimized - Resource-efficient for Pi 3B (1GB RAM)
# Clone the repository
git clone https://github.com/YOUR_USERNAME/raspberry-pi-dashboard.git
cd raspberry-pi-dashboard
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Run development server
python run.pyAccess at: http://localhost:5050
For detailed setup, see docs/GETTING_STARTED.md
Control Raspberry Pi GPIO pins through a beautiful web interface:
- Dynamic Configuration - Edit
configs/gpio_config.jsonto add/remove pins - Visual Wiring Guide - Step-by-step breadboard setup with diagrams
- REST API - Full API for automation
- Real-time Updates - Live pin state monitoring
- Supports: LEDs, Relays, and custom GPIO devices
See docs/GPIO.md for complete GPIO documentation.
Control Tasmota ESP32 devices and IoT sensors via MQTT:
- Easy Setup - Built-in MQTT client with Mosquitto broker support
- Tasmota Devices - Control switches, relays, RGB lights, sensors
- Real-time Control - Power on/off, dimmer, color picker
- Device Management - Add/remove devices via web interface
- REST API - Full API for automation
- Auto-Discovery - Automatic device detection (coming soon)
See docs/MQTT_QUICK_START.md for 5-minute setup guide and docs/MQTT_TASMOTA_GUIDE.md for complete documentation.
raspberry-pi-dashboard/
βββ app/
β βββ routes/ # API endpoints and page routes
β βββ modules/ # Business logic (GPIO, system monitoring)
β βββ static/ # CSS, JavaScript, images
β βββ templates/ # HTML templates
βββ configs/ # JSON configuration files
β βββ gpio_config.json # GPIO pin configuration
β βββ system_config.json # System settings
βββ docs/ # Complete documentation
βββ deploy/ # Production deployment files
βββ logs/ # Application logs (gitignored)
βββ requirements.txt # Python dependencies
βββ run.py # Development server
βββ wsgi.py # Production WSGI entry
GET /api/system/stats- Quick system stats (~10ms)GET /api/system/info- Detailed system informationGET /api/system/weather- Weather dataGET /api/system/world-clocks- World time zones
GET /api/gpio/pins- List all configured pinsPOST /api/gpio/pin/<id>/set- Set pin statePOST /api/gpio/pin/<id>/toggle- Toggle pin stateGET /api/gpio/config- GPIO configuration
GET /api/services/list- Available servicesGET /api/services/raspotify/status- Raspotify statusGET /api/services/shairport-sync/status- Shairport status
See docs/API.md for complete API documentation.
Edit configs/gpio_config.json:
{
"pins": [
{
"id": "gpio_17",
"gpio_number": 17,
"name": "LED 1",
"type": "led",
"direction": "output",
"initial_state": "low",
"group": "LEDs"
}
]
}Copy deploy/environment.example to .env and customize:
SECRET_KEY=your-secret-key-here
LOG_LEVEL=INFO- Backend: Flask 3.0, Python 3.7+
- GPIO: libgpiod (modern GPIO interface)
- Server: Gunicorn + Nginx
- Monitoring: psutil
- Frontend: Vanilla JavaScript, CSS3 (no frameworks)
- OS: Raspberry Pi OS (Debian-based)
Deploy with systemd and nginx:
# Copy systemd service
sudo cp deploy/dashboard.service /etc/systemd/system/
sudo systemctl enable dashboard
sudo systemctl start dashboard
# Configure nginx
sudo cp deploy/nginx.conf /etc/nginx/sites-available/dashboard
sudo ln -s /etc/nginx/sites-available/dashboard /etc/nginx/sites-enabled/
sudo systemctl restart nginxSee docs/DEPLOYMENT.md for complete deployment guide.
- Documentation Index - Complete documentation guide
- Getting Started - Setup guide
- GPIO Guide - GPIO control and configuration
- GPIO Wiring Guide - Visual breadboard setup
- GPIO Pin Reference - Complete pinout
- API Reference - Complete API documentation
- Adding Services - Extend functionality
- Project Structure - Code organization
- Deployment Guide - Production setup
- GitHub Setup - Git best practices
- Security Audit - Security scan report
This dashboard is designed for personal use on a trusted local network.
- β No authentication by default - Add nginx basic auth if exposing to internet
- β Command execution requires sudo - Whitelist-protected but be cautious
- β GPIO control has no auth - Ensure network is secure
- β Designed for internal/home network only
If exposing to the internet:
-
Add Authentication
# Nginx basic auth sudo htpasswd -c /etc/nginx/.htpasswd admin -
Enable HTTPS
- Use Let's Encrypt or self-signed certificates
- See
deploy/nginx-ssl.conf
-
Set Strong SECRET_KEY
export SECRET_KEY=$(python -c 'import secrets; print(secrets.token_hex(32))')
-
Review Command Whitelist
- Check
app/routes/tools.pyfor allowed commands - Disable terminal execution if not needed
- Check
-
Firewall Rules
sudo ufw allow from 192.168.1.0/24 to any port 5050
- Monitor Raspberry Pi system health
- Control GPIO-connected devices (LEDs, relays, sensors)
- Manage music streaming services
- View logs and diagnostics
- Central dashboard for home automation
- IoT device hub
Test GPIO setup:
python test_gpio.pyTest API endpoints:
./scripts/test_new_endpoints.sh- Hardware: Raspberry Pi 3B or newer (1GB+ RAM)
- OS: Raspberry Pi OS (Debian-based)
- Python: 3.7 or higher
- Optional: LEDs, relay modules, breadboard for GPIO testing
This is a personal hobby project, but contributions are welcome!
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
Dashboard not loading?
# Check if running
ps aux | grep gunicorn
# Check logs
tail -f logs/app.logGPIO in simulation mode?
# Run with sudo for GPIO access
sudo venv/bin/python run.py
# Or configure udev rules (see docs/GPIO.md)API not responding?
curl http://localhost:5050/api/system/healthSee docs/GPIO.md for more solutions.
MIT License - See LICENSE for details
- Built with β€οΈ for Raspberry Pi enthusiasts
- Inspired by home automation and maker communities
- Uses libgpiod for modern GPIO control
This software is provided "as-is" for educational and personal use. Use at your own risk, especially when controlling hardware or running system commands. Always follow electrical safety guidelines when working with GPIO pins.
Made with β€οΈ for Raspberry Pi β’ Star β this repo if you find it useful!
- Documentation: docs/00_INDEX.md
- Issues: Use GitHub Issues for bugs and feature requests
- Discussions: Use GitHub Discussions for questions
Optimized for Raspberry Pi 3B β’ Tested on Raspberry Pi OS