Thank you for your donation!


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


REST API or HTTP commands?
#1
Hello,
I read some threads and found some http commands like play, stop, volume, etc.

Actually I'm using an ESP32 in wall, on which I put some push buttons (vol+/vol-)

Is there a command to force a playlist, or a radio ? How can I achieve that ?

I'm also looking for a command which can disconnect AirPlay or Spotify users.

The goal is to have a "master button" to force a webradio instead of anything else.

Thanks a lot for your help
Reply
#2
Disconnect airplay or spotify
Code:
moodeutl -R --airplay
moodeutl -R --spotify


Play control - use any of the mpc commandsl
Code:
mpc help

Loading a radio station 
Code:
mpc load <playable URL>

Volume control
Code:
pi@rp2:~ $ /var/www/vol.sh --help
Usage: vol.sh [OPTION] [VOLUME]
Change the volume and update the knob.

With no OPTION or VOLUME, print the current volume.
With just VOLUME, set current volume to VOLUME.

-up            VOLUME  value between 1 and 100
-dn            VOLUME  value between 1 and 100
-mute          mute or unmute the volume
-restore       set volume to current knob level
--version      print the program version
--help         print this help text
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
(07-10-2021, 09:40 PM)Tim Curtis Wrote: Disconnect airplay or spotify
Code:
moodeutl -R --airplay
moodeutl -R --spotify


Play control - use any of the mpc commandsl
Code:
mpc help

Loading a radio station 
Code:
mpc load <playable URL>

Volume control
Code:
pi@rp2:~ $ /var/www/vol.sh --help
Usage: vol.sh [OPTION] [VOLUME]
Change the volume and update the knob.

With no OPTION or VOLUME, print the current volume.
With just VOLUME, set current volume to VOLUME.

-up            VOLUME  value between 1 and 100
-dn            VOLUME  value between 1 and 100
-mute          mute or unmute the volume
-restore       set volume to current knob level
--version      print the program version
--help         print this help text

Thanks a lot
Is it possible to action the airplay/spotify through an url ?
Reply
#4
Not possible.

ETA: but would be a good project for a dev that would be interested in creating a uniform API for controlling moOde. My TODO list backlog is already quite long so something like this is not on my radar.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Forum Jump: