🐯

The Flockify Box Die Flockify Box

A Raspberry Pi-powered music player built for kids. Spotify playlists, web radio, physical buttons, a tiny display, and a parent-friendly web interface — all in one box.

Ein Raspberry Pi Musikplayer, gebaut für Kinder. Spotify-Playlists, Webradio, physische Tasten, ein kleines Display und ein elternfreundliches Webinterface — alles in einer Box.

Raspberry Pi 5 Spotify Connect Open Source

What Can It Do? Was kann die Box?

Everything a kid needs for music — and everything a parent needs for peace of mind.

Alles was ein Kind für Musik braucht — und alles was Eltern für ruhige Nächte brauchen.

🎵

Spotify + Web Radio

Spotify + Webradio

Play up to 10 Spotify playlists or albums, plus one web radio station. Cycle through modes with a single button.

Bis zu 10 Spotify-Playlists oder Alben abspielen, plus einen Webradio-Sender. Mit einem Knopf zwischen Modi wechseln.

🔘

5 Physical Buttons

5 Physische Tasten

Volume up/down, next/previous track, and mode switching. No screen, no app — just press and play.

Lautstärke hoch/runter, nächster/vorheriger Titel und Moduswechsel. Kein Bildschirm, keine App — einfach drücken und spielen.

🖥️

1.83" SPI Display

1.83" SPI Display

Shows the current playlist cover, a sleeping tiger at night, and a volume overlay on button presses.

Zeigt das aktuelle Playlist-Cover, einen schlafenden Tiger nachts und ein Lautstärke-Overlay bei Tastendruck.

🌙

Time Schedule

Zeitplan

Night mode locks all buttons and shows a sleep screen. Quiet hours reduce volume and brightness. Fully configurable.

Nachtmodus sperrt alle Tasten und zeigt den Schlaf-Bildschirm. Ruhestunden reduzieren Lautstärke und Helligkeit. Voll konfigurierbar.

📱

Web Interface

Webinterface

Manage playlists, configure the schedule, pair Bluetooth speakers, and scan for WiFi — all from your phone.

Playlists verwalten, Zeitplan konfigurieren, Bluetooth-Lautsprecher koppeln und WiFi scannen — alles vom Handy aus.

📡

WiFi Hotspot

WiFi Hotspot

No known WiFi? The box creates its own "FlockifyBox" network so you can connect and configure from anywhere.

Kein bekanntes WiFi? Die Box erstellt ihr eigenes "FlockifyBox"-Netzwerk, damit du dich von überall verbinden und konfigurieren kannst.

Shopping List Einkaufsliste

Everything you need to build your own Flockify Box. Check items off as you collect them.

Alles was du brauchst, um deine eigene Flockify Box zu bauen. Hake Teile ab, wenn du sie hast.

Component Bauteil Details Details Notes Hinweise
2 GB model (or higher) 2 GB Modell (oder mehr) The brain of the box Das Gehirn der Box
16 GB or larger 16 GB oder größer For Raspberry Pi OS Für Raspberry Pi OS
5V 3A recommended 5V 3A empfohlen Official Pi 5 PSU is best Offizielles Pi 5 Netzteil ist am besten
1.83" ST7789 LCD (240x280) 1.83" ST7789 LCD (240x280) Waveshare or generic ST7789 module Waveshare oder generisches ST7789 Modul
I2S DAC + Class D Amp I2S DAC + Class D Verstärker Adafruit or generic breakout board Adafruit oder generisches Breakout Board
4-8 Ohm, 3W 4-8 Ohm, 3W Directly connected to MAX98357A output Direkt an MAX98357A Ausgang anschließen
Tactile push buttons Taktile Drucktaster No external resistors needed (internal pull-ups) Keine externen Widerstände nötig (interne Pull-ups)
Momentary pushbutton for J2 Momentan-Taster für J2 Connects to Pi 5's J2 (PWR_BTN) header Verbindet mit Pi 5's J2 (PWR_BTN) Header
1x pull-down for backlight 1x Pull-down für Hintergrundbeleuchtung Between GPIO 13 (pin 33) and GND (pin 34) Zwischen GPIO 13 (Pin 33) und GND (Pin 34)
Female-to-female, various Buchse-zu-Buchse, diverse For connecting all components to GPIO Zum Verbinden aller Komponenten mit GPIO
Your choice! Deine Wahl! Wooden box, 3D print, cardboard — be creative Holzbox, 3D-Druck, Karton — sei kreativ

Optional: Bluetooth speaker or headphones for wireless audio. Optional: Bluetooth-Lautsprecher oder Kopfhörer für drahtloses Audio.

Wiring Guide Verkabelungsanleitung

Connect the display, amplifier, and buttons to the Raspberry Pi's 40-pin GPIO header.

Verbinde Display, Verstärker und Tasten mit dem 40-Pin GPIO-Header des Raspberry Pi.

🖥️ SPI Display (ST7789)

Display PinGPIOHeader Pin
SCKGPIO 11 (SPI0 SCLK)23
SDA (MOSI)GPIO 10 (SPI0 MOSI)19
CSGPIO 8 (SPI0 CE0)24
DCGPIO 2522
RSTGPIO 2713
BLGPIO 13 (PWM)33
VCC3.3V1
GNDGND6
Important: 10 kOhm pull-down resistor Wichtig: 10 kOhm Pull-down Widerstand Solder a 10 kOhm resistor between pin 33 (GPIO 13) and pin 34 (GND). Without it, the display backlight stays on after shutdown. Einen 10 kOhm Widerstand zwischen Pin 33 (GPIO 13) und Pin 34 (GND) löten. Ohne diesen bleibt die Hintergrundbeleuchtung nach dem Herunterfahren an.

🔊 MAX98357A Amplifier (I2S)

Amp PinGPIOHeader Pin
VIN5V2
GNDGND6
BCLKGPIO 1812
LRCGPIO 1935
DINGPIO 2140
SD/GAIN Leave unconnected (default 9 dB gain) Nicht verbinden (Standard 9 dB Verstärkung)

🔘 Buttons

Each button connects its GPIO pin to GND when pressed. Internal pull-up resistors are used. Jede Taste verbindet ihren GPIO-Pin mit GND beim Drücken. Interne Pull-up Widerstände werden verwendet.

Button Taste GPIO Header Pin
Volume UpLauterGPIO 529
Volume DownLeiserGPIO 631
Next TrackNächster TitelGPIO 1636
Previous TrackVorheriger TitelGPIO 2637
Next ModeNächster ModusGPIO 1232

⏻ Power Button (J2 Header)

Solder a momentary pushbutton across the Pi 5's J2 header (next to USB-C). Short press = clean shutdown. Press again from halted = wake and boot. Einen Momentan-Taster an den J2 Header des Pi 5 löten (neben USB-C). Kurz drücken = sauberes Herunterfahren. Erneut drücken = Aufwachen und Hochfahren.

Software Setup Software-Einrichtung

From a fresh SD card to a working music player in about 20 minutes.

Von einer frischen SD-Karte zum funktionierenden Musikplayer in etwa 20 Minuten.

Flash the SD Card

SD-Karte flashen

Use Raspberry Pi Imager to flash Raspberry Pi OS (64-bit, Bookworm). In the imager settings, enable SSH and configure your WiFi network.

Verwende den Raspberry Pi Imager um Raspberry Pi OS (64-bit, Bookworm) zu flashen. In den Imager-Einstellungen SSH aktivieren und dein WiFi-Netzwerk konfigurieren.

Boot and Connect

Starten und Verbinden

Insert the SD card, power on the Pi, and SSH in:

SD-Karte einsetzen, Pi einschalten und per SSH verbinden:

ssh pi@raspberrypi.local

Clone the Project

Projekt klonen

git clone https://github.com/NikBrownTRP/flockify-box.git ~/flockify

Run the Installer

Installer ausführen

The install script handles everything: packages (including go-librespot for Spotify Connect), services, config, hostname, groups, and auto-update setup.

Das Installationsskript erledigt alles: Pakete (einschließlich go-librespot für Spotify Connect), Dienste, Konfiguration, Hostname, Gruppen und Auto-Update Setup.

cd ~/flockify
sudo bash scripts/install.sh

This takes about 10 minutes. Reboot when finished:

Das dauert etwa 10 Minuten. Nach Abschluss neu starten:

sudo reboot

Enable I2S DAC

I2S DAC aktivieren

The installer adds the DAC overlay to /boot/firmware/config.txt automatically. Verify after reboot:

Der Installer fügt das DAC-Overlay automatisch zu /boot/firmware/config.txt hinzu. Nach Neustart überprüfen:

aplay -l # Should show "snd_rpi_hifiberry_dac"

Open the Web UI

Webinterface öffnen

On your phone or laptop, navigate to:

Auf deinem Handy oder Laptop, navigiere zu:

http://flockifybox.local:5000

Connect Spotify

Spotify verbinden

Go to Settings → Spotify Connection in the web UI. You'll need a Spotify Developer app with:

Gehe zu Einstellungen → Spotify Verbindung im Webinterface. Du brauchst eine Spotify Developer App mit:

  • Your Client ID and Client Secret
  • Deiner Client ID und deinem Client Secret
  • Redirect URI set to http://flockifybox.local:5000/callback
  • Redirect URI gesetzt auf http://flockifybox.local:5000/callback
  • Your Spotify account added as a user in the Developer Dashboard
  • Dein Spotify-Konto als Benutzer im Developer Dashboard hinzugefügt

Add Playlists and Enjoy!

Playlists hinzufügen und genießen!

Go to the Playlists page, paste Spotify playlist or album URLs, and they'll appear as modes on the box. Press the Next Mode button to cycle through them.

Gehe zur Playlists-Seite, füge Spotify-Playlist- oder Album-URLs ein, und sie erscheinen als Modi auf der Box. Drücke den Nächster Modus Knopf, um durch sie zu wechseln.

Troubleshooting Problembehandlung

Common issues and how to fix them.

Häufige Probleme und ihre Lösungen.

Check if the Pi is on WiFi: hostname -I. Check the service: sudo systemctl status flockify. Try the IP directly: http://<PI_IP>:5000. If there's no WiFi, connect to the FlockifyBox hotspot (password: flockify123) and visit http://192.168.4.1:5000.

Prüfe ob der Pi im WiFi ist: hostname -I. Dienst prüfen: sudo systemctl status flockify. IP direkt probieren: http://<PI_IP>:5000. Wenn kein WiFi verfügbar ist, verbinde dich mit dem FlockifyBox Hotspot (Passwort: flockify123) und besuche http://192.168.4.1:5000.

go-librespot auto-reconnects after a power cycle. If playback doesn't start, open Spotify on your phone, tap the "Connect to a device" icon, and select flockifybox. This should only be needed on first setup.

go-librespot verbindet sich nach einem Neustart automatisch. Falls die Wiedergabe nicht startet, öffne Spotify auf deinem Handy, tippe auf das "Mit Gerät verbinden" Symbol und wähle flockifybox. Dies sollte nur bei der Ersteinrichtung nötig sein.

Check audio sinks: pactl list sinks short. Verify the DAC: aplay -l (should show snd_rpi_hifiberry_dac). Check wiring to the MAX98357A amplifier and speaker connections.

Audio-Senken prüfen: pactl list sinks short. DAC überprüfen: aplay -l (sollte snd_rpi_hifiberry_dac zeigen). Verkabelung zum MAX98357A Verstärker und Lautsprecheranschlüsse prüfen.

Verify SPI is enabled: ls /dev/spidev0.*. Check wiring: DC→GPIO25, RST→GPIO27, BL→GPIO13. Test: python3 -c "from lib.spi_display_lib import SPIDisplay; d = SPIDisplay(); d.init(); d.clear((255,0,0))"

SPI aktiviert prüfen: ls /dev/spidev0.*. Verkabelung prüfen: DC→GPIO25, RST→GPIO27, BL→GPIO13. Test: python3 -c "from lib.spi_display_lib import SPIDisplay; d = SPIDisplay(); d.init(); d.clear((255,0,0))"

Make sure the target device is in pairing mode. Check Bluetooth is on: bluetoothctl show → look for Powered: yes. Try manually: bluetoothctl scan on, then pair <address>.

Stelle sicher, dass das Zielgerät im Kopplungsmodus ist. Bluetooth an: bluetoothctl show → suche nach Powered: yes. Manuell versuchen: bluetoothctl scan on, dann pair <Adresse>.