Skip to content

Phoniebox

Raspberry Pi RFID-Jukebox

Similar Projects

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
  • 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 installation

systemctl --user status jukebox-daemon.service

Future3 upgrade

Version upgrades:

cd RPi-Jukebox-RFID
git pull
source .venv/bin/activate
python -m pip install --no-cache-dir -r requirements.txt

Future3 issues

Solved:

Old / other:

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 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)

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

Development

docs: developers

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