Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Moode UI Asterisk button -- Is it possible to invoke from the command line?
#1
I am using a flirc adapter and remote to control aspects of one of my Moode players.  I successfully followed TheOldPresbyope's guide at:
http://moodeaudio.org/forum/showthread.php?tid=3023

I have mapped some of the basic Moode control functions and can am happy with the results.  

However, I like the ability to load a random album using the UI Asterisk button and would like to add the ability to do so from my remote if possible. 

Given that commands can be mapped to the button presses, I'm typing to find out if the command to load a random Album can be run from a command.  

I looked at the MCP commands and didn't see anything obvious to me, however, I'm just looking at this for the first time.  If the same functionality of the Asterisk can be run from the command line, could you tell me what that command is?

Thanks in advance for your help!
Reply
#2
Your right this isn't an mpc/mpd function. 

A previous post on the subject is well worth reading http://moodeaudio.org/forum/showthread.p...bum+script

then read http://moodeaudio.org/forum/showthread.php?tid=2638
Reply
#3
The on-demand random album features in moOde are custom and not available in MPD/MPC. moOde also has an automatic random album feature thats part of Auto-shuffle. It can be set to either Track or Album mode.

The OP is asking for an API to the custom random album * feature and that currently doesn't exist. It could be done but there would need to be more demand for it in order to put it on the TODO list. The other alternative is that maybe a dev will be interested in donating their time and effort to implement it.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#4
Thank you sheridat and Tim, I've read the referenced threads for mpdrandom and have this working now. I followed the instructions for installing mpdrandom and I've mapped the following command to a key on my remote:

/usr/local/bin/mpdrandom -c -l

The -c clears the current playlist and the -l tells it to use my library to choose a random album.

Now when I press the designated button, a random album is selected and starts playing.

One note:

When following the install for mpdrandom:
http://moodeaudio.org/forum/showthread.php?tid=2638

I encountered the same issue where I couldn't run mpdrandom without first running:
pip install python-mpd2

I then found that the mpdrandom command worked for the Pi user but not for the root user. This meant that initially I could run the mpdrandom command from shell, but the command wouldn't work when pressing the button on my remote.

To fix this, from the command line I did a sudo su to enter the root console and then I re-ran the command
pip install python-mpd2

After this finished, the mpdrandom command worked fine from my remote.

Thanks again for your help and time!
Reply


Forum Jump: