Phoniebox
Raspberry Pi RFID-Jukebox
Similar Projects
- home-assistant tags
- piCorePhonie
- MuPiBox
- TonUINO: Arduino-based, no Spotify, only local mp3s
- ESPuino
- RFID-controlled musicplayer powered by ESP32
Unmaintained
Hardware
- Raspberry Pi 3 Model B Plus Rev 1.3
- Suptronics x400
- MFRC522 RFID Reader (see below)
Additional hardware options
Usage
Web-Interface:
- Main phoniebox webinterface
- Started by systemd service
nginx
- Config at
/etc/nginx/sites-enabled/default
- Webapp root dir
/home/varac/RPi-Jukebox-RFID/src/webapp/build
- Webapp root dir
- Logs at
/var/log/nginx/*.log
Config / Locations:
- Root dir:
~/RPi-Jukebox-RFID
- Audio files:
shared/audiofolders/
- RFID to directory mappings:
shared/settings/cards.yaml
- (auto generated) Playlists:
shared/playlists/
- Logs:
shared/logs
Debugging
- Enable debug logging for different modules in
shared/settings/jukebox.yaml
journalctl -f | grep -Eiv '(mpd|do-add-ip6-address|IPv6)'
Raspberry PI OS Installation
- Install Raspberry Pi OS 32bit: mopidy/spotify won't install/run on 64bit
- npm packages need npm v14 -> at least
bookworm
- see also
~/Howtos/hardware/raspberry/raspberry-pi-os.md
- Enable SPI interface in
raspi-config
- Configure x400 soundcard (
./expansion-boards/x400.md
)
Known issues
- future3/develop: known issues
- Firefox: Webapp / websockets not working
- Use Chromium until this is fixed
Future3 installation
- future3 docs
- Installation logs are in
~/RPi-Jukebox-RFID/INSTALL*
systemctl --user status jukebox-daemon.service
Future3 upgrade
cd RPi-Jukebox-RFID
git pull
source .venv/bin/activate
python -m pip install --no-cache-dir -r requirements.txt
Future3 issues
Solved:
- 🐛 | Repeat alias/action doesn't actually work Solution: remove the empty args: from the cards.yaml
- PlayerMPD.prev/next crash at the start/end of the playlist
- Solution: Use
feature3/develop
until Fix PlayerMPD.prev/next() when stopped is merged intofetaure3/main
- Solution: Use
RPi.GPIO
andpi-
is broken in RPI OS bookworm, see
Old / other:
- Alphabetical playlist order instead of id3 tag track number based on future3
- 3 minute start-up time #1110
Feature requests:
Future3 Usage
systemctl --user status mpd
systemctl --user status jukebox-daemon
Logs are at ~/RPi-Jukebox-RFID/shared/logs
tail ~/RPi-Jukebox-RFID/shared/logs/app.log
GPIO usage
- GPIO Docs
- All possible InputDevices see input_devices.py
- Settings:
shared/settings/gpio.yaml
GPIO Hardware
Both RFID-Reader and buttons are connected to GPIO bus.
Standard wiring as suggested in the GPIO docs
RFID
- Module: Neuftech Mifare RC522 IC Card RFID Module
- MFRC522 RFID Reader
MFRC522 RC522 can read/write RFID cards and tags built using ISO/IEC 14443 protocol. This includes MIFARE-compatible RFID tags like MIFARE-mini, MIFARE-1K, MIFARE-4K RFID tags, Key Fob, and NTAG RFID cards.
- Directly supported by RPi-Jukebox-RFID install script (
rc522
) - RFID Module Wiring
- Button wiring
- Pin 1 (3.3V): RFID 3V (red)
- Pin 9 (GND): RFID GND (black)
- Pin 19 (GPIO10): RFID MOSI
- Pin 21 (GPIO9): RFID MISO
- Pin 22 (GPIO25): RFID RST (Blue)
- Pin 23 (GPIO11): RFID SCKL
- Pin 24 (GPIO8): RFID SDA
Buttons
- Pin 13 (GPIO27): Button play/pause toggle (yellow cable)
- Pin 15 (GPIO22): Button prev (green cable)
- Pin 16 (GPIO23): Butto next (brown cable)
RPi.GPIO
is broken in RPI OS bookworm, see Sharing tips for future3 on bookworm/kernel 6.6 and upstreaming fixes
- pinout.xyz: RPi pin documentation
Button Wiring issues
Connecting a button to Pin 40 (GPIO21)
while using the
Suptronics x400 audio expansion board
results in muted audio when pressing manually,
or when starting scripts/gpio-buttons.py
with default pin layout.
Spotify
- Spotify does not work anymore
- Spotify-FAQ
- Upstream mopidy-spotify issue: Streaming does not work
- Groundwork for v3: Multi-Player support
Development
cd ~/RPi-Jukebox-RFID
Configure ./shared/settings/jukebox.yaml
Build:
docker compose -f docker/docker-compose.yml -f docker/docker-compose.linux.yml build
start:
docker-compose -f docker/docker-compose.yml -f docker/docker-compose.linux.yml up