Mopidy: Home Jukebox

I started using Mopidy recently, and found it to be quite useful. Mopidy is a music server, that plays music from local disk, or streams music from the cloud like Spotify, SoundCloud, Google Play Music, and more.

From your phone, tablet, or computer, you can control the playlist from your phone, tablet, or computer with a web client.

It allows everyone at home an easy way to manage what’s playing, something like a Jukebox. It doesn’t need powerful hardware, I run it on an Orange Pi, my R2D2 which can run Alexa with Mopidy concurrently. Speakers are connected via USB. You can even extend it further with multi-room audio (like Sonos), by combining Mopidy with Snapcast but I’m satisfied with my R2 jukebox for now.

Installation

  1. https://docs.mopidy.com/en/latest/installation/debian/#debian-install
  2. I needed to modify my alsa configuration in order to get everything working together nicely.
  3. mopidy itself doesn’t have a web client – so I am using the IRIS frontend (https://github.com/jaedb/Iris/wiki/Getting-started#installing)
  4. you can also integrate it to home-assistant
  5. vim /etc/asound.conf

pcm.!default {
type asym
playback.pcm "dmixer"
capture.pcm "plughw:0"
}
pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "hw:1,0"
}
bindings {
0 0
1 1
}
}
ctl.dmixer {
type hw
card 1
}

In my case, I have two hardware playback devices. And I need the above configuration to allow alsa to accept audio input concurrently from two processes.

Kaer

Kaer is a tech geek and star wars fan. He loves playing with new gadgets, writing little code snippets in Python, JS, and dabbling with Android programming from time to time, while keeping a lookout for the next biggest happening in the world of tech!

Leave a Reply