Comments (8)
Just wanted to update this. After serious procrastination and then removing the only device I had with audio-out and then realizing it was what was feeding my AmpliPi, I finally ended up implementing this and it is fantastic. I have a 128gb usb stick plugged in for the music currently, though I may need to upgrade that for more space soon.
A couple notes for anyone else wanting to implement this as well as notes for if this is to be implemented official.
The debian release on the AmpliPi is too old for a current version of Mopidy so use their repo and update: https://docs.mopidy.com/en/latest/installation/debian/#install-from-apt-mopidy-com
Here's the config I ended up with:
[http]
port = 6188
hostname = ::
zeroconf = Mopidy on AmpliPi
[core]
cache_dir = /home/pi/config/srcs/1/mopidy/cache
config_dir = /home/pi/config/srcs/1/mopidy/config
data_dir = /media/pi/Stuff/mopidy/data
[file]
enabled = false
[mpd]
enabled = true
hostname = ::
[local]
media_dir = /media/pi/Stuff
included_file_extensions =
.mp3
.flac
.wav
[m3u]
playlists_dir = /media/pi/Stuff/playlists
base_dir = /home/pi/config/srcs/1/mopidy/m3u
[audio]
output = alsasink device=ch0
[iris]
enabled = true
country = US
locale = en_US
spotify_authorization_url = http://localhost
lastfm_authorization_url = http://localhost
genius_authorization_url = http://localhost
data_dir = /home/pi/config/srcs/1/mopidy/iris
/media/pi/Stuff/
is my USB
The big thing to understand about this method is that the first Source on the AmpliPi (if using ch0 above) will be Mopidy regardless of what you have selected for a stream. Running this on the AmpliPi basically takes over this interface. If this is made official there will need to be a method in which the mopidy service can be kept running but not attached to the channel permanently. I don't have enough knowledge of the hardware/software interface to pull that off on my own.
Personally I think this is a killer feature to implement in an official capacity, but I also understand I might be in the minority there and am really just super happy that this platform is open enough that I can do this on my device.
from amplipi.
It looks like it should be pretty easy to install:
sudo apt install mopidy
sudo ln -s ~/.asoundrc /etc/asound.conf
The configuration file, mopidy.conf, needs to be generated with something like this, where X is the source id and NAME is stream name:
[http] port = 6X88
[http] zeroconf = NAME on AmplPi
cache_dir = /home/pi/config/srcs/X/mopidy/cache
config_dir = /home/pi/config/srcs/X/mopidy/config
data_dir = /home/pi/config/srcs/X/mopidy/data
[local]
media_dir = /path/to/usb # figure out how to automount first USB device to same place?
[audio]
output = alsasink device=chX
Based on what I read this should support multiple instances although the above config will need some tweaking.
Further reading:
- https://docs.mopidy.com/en/latest/config/
- https://discourse.mopidy.com/t/config-and-initscripts-for-multiple-mopidy-servers/1017
from amplipi.
Thanks for sharing this setup! Something like this will be much more flexible once all of the details of #262 are figured out. At that point it won't use up a source when it isn't playing something.
from amplipi.
This seems like a great feature; officially supporting local audio in the future could a lot of value to the AmpliPi. Not having to manage a separate audio server would certainly simplify some home setups. Thanks for looking into it @bs42 !
from amplipi.
One other option that is fairly easy to setup is installing Logitech media server on the amplipi.
from amplipi.
What's the current status of this request? #262 has been closed, and @linknum23 mentioned above that once it has been sorted out, this would become much more flexible.
from amplipi.
Given our progress on background streams / audio pipes Mopidy is much more feasible to integrate now. There is a lot integration work still needs to be done to add Mopidy to our system. At the moment we are focused on making our current feature set much more usable and robust.
As for local audio hosted on the AmpliPi, the best supported option is running Logitech Media Server (LMS) on an AmpliPi and connecting a USB drive with audio files on it. An AmpliPi can be configured to run its own LMS and 4 LMS clients by enabling it in settings->Configuration->Logitech Media Server (LMS) Mode.
from amplipi.
I'm extremely interested in this feature, as well as #355 . I'm going to briefly discuss inclusion of this in our 0.5 release, though I think it may be more realistic for 0.6, We have our scoping meeting at the end of this week 😎
from amplipi.
Related Issues (20)
- Stream selection header in settings truncated in small iOS HOT 8
- Applying zone settings should give user feedback
- Make UI report when running in an unsupported browser
- Config move to new location isn't happening
- ModalCard Header not center aligned
- Stream selection modal font size too small HOT 3
- Make manuals for streamer, wallpanel, and expansion units
- Allow for different asound.conf files HOT 2
- Maximize output voltage for streamers and new preamp hardware
- External Media streams don't stop outputting audio when disconnected
- Short stream names left-aligned on player page
- Player page marquee error on stream swap
- Group creation zone selection dropdown too large on mobile
- Pandora - Entering browse page causes `unreadable length` error during stream startup
- Move search box to top of internet radio creation modal
- External Media Player needs a repeat song, playlist button HOT 1
- External Media stream Album Art HOT 1
- Python package validators not being installed on update
- Sense and trigger based on audio level on AUX input HOT 1
- add LMS plugins and Material skin in base image HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amplipi.