https://github.com/gxjansen/pirate-audio-mopidy-setup
Complete setup for Pimoroni Pirate Audio HAT with Mopidy on Raspberry Pi. Features automatic playlist loading, physical button controls, and hands-free operation.
https://github.com/gxjansen/pirate-audio-mopidy-setup
audio automation gpio mopidy pimoroni pirate-audio python raspberry-pi systemd
Last synced: about 2 months ago
JSON representation
Complete setup for Pimoroni Pirate Audio HAT with Mopidy on Raspberry Pi. Features automatic playlist loading, physical button controls, and hands-free operation.
- Host: GitHub
- URL: https://github.com/gxjansen/pirate-audio-mopidy-setup
- Owner: gxjansen
- Created: 2025-09-03T21:19:19.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-09-03T21:22:06.000Z (10 months ago)
- Last Synced: 2026-05-06T17:51:40.673Z (about 2 months ago)
- Topics: audio, automation, gpio, mopidy, pimoroni, pirate-audio, python, raspberry-pi, systemd
- Language: Python
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pirate Audio Mopidy Setup
A complete setup for using the Pimoroni Pirate Audio HAT with Mopidy music server on Raspberry Pi, featuring automatic playlist loading and physical button controls.
## Features
- 🎵 **Mopidy Music Server** with web interface (Iris)
- 🔘 **Physical Button Controls** for play/pause, next/previous, volume
- 📱 **ST7789 Display Support** with custom interface
- 🎶 **Auto-load Playlists** on boot (no manual web interface interaction needed)
- 🔄 **Auto-start Services** for hands-free operation
- 🔊 **HiFiBerry DAC Audio** output
## Hardware Requirements
- Raspberry Pi (tested on Pi Zero 2WH)
- Pimoroni Pirate Audio HAT (240x240 ST7789 display + 4 buttons + DAC)
- MicroSD card (16GB+)
- Audio files stored locally
## Quick Start
1. **Install base system:**
```bash
./scripts/install.sh
```
2. **Configure Mopidy:**
```bash
./scripts/configure-mopidy.sh
```
3. **Setup services:**
```bash
./scripts/setup-services.sh
```
4. **Add your audio files** to the configured media directory
5. **Create playlist file** (see [Configuration Guide](docs/configuration-guide.md))
6. **Reboot** and enjoy hands-free audio playback!
## Button Controls
- **A (Bottom Left)**: Play/Pause ▶️⏸️
- **B (Left Side)**: Previous Track ⏮️
- **X (Bottom Right)**: Next Track ⏭️
- **Y (Top Right)**: Volume Toggle 🔊 (50% ↔ 70%)
## Project Structure
```
├── docs/ # Documentation
├── scripts/ # Installation scripts
├── config/ # Configuration templates
├── src/ # Python source code
├── systemd/ # SystemD service files
└── README.md # This file
```
## Documentation
- [Installation Guide](docs/installation-guide.md) - Detailed setup instructions
- [Configuration Guide](docs/configuration-guide.md) - Config file explanations
- [Troubleshooting](docs/troubleshooting.md) - Common issues and solutions
## Audio Files & Copyright
This project does NOT include audio files. You must provide your own legally obtained audio content. The project is designed to work with:
- Local audio files (MP3, FLAC, etc.)
- M3U/M3U8 playlists
- Any format supported by GStreamer
## Contributing
Contributions welcome! Please read the contributing guidelines and submit pull requests for any improvements.
## License
MIT License - See LICENSE file for details.
## Acknowledgments
- **Hardware Foundation**: Built using the excellent [Pimoroni Pirate Audio](https://github.com/pimoroni/pirate-audio) examples as reference for button handling
- [Pimoroni](https://pimoroni.com/) for the excellent Pirate Audio HAT hardware
- [Mopidy](https://mopidy.com/) music server project
- [Mopidy-Iris](https://github.com/jaedb/iris) web interface