Moode Forum

Full Version: How do I program a button to play a stream?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Newbie here,

Rasp. 3B+ with IQaudio DAC+

I've got Moode setup with a few custom stations.
Add a few buttons for Next and Prev.
Trying to get a third button to play specific station.

I've tried: 

mpc,play,NameOfStation

mpc,load,NameOfStation

should I put in the entire url? like:  mpc,play,streamurl  ?
Put the mpc commands in a shell script file then put the path to the script in the button command.
Alternatively

Code:
mpc add PLAYABLE_URL

# Example for Groove Salad station
mpc add http://ice1.somafm.com/groovesalad-128-aac

ETA: You can find the playable url via Audio info or Edit the station
(07-22-2021, 02:10 PM)Tim Curtis Wrote: [ -> ]Alternatively

Code:
mpc add PLAYABLE_URL

# Example for Groove Salad station
mpc add http://ice1.somafm.com/groovesalad-128-aac

ETA: You can find the playable url via Audio info or Edit the station

Thank you!

SSH'd in

changed directories to:  /home/pi/

sudo nano preset1.sh

MPC clear
MPC add https://streams.radiomast.io/d01056xxxxx...xxxxxxxxxx
MPC play

saved and then typed:

sudo chmod +x preset1.sh  to make executable

then setup Button 1 "ON" PIN 17 CMD /home/pi/preset1.sh

this works like a charm

duplicated for a few other presets
When u get a moment edit your thread (post #1) and mark it as SOLVED :-)