The goal is for this to be a Phoenix application running on a Raspberry Pi to function as a simple music box for kids.
- Music Player Daemon - Headless music player for Linux
- Phoenix LiveView - Instantaneous web UI without writing JavaScript
- Nerves - Creating Elixir projects as full-blown firmware images such as for booting a Raspberry Pi
- Elixir Circuits - Elixir SDK for GPIO and SPI for managing the buttons and RFID reader
- RFID cards trigger playing songs or playlists
- Web interface to manage playlists, upload new music, pair new cards
- Buttons to control playback
app/
- Phoenix web applicationmpd/
- Custom lightweight build of mpdrpi/
- Scripts to configure a fresh install of Raspbian. May be obviated by using Nerves
This application is Dockerized. With Docker and docker-compose installed:
docker-compose build
On Linux we can mount /dev/snd
in the Docker container and mpd can directly
use our host system's sound output.
macOS doesn't have /dev/snd
or ALSA, so we configure mpd to output via an HTTP/Shoutcast
server. Then on our macOS host we can use iTunes or VLC to connect to the stream.
Use start_env.sh
to automatically pick the correct configuration.
./start_env.sh
Put any music files you want into mpd/music
and they'll be detected automatically by mpd.